Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
Synopsis
- class (MonadFail m, Monad m) => DebugMonad m where
- type DebugEnv m
- request :: (Show resp, Typeable resp) => Request resp -> m resp
- requestBlock :: (Show resp, Typeable resp) => BlockCacheRequest resp -> m resp
- traceMsg :: String -> m ()
- printRequestLog :: DebugEnv m -> IO ()
- runDebug :: DebugEnv m -> m a -> IO a
- runDebugTrace :: DebugEnv m -> m a -> IO (a, [String])
- newEnv :: Tracer IO String -> Mode -> IO (DebugEnv m)
- saveCache :: FilePath -> m ()
- loadCache :: FilePath -> m ()
- unsafeLiftIO :: IO a -> m a
- run :: Debuggee -> DebugM a -> IO a
- type DebugM = DebugM
- data Debuggee
- traceWrite :: DebugMonad m => Show a => a -> m ()
- runTrace :: Debuggee -> DebugM a -> IO a
- withDebuggeeRun :: FilePath -> FilePath -> (Debuggee -> IO a) -> IO a
- withDebuggeeConnect :: FilePath -> (Debuggee -> IO a) -> IO a
- debuggeeRun :: FilePath -> FilePath -> IO Debuggee
- debuggeeConnect :: FilePath -> IO Debuggee
- debuggeeConnectWithTracer :: Tracer IO String -> FilePath -> IO Debuggee
- debuggeeClose :: Debuggee -> IO ()
- snapshotInit :: FilePath -> IO Debuggee
- snapshotInitWithTracer :: Tracer IO String -> FilePath -> IO Debuggee
- snapshotRun :: FilePath -> (Debuggee -> IO a) -> IO a
- outputRequestLog :: Debuggee -> IO ()
Documentation
class (MonadFail m, Monad m) => DebugMonad m where Source #
request :: (Show resp, Typeable resp) => Request resp -> m resp Source #
requestBlock :: (Show resp, Typeable resp) => BlockCacheRequest resp -> m resp Source #
traceMsg :: String -> m () Source #
printRequestLog :: DebugEnv m -> IO () Source #
runDebug :: DebugEnv m -> m a -> IO a Source #
runDebugTrace :: DebugEnv m -> m a -> IO (a, [String]) Source #
newEnv :: Tracer IO String -> Mode -> IO (DebugEnv m) Source #
saveCache :: FilePath -> m () Source #
loadCache :: FilePath -> m () Source #
unsafeLiftIO :: IO a -> m a Source #
Instances
DebugMonad DebugM Source # | |
Defined in GHC.Debug.Client.Monad.Simple request :: (Show resp, Typeable resp) => Request resp -> DebugM resp Source # requestBlock :: (Show resp, Typeable resp) => BlockCacheRequest resp -> DebugM resp Source # traceMsg :: String -> DebugM () Source # printRequestLog :: DebugEnv DebugM -> IO () Source # runDebug :: DebugEnv DebugM -> DebugM a -> IO a Source # runDebugTrace :: DebugEnv DebugM -> DebugM a -> IO (a, [String]) Source # newEnv :: Tracer IO String -> Mode -> IO (DebugEnv DebugM) Source # saveCache :: FilePath -> DebugM () Source # loadCache :: FilePath -> DebugM () Source # unsafeLiftIO :: IO a -> DebugM a Source # |
traceWrite :: DebugMonad m => Show a => a -> m () Source #
Running/Connecting to a debuggee
:: FilePath | path to executable to run as the debuggee |
-> FilePath | filename of socket (e.g. |
-> (Debuggee -> IO a) | |
-> IO a |
Bracketed version of debuggeeRun
. Runs a debuggee, connects to it, runs
the action, kills the process, then closes the debuggee.
Bracketed version of debuggeeConnect
. Connects to a debuggee, runs the
action, then closes the debuggee.
:: FilePath | path to executable to run as the debuggee |
-> FilePath | filename of socket (e.g. |
-> IO Debuggee |
Run a debuggee and connect to it. Use debuggeeClose
when you're done.
debuggeeConnectWithTracer Source #
Connect to a debuggee on the given socket. Use debuggeeClose
when you're done.
debuggeeClose :: Debuggee -> IO () Source #
Close the connection to the debuggee.
Snapshot run
snapshotInit :: FilePath -> IO Debuggee Source #
Create a debuggee by loading a snapshot created by snapshot
.
snapshotRun :: FilePath -> (Debuggee -> IO a) -> IO a Source #
Start an analysis session using a snapshot. This will not connect to a
debuggee. The snapshot is created by snapshot
.
Logging
outputRequestLog :: Debuggee -> IO () Source #