Safe Haskell | None |
---|---|
Language | Haskell2010 |
Synopsis
- interestingCall :: Call -> Bool
- class (MonadTCEnv m, ReadTCState m) => MonadTrace m where
- traceCall :: Call -> m a -> m a
- traceCallM :: m Call -> m a -> m a
- traceCallCPS :: Call -> ((a -> m b) -> m b) -> (a -> m b) -> m b
- traceClosureCall :: Closure Call -> m a -> m a
- printHighlightingInfo :: RemoveTokenBasedHighlighting -> HighlightingInfo -> m ()
- getCurrentRange :: MonadTCEnv m => m Range
- setCurrentRange :: (MonadTrace m, HasRange x) => x -> m a -> m a
- highlightAsTypeChecked :: MonadTrace m => Range -> Range -> m a -> m a
Trace
interestingCall :: Call -> Bool Source #
class (MonadTCEnv m, ReadTCState m) => MonadTrace m where Source #
traceCall :: Call -> m a -> m a Source #
Record a function call in the trace.
traceCallM :: m Call -> m a -> m a Source #
traceCallCPS :: Call -> ((a -> m b) -> m b) -> (a -> m b) -> m b Source #
Reset envCall
to previous value in the continuation.
Caveat: if the last traceCall
did not set an interestingCall
,
for example, only set the Range
with SetRange
,
we will revert to the last interesting call.
traceClosureCall :: Closure Call -> m a -> m a Source #
printHighlightingInfo :: RemoveTokenBasedHighlighting -> HighlightingInfo -> m () Source #
Lispify and print the given highlighting information.
default printHighlightingInfo :: (MonadTrans t, MonadTrace n, t n ~ m) => RemoveTokenBasedHighlighting -> HighlightingInfo -> m () Source #
Instances
getCurrentRange :: MonadTCEnv m => m Range Source #
setCurrentRange :: (MonadTrace m, HasRange x) => x -> m a -> m a Source #
Sets the current range (for error messages etc.) to the range
of the given object, if it has a range (i.e., its range is not noRange
).
highlightAsTypeChecked Source #
:: MonadTrace m | |
=> Range | rPre |
-> Range | r |
-> m a | |
-> m a |
highlightAsTypeChecked rPre r m
runs m
and returns its
result. Additionally, some code may be highlighted:
- If
r
is non-empty and not a sub-range ofrPre
(aftercontinuousPerLine
has been applied to both):r
is highlighted as being type-checked whilem
is running (this highlighting is removed ifm
completes successfully). - Otherwise: Highlighting is removed for
rPre - r
beforem
runs, and ifm
completes successfully, thenrPre - r
is highlighted as being type-checked.