X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=compiler%2Fmain%2FBreakpoints.hs;h=c4318ca448eeab9a96eb1c10ff19d0c6fa9ed133;hb=3c22606bf3114747deeae0a8a1d5832ee834d9d1;hp=b1b011817999521d36344a88c61a4b925e069f61;hpb=1df34b328128f4949ef812c8be952ab1f85df7ac;p=ghc-hetmet.git diff --git a/compiler/main/Breakpoints.hs b/compiler/main/Breakpoints.hs index b1b0118..c4318ca 100644 --- a/compiler/main/Breakpoints.hs +++ b/compiler/main/Breakpoints.hs @@ -18,8 +18,9 @@ import Name import Var ( Id ) import PrelNames -import GHC.Exts ( unsafeCoerce# ) +import GHC.Exts +#ifdef GHCI data BkptHandler a = BkptHandler { handleBreakpoint :: forall b. Session -> [(Id,HValue)] -> BkptLocation a -> String -> b -> IO b , isAutoBkptEnabled :: Session -> BkptLocation a -> IO Bool @@ -29,6 +30,7 @@ nullBkptHandler = BkptHandler { isAutoBkptEnabled = \ _ _ -> return False, handleBreakpoint = \_ _ _ _ b -> putStrLn "null Bkpt Handler" >> return b } +#endif type BkptLocation a = (a, SiteNumber) type SiteNumber = Int @@ -44,10 +46,11 @@ noDbgSites = [] #ifdef GHCI lookupBogusBreakpointVal :: Name -> Maybe HValue lookupBogusBreakpointVal name - | name == breakpointJumpName = Just$ unsafeCoerce# (\_ _ _ _ a->a) - | name == breakpointAutoJumpName = Just$ unsafeCoerce# (\_ _ _ _ a->a) - | name == breakpointCondJumpName = Just$ unsafeCoerce# (\_ _ _ _ _ a->a) + | name == breakpointJumpName = Just$ unsafeCoerce# (\_ _ a->a) + | name == breakpointAutoJumpName = Just$ unsafeCoerce# (\_ _ a->a) + | name == breakpointCondJumpName = Just$ unsafeCoerce# (\_ _ _ a->a) | otherwise = Nothing #else lookupBogusBreakpointVal _ = Nothing -#endif //GHCI +#endif /* GHCI */ +