Skip to content

user-visible env in GHCi sometimes wrong

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.
Trac metadata
Trac field Value
Version 5.0
Type Bug
TypeOfFailure OtherFailure
Priority high
Resolution ResolvedWon'tFix
Component Compiler
Test case
Differential revisions
BlockedBy
Related
Blocking
CC
Operating system
Architecture
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information