Safe Haskell | Safe |
---|---|
Language | Haskell98 |
The library itself
- type ErrorPackage = Text
- type ErrorVersion = Text
- type ErrorModule = Text
- type ErrorIdentifier = Text
- type ErrorType = Text
- data ErrorCause
- = UnknownPackage ErrorPackage ErrorVersion
- | UnreferencedPackage ErrorPackage
- | MissingType Text
- | MispelledModule Text [ModuleSuggestion]
- | MispelledIdentifier ErrorIdentifier [IdentifierSuggestion]
- | UselessImport ErrorModule
- | UselessImportElement ErrorModule Text
- | MissingOption Text
- | MissingExtension Text
- | ConstructorImported ErrorModule ErrorType ErrorIdentifier
- | IncorrectCabalVersion Text
- data PackageRef
- data ModuleSuggestion = ModuleSuggestion ErrorPackage ErrorVersion PackageRef ErrorModule
- data IdentifierSuggestion = IdentifierSuggestion ErrorModule ErrorIdentifier
- errorCauses :: Text -> [ErrorCause]
Documentation
type ErrorPackage = Text Source
Simple synonym to indicate package names
type ErrorVersion = Text Source
Simple synonym to indicate package versions
type ErrorModule = Text Source
Simple synonym to indicate module names
type ErrorIdentifier = Text Source
Simple synonym to indicate identifier names
data ErrorCause Source
The possible error causes
UnknownPackage ErrorPackage ErrorVersion | Package referenced in cabal file is unknown, needs to be installed, with the given version (may be -any) |
UnreferencedPackage ErrorPackage | A module from the package is referenced but the package is not in the build depends section of the cabal file |
MissingType Text | The type signature is missing |
MispelledModule Text [ModuleSuggestion] | A module has been mispelled, give suggestions |
MispelledIdentifier ErrorIdentifier [IdentifierSuggestion] | Identifier mispellt |
UselessImport ErrorModule | a full import statement is not needed (or only for instances) |
UselessImportElement ErrorModule Text | an import element is not needed |
MissingOption Text | A GHC option is missing (to add in current source file or in Cabal file) |
MissingExtension Text | An extension is missing (to add in current source file or in Cabal file) |
ConstructorImported ErrorModule ErrorType ErrorIdentifier | A constructor is imported from a module, instead of the type |
IncorrectCabalVersion Text | An incorrect cabal version is used, the proper version range is given in the field |
data PackageRef Source
A package is already referenced in the Cabal file or not
data ModuleSuggestion Source
A suggestion to use a module (present in the given package/version)
data IdentifierSuggestion Source
A suggestion to use an identifier (present in the given module)
errorCauses :: Text -> [ErrorCause] Source
Get the possible causes for a given error message