Skip to content

.boot modules interact badly with the ghci debugger

If a boot module is loaded after its normal counterpart, which can happen, the module ends up with empty modBreaks info, which leads to errors while debugging. It looks like boot modules take the place of their normal counterparts in the HomePackageTable perhaps? An example:

GHCi, version 6.7.20070826: http://www.haskell.org/ghc/  :? for help
Loading package base ... linking ... done.
Prelude> :l C
[1 of 4] Compiling B[boot]          ( B.hs-boot, interpreted )
[2 of 4] Compiling A                ( A.hs, interpreted )
[3 of 4] Compiling B                ( B.hs, interpreted )
[4 of 4] Compiling C                ( C.hs, interpreted )
Ok, modules loaded: B, B, C, A.
*C> :! touch A.hs
*C> :r
[1 of 4] Compiling B[boot]          ( B.hs-boot, interpreted )
[2 of 4] Compiling A                ( A.hs, interpreted )
Ok, modules loaded: B, B, C, A.
*C> :break a
Breakpoint 0 activated at A.hs:4:0-8
*C> a ()
Stopped at A.hs:4:0-8
_result :: a = _
3  
4  a x = b x
[A.hs:4:0-8] *C> :st
Stopped at A.hs:4:6-8
_result :: () = _
x :: () = ()
3  
4  a x = b x
[A.hs:4:6-8] *C> :st  
*** Exception: Error in array index
Trac metadata
Trac field Value
Version 6.7
Type Bug
TypeOfFailure OtherFailure
Priority high
Resolution Unresolved
Component GHCi
Test case
Differential revisions
BlockedBy
Related
Blocking
CC mnislaih@gmail.com
Operating system Unknown
Architecture Unknown
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information