Opened 16 years ago

Closed 16 years ago

Last modified 48 years ago

#580 closed bug (Fixed)

Loading modules without .hs file fails

Reported by: shane_308 Owned by: simonmar
Priority: normal Milestone:
Component: Compiler Version: 5.0
Keywords: Cc:
Operating System: Architecture:
Type of failure: None/Unknown Test Case:
Blocked By: Blocking:
Related Tickets: Differential Rev(s):
Wiki Page:


If I attempt to load a module with only the .hi and .o
files for that module present, then the load fails with
the following message:

Loading package std ... linking ... done.
Prelude> :l Part1
*** Exception: does not exist
Action: withFileStatus
Reason: No such file or directory

However, by placing a 'dummy' .hs file with only the
single line:

module Part1 where

I can get the module Part1 to load _with full

This error is present in ghci 5.00.2 on a i86pc running
SunOS 5.8

Change History (1)

comment:1 Changed 16 years ago by simonmar

Status: assignedclosed
Logged In: YES 

This has been fixed in a rather heavy-handed way: GHC 5.02 
won't allow you to load modules for which there is no 
source file, unless the module is from a package.

The reason is that GHCi follows dependencies by reading the 
source file, so it can't figure out dependencies if the 
source isn't available.  Your workaround of providing a 
dummy source file will still work (but it should contain 
import declarations for any modules it depends on).
Note: See TracTickets for help on using tickets.