Safe Haskell | Safe |
---|---|
Language | Haskell2010 |
Synopsis
- cleanupErrors :: [(Range, Error)] -> [(Range, Error)]
- subsumes :: Error -> Error -> Bool
- data Warning
- data Error
- = ErrorMsg Doc
- | KindMismatch Kind Kind
- | TooManyTypeParams Int Kind
- | TyVarWithParams
- | TooManyTySynParams Name Int
- | TooFewTyParams Name Int
- | RecursiveTypeDecls [Name]
- | TypeMismatch Type Type
- | RecursiveType Type Type
- | UnsolvedGoals (Maybe TCErrorMessage) [Goal]
- | UnsolvedDelayedCt DelayedCt
- | UnexpectedTypeWildCard
- | TypeVariableEscaped Type [TParam]
- | NotForAll TVar Type
- | TooManyPositionalTypeParams
- | CannotMixPositionalAndNamedTypeParams
- | UndefinedTypeParameter (Located Ident)
- | RepeatedTypeParameter Ident [Range]
- | AmbiguousSize TVarInfo (Maybe Type)
Documentation
Instances
Various errors that might happen during type checking/inference
ErrorMsg Doc | Just say this |
KindMismatch Kind Kind | Expected kind, inferred kind |
TooManyTypeParams Int Kind | Number of extra parameters, kind of result
(which should not be of the form |
TyVarWithParams | A type variable was applied to some arguments. |
TooManyTySynParams Name Int | Type-synonym, number of extra params |
TooFewTyParams Name Int | Who is missing params, number of missing params |
RecursiveTypeDecls [Name] | The type synonym declarations are recursive |
TypeMismatch Type Type | Expected type, inferred type |
RecursiveType Type Type | Unification results in a recursive type |
UnsolvedGoals (Maybe TCErrorMessage) [Goal] | A constraint that we could not solve
If we have |
UnsolvedDelayedCt DelayedCt | A constraint (with context) that we could not solve |
UnexpectedTypeWildCard | Type wild cards are not allowed in this context (e.g., definitions of type synonyms). |
TypeVariableEscaped Type [TParam] | Unification variable depends on quantified variables that are not in scope. |
NotForAll TVar Type | Quantified type variables (of kind *) need to match the given type, so it does not work for all types. |
TooManyPositionalTypeParams | Too many positional type arguments, in an explicit type instantiation |
CannotMixPositionalAndNamedTypeParams | |
UndefinedTypeParameter (Located Ident) | |
RepeatedTypeParameter Ident [Range] | |
AmbiguousSize TVarInfo (Maybe Type) | Could not determine the value of a numeric type variable, but we know it must be at least as large as the given type (or unconstrained, if Nothing). |