X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=ghc%2FGhciMonad.hs;h=2aff48385e3d5962cb00282ea11d3f6415e3f13f;hb=2c8aabcad1d2f2c469cb8a10afa7b66beeaedd45;hp=863372ff4a385fb9232c7dab39bbd680db9a5049;hpb=0eca7e0b307c5862212c9eebfc69af9743ef06f3;p=ghc-hetmet.git diff --git a/ghc/GhciMonad.hs b/ghc/GhciMonad.hs index 863372f..2aff483 100644 --- a/ghc/GhciMonad.hs +++ b/ghc/GhciMonad.hs @@ -57,6 +57,7 @@ data GHCiState = GHCiState stop :: String, options :: [GHCiOption], prelude :: GHC.Module, + line_number :: !Int, -- input line break_ctr :: !Int, breaks :: ![(Int, BreakLocation)], tickarrays :: ModuleEnv TickArray, @@ -77,7 +78,8 @@ data GHCiState = GHCiState ghc_e :: Bool -- True if this is 'ghc -e' (or runghc) } -data CtxtCmd +data CtxtCmd -- In each case, the first [String] are the starred modules + -- and the second are the unstarred ones = SetContext [String] [String] | AddModules [String] [String] | RemModules [String] [String] @@ -89,6 +91,7 @@ data GHCiOption = ShowTiming -- show time/allocs after evaluation | ShowType -- show the type of expressions | RevertCAFs -- revert CAFs after every evaluation + | Multiline -- use multiline commands deriving Eq data BreakLocation @@ -252,7 +255,7 @@ runStmt expr step = do reflectGHCi x $ do GHC.handleSourceError (\e -> do GHC.printException e return GHC.RunFailed) $ do - GHC.runStmt expr step + GHC.runStmtWithLocation (progname st) (line_number st) expr step resume :: (SrcSpan -> Bool) -> GHC.SingleStep -> GHCi GHC.RunResult resume canLogSpan step = do