Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
Synopsis
- prettyWarningName :: MonadPretty m => WarningName -> m Doc
- prettyWarning :: MonadPretty m => Warning -> m Doc
- prettyRecordFieldWarning :: MonadPretty m => RecordFieldWarning -> m Doc
- prettyDuplicateFields :: MonadPretty m => [Name] -> m Doc
- prettyTooManyFields :: MonadPretty m => QName -> [Name] -> [Name] -> m Doc
- prettyNotInScopeNames :: (MonadPretty m, Pretty a, HasRange a) => Bool -> (a -> m Doc) -> [a] -> m Doc
- didYouMean :: (MonadPretty m, Pretty a, Pretty b) => [QName] -> (a -> b) -> a -> Maybe (m Doc)
- prettyTCWarnings :: [TCWarning] -> TCM String
- renderTCWarnings' :: [TCWarning] -> TCM [String]
- prettyTCWarnings' :: [TCWarning] -> TCM [Doc]
- filterTCWarnings :: [TCWarning] -> [TCWarning]
- tcWarningsToError :: [TCWarning] -> TCM ()
- applyFlagsToTCWarningsPreserving :: HasOptions m => Set WarningName -> [TCWarning] -> m [TCWarning]
- applyFlagsToTCWarnings :: HasOptions m => [TCWarning] -> m [TCWarning]
- isBoundaryConstraint :: (ReadTCState m, MonadTCM m) => ProblemConstraint -> m (Maybe Range)
- getAllUnsolvedWarnings :: (MonadFail m, ReadTCState m, MonadWarning m, MonadTCM m) => m [TCWarning]
- getAllWarnings :: (MonadFail m, ReadTCState m, MonadWarning m, MonadTCM m) => WhichWarnings -> m [TCWarning]
- getAllWarningsPreserving :: (MonadFail m, ReadTCState m, MonadWarning m, MonadTCM m) => Set WarningName -> WhichWarnings -> m [TCWarning]
- getAllWarningsOfTCErr :: TCErr -> TCM [TCWarning]
Documentation
prettyWarningName :: MonadPretty m => WarningName -> m Doc Source #
Prefix for a warning text showing name of the warning.
E.g. warning: -W[no]warning_name
prettyWarning :: MonadPretty m => Warning -> m Doc Source #
prettyRecordFieldWarning :: MonadPretty m => RecordFieldWarning -> m Doc Source #
prettyDuplicateFields :: MonadPretty m => [Name] -> m Doc Source #
prettyTooManyFields :: MonadPretty m => QName -> [Name] -> [Name] -> m Doc Source #
prettyNotInScopeNames Source #
:: (MonadPretty m, Pretty a, HasRange a) | |
=> Bool | Print range? |
-> (a -> m Doc) | Correction suggestion generator. |
-> [a] | Names that are not in scope. |
-> m Doc |
Report a number of names that are not in scope.
:: (MonadPretty m, Pretty a, Pretty b) | |
=> [QName] | Names in scope. |
-> (a -> b) | Canonization function for similarity search. |
-> a | A name which is not in scope. |
-> Maybe (m Doc) | "did you mean" hint. |
Suggest some corrections to a misspelled name.
prettyTCWarnings :: [TCWarning] -> TCM String Source #
renderTCWarnings' :: [TCWarning] -> TCM [String] Source #
filterTCWarnings :: [TCWarning] -> [TCWarning] Source #
If there are several warnings, remove the unsolved-constraints warning in case there are no interesting constraints to list.
tcWarningsToError :: [TCWarning] -> TCM () Source #
Turns warnings, if any, into errors.
applyFlagsToTCWarningsPreserving :: HasOptions m => Set WarningName -> [TCWarning] -> m [TCWarning] Source #
Depending which flags are set, one may happily ignore some warnings.
applyFlagsToTCWarnings :: HasOptions m => [TCWarning] -> m [TCWarning] Source #
isBoundaryConstraint :: (ReadTCState m, MonadTCM m) => ProblemConstraint -> m (Maybe Range) Source #
getAllUnsolvedWarnings :: (MonadFail m, ReadTCState m, MonadWarning m, MonadTCM m) => m [TCWarning] Source #
getAllWarnings :: (MonadFail m, ReadTCState m, MonadWarning m, MonadTCM m) => WhichWarnings -> m [TCWarning] Source #
Collect all warnings that have accumulated in the state.
getAllWarningsPreserving :: (MonadFail m, ReadTCState m, MonadWarning m, MonadTCM m) => Set WarningName -> WhichWarnings -> m [TCWarning] Source #