1 -----------------------------------------------------------------------------
\r
3 -- GHC API breakpoints. This module includes the main API (BkptHandler) and
\r
4 -- utility code for implementing a client to this API used in GHCi
\r
6 -- Pepe Iborra (supported by Google SoC) 2006
\r
8 -----------------------------------------------------------------------------
\r
10 module Breakpoints where
\r
12 import {-#SOURCE#-} HscTypes ( Session )
\r
14 data BkptHandler a = BkptHandler {
\r
15 handleBreakpoint :: forall b. Session -> [(Id,HValue)] -> BkptLocation a -> String -> b -> IO b
\r
16 , isAutoBkptEnabled :: Session -> BkptLocation a -> IO Bool
\r
19 nullBkptHandler = BkptHandler {
\r
20 isAutoBkptEnabled = \ _ _ -> return False,
\r
21 handleBreakpoint = \_ _ _ _ b -> putStrLn "null Bkpt Handler" >> return b
\r
24 type BkptLocation a = (a, SiteNumber)
\r
25 type SiteNumber = Int
\r