Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
Synopsis
- data DeclarationException = DeclarationException {}
- data DeclarationException'
- = MultipleEllipses Pattern
- | InvalidName Name
- | DuplicateDefinition Name
- | DuplicateAnonDeclaration Range
- | MissingWithClauses Name LHS
- | WrongDefinition Name DataRecOrFun DataRecOrFun
- | DeclarationPanic String
- | WrongContentBlock KindOfBlock Range
- | AmbiguousFunClauses LHS (List1 Name)
- | AmbiguousConstructor Range Name [Name]
- | InvalidMeasureMutual Range
- | UnquoteDefRequiresSignature (List1 Name)
- | BadMacroDef NiceDeclaration
- | UnfoldingOutsideOpaque KwRange
- | OpaqueInMutual KwRange
- | DisallowedInterleavedMutual KwRange String (List1 Name)
- data DeclarationWarning = DeclarationWarning {}
- data DeclarationWarning'
- = EmptyAbstract KwRange
- | EmptyConstructor KwRange
- | EmptyField KwRange
- | EmptyGeneralize KwRange
- | EmptyInstance KwRange
- | EmptyMacro KwRange
- | EmptyMutual KwRange
- | EmptyPostulate KwRange
- | EmptyPrivate KwRange
- | EmptyPrimitive KwRange
- | HiddenGeneralize Range
- | InvalidCatchallPragma Range
- | InvalidConstructor Range
- | InvalidConstructorBlock Range
- | InvalidCoverageCheckPragma Range
- | InvalidNoPositivityCheckPragma Range
- | InvalidNoUniverseCheckPragma Range
- | InvalidTerminationCheckPragma Range
- | MissingDeclarations [(Name, Range)]
- | MissingDefinitions [(Name, Range)]
- | NotAllowedInMutual Range String
- | OpenPublicPrivate KwRange
- | OpenPublicAbstract KwRange
- | PolarityPragmasButNotPostulates [Name]
- | PragmaNoTerminationCheck Range
- | PragmaCompiled Range
- | SafeFlagEta Range
- | SafeFlagInjective Range
- | SafeFlagNoCoverageCheck Range
- | SafeFlagNoPositivityCheck Range
- | SafeFlagNoUniverseCheck Range
- | SafeFlagNonTerminating Range
- | SafeFlagPolarity Range
- | SafeFlagTerminating Range
- | ShadowingInTelescope (List1 (Name, List2 Range))
- | UnknownFixityInMixfixDecl [Name]
- | UnknownNamesInFixityDecl [Name]
- | UnknownNamesInPolarityPragmas [Name]
- | UselessAbstract KwRange
- | UselessInstance KwRange
- | UselessMacro KwRange
- | UselessPrivate KwRange
- declarationWarningName :: DeclarationWarning -> WarningName
- declarationWarningName' :: DeclarationWarning' -> WarningName
- unsafeDeclarationWarning :: DeclarationWarning -> Bool
- unsafeDeclarationWarning' :: DeclarationWarning' -> Bool
- unsafePragma :: CMaybe DeclarationWarning' m => Pragma -> m
Documentation
data DeclarationException Source #
Exception with internal source code callstack
Instances
HasRange DeclarationException Source # | |
Defined in Agda.Syntax.Concrete.Definitions.Errors getRange :: DeclarationException -> Range Source # | |
MonadError DeclarationException Nice Source # | |
Defined in Agda.Syntax.Concrete.Definitions.Monad throwError :: DeclarationException -> Nice a # catchError :: Nice a -> (DeclarationException -> Nice a) -> Nice a # |
data DeclarationException' Source #
The exception type.
MultipleEllipses Pattern | |
InvalidName Name | |
DuplicateDefinition Name | |
DuplicateAnonDeclaration Range | |
MissingWithClauses Name LHS | |
WrongDefinition Name DataRecOrFun DataRecOrFun | |
DeclarationPanic String | |
WrongContentBlock KindOfBlock Range | |
AmbiguousFunClauses LHS (List1 Name) | In a mutual block, a clause could belong to any of the ≥2 type signatures ( |
AmbiguousConstructor Range Name [Name] | In an interleaved mutual block, a constructor could belong to any of the data signatures ( |
InvalidMeasureMutual Range | In a mutual block, all or none need a MEASURE pragma.
|
UnquoteDefRequiresSignature (List1 Name) | |
BadMacroDef NiceDeclaration | |
UnfoldingOutsideOpaque KwRange | An unfolding declaration was not the first declaration contained in an opaque block. |
OpaqueInMutual KwRange |
|
DisallowedInterleavedMutual KwRange String (List1 Name) | A declaration that breaks an implicit mutual block (named by the String argument) was present while the given lone type signatures were still without their definitions. |
Instances
Pretty DeclarationException' Source # | |
Defined in Agda.Syntax.Concrete.Definitions.Errors pretty :: DeclarationException' -> Doc Source # prettyPrec :: Int -> DeclarationException' -> Doc Source # prettyList :: [DeclarationException'] -> Doc Source # | |
HasRange DeclarationException' Source # | |
Defined in Agda.Syntax.Concrete.Definitions.Errors | |
Show DeclarationException' Source # | |
Defined in Agda.Syntax.Concrete.Definitions.Errors showsPrec :: Int -> DeclarationException' -> ShowS # show :: DeclarationException' -> String # showList :: [DeclarationException'] -> ShowS # |
data DeclarationWarning Source #
Instances
data DeclarationWarning' Source #
Non-fatal errors encountered in the Nicifier.
EmptyAbstract KwRange | Empty |
EmptyConstructor KwRange | Empty |
EmptyField KwRange | Empty |
EmptyGeneralize KwRange | Empty |
EmptyInstance KwRange | Empty |
EmptyMacro KwRange | Empty |
EmptyMutual KwRange | Empty |
EmptyPostulate KwRange | Empty |
EmptyPrivate KwRange | Empty |
EmptyPrimitive KwRange | Empty |
HiddenGeneralize Range | A |
InvalidCatchallPragma Range | A {-# CATCHALL #-} pragma that does not precede a function clause. |
InvalidConstructor Range | Invalid definition in a constructor block |
InvalidConstructorBlock Range | Invalid constructor block (not inside an interleaved mutual block) |
InvalidCoverageCheckPragma Range | A {-# NON_COVERING #-} pragma that does not apply to any function. |
InvalidNoPositivityCheckPragma Range | A {-# NO_POSITIVITY_CHECK #-} pragma that does not apply to any data or record type. |
InvalidNoUniverseCheckPragma Range | A {-# NO_UNIVERSE_CHECK #-} pragma that does not apply to a data or record type. |
InvalidTerminationCheckPragma Range | A {-# TERMINATING #-} and {-# NON_TERMINATING #-} pragma that does not apply to any function. |
MissingDeclarations [(Name, Range)] | Definitions (e.g. constructors or functions) without a declaration. |
MissingDefinitions [(Name, Range)] | Declarations (e.g. type signatures) without a definition. |
NotAllowedInMutual Range String | |
OpenPublicPrivate KwRange |
|
OpenPublicAbstract KwRange |
|
PolarityPragmasButNotPostulates [Name] | |
PragmaNoTerminationCheck Range | Pragma |
PragmaCompiled Range |
|
SafeFlagEta Range |
|
SafeFlagInjective Range |
|
SafeFlagNoCoverageCheck Range |
|
SafeFlagNoPositivityCheck Range |
|
SafeFlagNoUniverseCheck Range |
|
SafeFlagNonTerminating Range |
|
SafeFlagPolarity Range |
|
SafeFlagTerminating Range |
|
ShadowingInTelescope (List1 (Name, List2 Range)) | |
UnknownFixityInMixfixDecl [Name] | |
UnknownNamesInFixityDecl [Name] | |
UnknownNamesInPolarityPragmas [Name] | |
UselessAbstract KwRange |
|
UselessInstance KwRange |
|
UselessMacro KwRange |
|
UselessPrivate KwRange |
|
Instances
unsafeDeclarationWarning :: DeclarationWarning -> Bool Source #
Nicifier warnings turned into errors in --safe
mode.
unsafePragma :: CMaybe DeclarationWarning' m => Pragma -> m Source #
Pragmas not allowed in --safe
mode produce an unsafeDeclarationWarning
.