FIX #1650: ".boot modules interact badly with the ghci debugger"
authorSimon Marlow <simonmar@microsoft.com>
Wed, 5 Sep 2007 10:47:16 +0000 (10:47 +0000)
committerSimon Marlow <simonmar@microsoft.com>
Wed, 5 Sep 2007 10:47:16 +0000 (10:47 +0000)
commite2782137c799a08711cac0844418cc0345a7ceb5
tree95dd4aee9bfd315311b409451905d2dcb8799377
parentb1f0cd397d4cc0e9bf178bbe2774a9b7c1595b34
FIX #1650: ".boot modules interact badly with the ghci debugger"

In fact hs-boot files had nothing to do with it: the problem was that
GHCi would forget the breakpoint information for a module that had
been reloaded but not recompiled.  It's amazing that we never noticed
this before.

The ModBreaks were in the ModDetails, which was the wrong place.  When
we avoid recompiling a module, ModDetails is regenerated from ModIface
by typecheckIface, and at that point it has no idea what the ModBreaks
should be, so typecheckIface made it empty.  The right place for the
ModBreaks to go is with the Linkable, which is retained when
compilation is avoided.  So now I've placed the ModBreaks in with the
CompiledByteCode, which also makes it clear that only byte-code
modules have breakpoints.

This fixes break022/break023
compiler/iface/TcIface.lhs
compiler/main/DriverPipeline.hs
compiler/main/GHC.hs
compiler/main/HscMain.lhs
compiler/main/HscTypes.lhs
compiler/main/InteractiveEval.hs
compiler/main/TidyPgm.lhs