Opened 13 years ago

Closed 13 years ago

Last modified 44 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: Difficulty:
Test Case: Blocked By:
Blocking: Related Tickets:

Description

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
Prelude> 

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
functionality_.

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


Change History (1)

comment:1 Changed 13 years ago by simonmar

  • Status changed from assigned to closed
Logged In: YES 
user_id=48280

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.