X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=compiler%2Fghci%2FInteractiveUI.hs;h=573aaa01cc49fb4a75746534d2f81e0b7d80133a;hb=d0a4736028a4834f6ce643a0629c7b5f1f451d34;hp=d2ed97662dfd29d45425b08571ae1d15b00c661c;hpb=025733b8367d9108e8992b2db3dbb9f80cad4fa9;p=ghc-hetmet.git diff --git a/compiler/ghci/InteractiveUI.hs b/compiler/ghci/InteractiveUI.hs index d2ed976..573aaa0 100644 --- a/compiler/ghci/InteractiveUI.hs +++ b/compiler/ghci/InteractiveUI.hs @@ -152,7 +152,7 @@ builtin_commands = [ keepGoing :: (String -> GHCi ()) -> (String -> GHCi Bool) keepGoing a str = a str >> return False --- tlC: Top Level Command +-- tlC: Top Level Command, not allowed in inferior sessions tlC :: (String -> GHCi Bool) -> (String -> GHCi Bool) tlC a str = do top_level <- isTopLevel @@ -779,7 +779,10 @@ afterLoad ok session = do 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 @@ -1355,7 +1358,7 @@ wrapCompleter fun w = 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 @@ -1402,10 +1405,8 @@ handler (DynException dyn) = 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