| Safe Haskell | None |
|---|---|
| Language | Haskell2010 |
Agda.TypeChecking.Monad.Trace
Contents
Synopsis
- interestingCall :: Call -> Bool
- class (MonadTCEnv m, ReadTCState m) => MonadTrace (m :: Type -> Type) 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 ()
- traceCallCPS' :: MonadTrace m => Call -> (m b -> m b) -> m b -> m b
- getCurrentRange :: MonadTCEnv m => m Range
- setCurrentRange :: (MonadTrace m, HasRange x) => x -> m a -> m a
- highlightAsTypeChecked :: MonadTrace m => Range -> Range -> m a -> m a
- runPM :: PM a -> TCM a
- runPMDropWarnings :: PM a -> TCM a
Trace
interestingCall :: Call -> Bool Source #
class (MonadTCEnv m, ReadTCState m) => MonadTrace (m :: Type -> Type) where Source #
Minimal complete definition
Methods
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 #
Like traceCall, but resets envCall and the current ranges to the
previous values in the continuation.
traceClosureCall :: Closure Call -> m a -> m a Source #
printHighlightingInfo :: RemoveTokenBasedHighlighting -> HighlightingInfo -> m () Source #
Lispify and print the given highlighting information.
default printHighlightingInfo :: forall (t :: (Type -> Type) -> Type -> Type) (n :: Type -> Type). (MonadTrans t, MonadTrace n, t n ~ m) => RemoveTokenBasedHighlighting -> HighlightingInfo -> m () Source #
Instances
traceCallCPS' :: MonadTrace m => Call -> (m b -> m b) -> m b -> m b Source #
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 #
Arguments
| :: 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
ris non-empty and not a sub-range ofrPre(aftercontinuousPerLinehas been applied to both):ris highlighted as being type-checked whilemis running (this highlighting is removed ifmcompletes successfully). - Otherwise: Highlighting is removed for
rPre - rbeforemruns, and ifmcompletes successfully, thenrPre - ris highlighted as being type-checked.
Warnings in the parser
runPMDropWarnings :: PM a -> TCM a Source #
Running the Parse monad, dropping parser warnings.