Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
Synopsis
- class (MonadPretty m, MonadError TCErr m) => MonadWarning m where
- addWarning :: TCWarning -> m ()
- genericWarning :: MonadWarning m => Doc -> m ()
- warning'_ :: MonadWarning m => CallStack -> Warning -> m TCWarning
- warning_ :: (HasCallStack, MonadWarning m) => Warning -> m TCWarning
- warning' :: MonadWarning m => CallStack -> Warning -> m ()
- warning :: (HasCallStack, MonadWarning m) => Warning -> m ()
- warnings :: (HasCallStack, MonadWarning m) => [Warning] -> m ()
- raiseWarningsOnUsage :: (MonadWarning m, ReadTCState m) => QName -> m ()
- isUnsolvedWarning :: Warning -> Bool
- isMetaWarning :: Warning -> Bool
- isMetaTCWarning :: TCWarning -> Bool
- onlyShowIfUnsolved :: Warning -> Bool
- data WhichWarnings
- classifyWarning :: Warning -> WhichWarnings
- data WarningsAndNonFatalErrors
- tcWarnings :: WarningsAndNonFatalErrors -> [TCWarning]
- nonFatalErrors :: WarningsAndNonFatalErrors -> [TCWarning]
- emptyWarningsAndNonFatalErrors :: WarningsAndNonFatalErrors
- classifyWarnings :: [TCWarning] -> WarningsAndNonFatalErrors
- runPM :: PM a -> TCM a
Documentation
class (MonadPretty m, MonadError TCErr m) => MonadWarning m where Source #
Nothing
addWarning :: TCWarning -> m () Source #
Store a warning and generate highlighting from it.
default addWarning :: (MonadWarning n, MonadTrans t, t n ~ m) => TCWarning -> m () Source #
Instances
MonadWarning TCM Source # | |
Defined in Agda.TypeChecking.Warnings addWarning :: TCWarning -> TCM () Source # | |
(PureTCM m, MonadBlock m) => MonadWarning (PureConversionT m) Source # | |
Defined in Agda.TypeChecking.Conversion.Pure addWarning :: TCWarning -> PureConversionT m () Source # | |
MonadWarning m => MonadWarning (ReaderT r m) Source # | |
Defined in Agda.TypeChecking.Warnings addWarning :: TCWarning -> ReaderT r m () Source # | |
MonadWarning m => MonadWarning (StateT s m) Source # | |
Defined in Agda.TypeChecking.Warnings addWarning :: TCWarning -> StateT s m () Source # |
genericWarning :: MonadWarning m => Doc -> m () Source #
warning_ :: (HasCallStack, MonadWarning m) => Warning -> m TCWarning Source #
warning :: (HasCallStack, MonadWarning m) => Warning -> m () Source #
warnings :: (HasCallStack, MonadWarning m) => [Warning] -> m () Source #
raiseWarningsOnUsage :: (MonadWarning m, ReadTCState m) => QName -> m () Source #
Raise every WARNING_ON_USAGE
connected to a name.
isUnsolvedWarning :: Warning -> Bool Source #
isMetaWarning :: Warning -> Bool Source #
isMetaTCWarning :: TCWarning -> Bool Source #
onlyShowIfUnsolved :: Warning -> Bool Source #
data WhichWarnings Source #
Classifying warnings: some are benign, others are (non-fatal) errors
ErrorWarnings | warnings that will be turned into errors |
AllWarnings | all warnings, including errors and benign ones Note: order of constructors is important for the derived Ord instance |
Instances
Eq WhichWarnings Source # | |
Defined in Agda.TypeChecking.Warnings (==) :: WhichWarnings -> WhichWarnings -> Bool (/=) :: WhichWarnings -> WhichWarnings -> Bool | |
Ord WhichWarnings Source # | |
Defined in Agda.TypeChecking.Warnings compare :: WhichWarnings -> WhichWarnings -> Ordering (<) :: WhichWarnings -> WhichWarnings -> Bool (<=) :: WhichWarnings -> WhichWarnings -> Bool (>) :: WhichWarnings -> WhichWarnings -> Bool (>=) :: WhichWarnings -> WhichWarnings -> Bool max :: WhichWarnings -> WhichWarnings -> WhichWarnings min :: WhichWarnings -> WhichWarnings -> WhichWarnings |
data WarningsAndNonFatalErrors Source #
Assorted warnings and errors to be displayed to the user
emptyWarningsAndNonFatalErrors :: WarningsAndNonFatalErrors Source #
The only way to construct a empty WarningsAndNonFatalErrors