Opened 16 years ago

Closed 16 years ago

Last modified 48 years ago

#544 closed bug (Wont Fix)

user-visible env in GHCi sometimes wrong

Reported by: sewardj Owned by: nobody
Priority: high 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:


Let M be the head module of a multi-module project.  
First compile M and all below it to objects:
   ghc --make M
Now start an interactive session with M:
   ghc --interactive M
ghci loads object code for M and all dependencies.  
Unfortunately the top-level env is then stuffed,
so that, for example
   1 + 2
   <no file>:0: Variable not in scope: `+'
This doesn't happen if any of the modules have been 
compiled to bytecode, which inclines me to believe 
this is some difficulty with the renamer/typechecker.

This happens in the just-about-to-be-released 5.00.1 
sources, and probably the HEAD too.

Change History (1)

comment:1 Changed 16 years ago by sewardj

Status: assignedclosed
Logged In: YES 

Actually it's a documented issue.  See the User Guide, 
section 3.4.1 "What's really in scope at the prompt?"  
Unfortunately, rather confusing, and is really due to 
limitations in the GHCi implementation. 
Note: See TracTickets for help on using tickets.