[GHC] #1650: .boot modules interact badly with the ghci debugger

GHC trac at galois.com
Thu Aug 30 05:53:52 EDT 2007


#1650: .boot modules interact badly with the ghci debugger
--------------------------------+-------------------------------------------
  Reporter:  mnislaih           |          Owner:          
      Type:  bug                |         Status:  new     
  Priority:  high               |      Milestone:  6.8     
 Component:  GHCi               |        Version:  6.7     
  Severity:  normal             |       Keywords:  debugger
Difficulty:  Unknown            |             Os:  Unknown 
  Testcase:  break022 break023  |   Architecture:  Unknown 
--------------------------------+-------------------------------------------
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
 }}}

-- 
Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/1650>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler


More information about the Glasgow-haskell-bugs mailing list