" :help, :? display this list of commands\n" ++
" :info [<name> ...] display information about the given names\n" ++
" :print [<name> ...] prints a value without forcing its computation\n" ++
- " :sprint [<name> ...] prints a value without forcing its computation(simpler)\n" ++
+ " :sprint [<name> ...] simplified version of :print\n" ++
" :load <filename> ... load module(s) and their dependents\n" ++
" :module [+/-] [*]<mod> ... set the context for expression evaluation\n" ++
" :main [<arguments> ...] run the main function with the given arguments\n" ++
handler (DynException dyn)
| Just StopChildSession <- fromDynamic dyn
-- propagate to the parent session
- = ASSERTM (liftM not isTopLevel) >> throwDyn StopChildSession
+ = do ASSERTM (liftM not isTopLevel)
+ throwDyn StopChildSession
| Just (ChildSessionStopped msg) <- fromDynamic dyn
-- Reload modules and display some message
- = ASSERTM (isTopLevel) >> io(putStrLn msg) >> return False
+ = do ASSERTM (isTopLevel)
+ io(putStrLn msg) >> return False
handler exception = do
flushInterpBuffers
printScopeMsg location ids = do
unqual <- GHC.getPrintUnqual s
printForUser stdout unqual $
- text "Local bindings in scope:" $$
+ text "Stopped at a breakpoint in " <> text (stripColumn location) <>
+ char '.' <+> text "Local bindings in scope:" $$
nest 2 (pprWithCommas showId ids)
where
showId id =
ppr (idName id) <+> dcolon <+> ppr (idType id)
+ stripColumn = reverse . tail . dropWhile (/= ':') . reverse
-- | Give the Id a Global Name, and tidy its type
globaliseAndTidy :: Id -> Id