"\n" ++
" Options for ':breakpoint':\n" ++
" list list the current breakpoints\n" ++
- " add Module line [col] add a new breakpoint\n" ++
+ " add [Module] line [col] add a new breakpoint\n" ++
" del (breakpoint# | Module line [col]) delete a breakpoint\n" ++
" continue continue execution\n" ++
" stop Stop a computation and return to the top level\n" ++
hSetBuffering stdin NoBuffering
-- initial context is just the Prelude
- prel_mod <- GHC.findModule session prel_name Nothing
+ prel_mod <- GHC.findModule session prel_name (Just basePackageId)
GHC.setContext session [] [prel_mod]
#ifdef USE_READLINE
graph <- io (GHC.getModuleGraph session)
graph' <- filterM (io . GHC.isLoaded session . GHC.ms_mod_name) graph
setContextAfterLoad session graph'
- refreshBkptTable graph'
+ do
+ bt <- getBkptTable
+ bt' <- io$ refreshBkptTable session bt graph'
+ setBkptTable bt'
modulesLoadedMsg ok (map GHC.ms_mod_name graph')
setContextAfterLoad session [] = do
getCommonPrefix :: [String] -> String
getCommonPrefix [] = ""
getCommonPrefix (s:ss) = foldl common s ss
- where common s "" = s
+ where common s "" = ""
common "" s = ""
common (c:cs) (d:ds)
| c == d = c : common cs ds
= do at_topLevel <- isTopLevel
if at_topLevel then return True else throwDyn StopParentSession
- | Just (ChildSessionStopped msg) <- fromDynamic dyn
- -- Reload modules and display some message
- = do ASSERTM (isTopLevel)
- io(putStrLn msg) >> return False
+ | Just (ChildSessionStopped msg) <- fromDynamic dyn
+ = io(putStrLn msg) >> return False
handler exception = do
flushInterpBuffers