Opened 14 years ago

Closed 14 years ago

Last modified 46 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: Test Case:
Blocked By: Blocking:
Related Tickets: Differential Revisions:

Description

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
yields
   <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 14 years ago by sewardj

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

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.