Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
Synopsis
- plugin :: Plugin
- captureVars :: Map String String
- showLev :: ShowLev rep a => a -> String
- fromAscList :: Ord k => [(k, v)] -> Map k v
- printAndWait :: String -> Map String String -> a -> a
- printAndWaitM :: Applicative m => String -> Map String String -> m ()
- printAndWaitIO :: MonadIO m => String -> Map String String -> m ()
- runPrompt :: String -> Map String String -> a -> a
- runPromptM :: Applicative m => String -> Map String String -> m ()
- runPromptIO :: MonadIO m => String -> Map String String -> m ()
- breakpoint :: a -> a
- queryVars :: a -> a
- breakpointM :: Applicative m => m ()
- queryVarsM :: Applicative m => m ()
- breakpointIO :: MonadIO m => m ()
- queryVarsIO :: MonadIO m => m ()
- getSrcLoc :: String
Documentation
captureVars :: Map String String Source #
Constructs a lazy Map
from the names of all visible variables at the call
site to a string representation of their value. Be careful about binding this
to a variable because that variable will also be captured, resulting in an
infinite loop if that element of the Map is evaluated.
fromAscList :: Ord k => [(k, v)] -> Map k v Source #
printAndWaitM :: Applicative m => String -> Map String String -> m () Source #
runPromptM :: Applicative m => String -> Map String String -> m () Source #
breakpoint :: a -> a Source #
Sets a breakpoint in pure code
When evaluated, displays the names of variables visible from the callsite
and starts a prompt where entering a variable will display its value. You
may want to use this instead of breakpoint
if there are value which should
stay unevaluated or you are only interested in certain values. Only the
current thread is blocked while the prompt is active. To resume execution,
press enter with a blank prompt.
breakpointM :: Applicative m => m () Source #
Sets a breakpoint in an arbitrary Applicative
. Uses unsafePerformIO
which means that laziness and common sub-expression elimination can result
in the breakpoint not being hit as expected. For this reason, you should
prefer breakpointIO
if a MonadIO
instance is available.
queryVarsM :: Applicative m => m () Source #
Similar to queryVars
but for use in an arbitrary Applicative
context.
This uses unsafePerformIO
which means that laziness and common sub-expression
elimination can result in unexpected behavior. For this reason you should
prefer queryVarsIO
if a MonadIO
instance is available.
breakpointIO :: MonadIO m => m () Source #
Sets a breakpoint in an IO
based Monad
. You should favor this over
breakpointM
if the monad can perform IO.
queryVarsIO :: MonadIO m => m () Source #
Similar to queryVars
but specialized to an IO
context. You should favor
this over queryVarsM
if a MonadIO
instance is available.