Skip to content

strange ghci behavior and error with recursive modules

Here is a ghci session with the attached program:

> ghci B
   ___         ___ _
  / _ \ /\  /\/ __(_)
 / /_\// /_/ / /  | |      GHC Interactive, version 6.4.2, for Haskell 98.
/ /_\\/ __  / /___| |      http://www.haskell.org/ghc/
\____/\/ /_/\____/|_|      Type :? for help.

Loading package base-1.0 ... linking ... done.
Compiling C[boot]          ( ./C.hs-boot, ./C.o-boot )
Compiling A                ( ./A.hs, interpreted )
Compiling B                ( B.hs, interpreted )
Compiling C                ( ./C.hs, interpreted )
Ok, modules loaded: C, B, A, C.
*C> :r
Ok, modules loaded: A, C, B.
*A> :m + B
*A B> A

During interactive linking, GHCi couldn't find the following symbol:
  B_zdfClass1B_closure
This may be due to you not asking GHCi to load extra object files,
archives or DLLs needed by your current session.  Restart GHCi, specifying
the missing library using the -L/path/to/object/dir and -lmissinglibname
flags, or simply by naming the relevant files on the GHCi command line.
Alternatively, this link failure might indicate a bug in GHCi.
If you suspect the latter, please send a bug report to:
  glasgow-haskell-bugs@haskell.org

*A B> B
B
*A B> A
A

3 strange things happen:

  1. I ask to load B, it loads C
  2. I ask to reload, it loads A :)
  3. missing symbol error which goes away after evaluating some other expression
Trac metadata
Trac field Value
Version 6.4.2
Type Bug
TypeOfFailure OtherFailure
Priority normal
Resolution Unresolved
Component GHCi
Test case
Differential revisions
BlockedBy
Related
Blocking
CC avatar@hot.ee
Operating system
Architecture Unknown
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information