cryptol-3.0.0: Cryptol: The Language of Cryptography

Safe Haskell | Safe
Language | Haskell2010

Cryptol.TypeCheck.Error

Synopsis

- cleanupErrors :: [(Range, Error)] -> [(Range, Error)]
- subsumes :: (Range, Error) -> (Range, Error) -> Bool
- data Warning
  - = DefaultingKind (TParam Name) Kind
  - | DefaultingWildType Kind
  - | DefaultingTo !TVarInfo Type
  - | NonExhaustivePropGuards Name
- data Error
  - = KindMismatch (Maybe TypeSource) Kind Kind
  - | TooManyTypeParams Int Kind
  - | TyVarWithParams
  - | TooManyTySynParams Name Int
  - | TooFewTyParams Name Int
  - | RecursiveTypeDecls [Name]
  - | TypeMismatch TypeSource Path Type Type
  - | SchemaMismatch Ident Schema Schema
  - | RecursiveType TypeSource Path Type Type
  - | UnsolvedGoals [Goal]
  - | UnsolvableGoals [Goal]
  - | UnsolvedDelayedCt DelayedCt
  - | UnexpectedTypeWildCard
  - | TypeVariableEscaped TypeSource Path Type [TParam]
  - | NotForAll TypeSource Path TVar Type
  - | TooManyPositionalTypeParams
  - | BadParameterKind TParam Kind
  - | CannotMixPositionalAndNamedTypeParams
  - | UndefinedTypeParameter (Located Ident)
  - | RepeatedTypeParameter Ident [Range]
  - | AmbiguousSize TVarInfo (Maybe Type)
  - | BareTypeApp
  - | UndefinedExistVar Name
  - | TypeShadowing String Name String
  - | MissingModTParam (Located Ident)
  - | MissingModVParam (Located Ident)
  - | MissingModParam Ident
  - | FunctorInstanceMissingArgument Ident
  - | FunctorInstanceBadArgument Ident
  - | FunctorInstanceMissingName Namespace Ident
  - | FunctorInstanceBadBacktick BadBacktickInstance
  - | UnsupportedFFIKind TypeSource TParam Kind
  - | UnsupportedFFIType TypeSource FFITypeError
  - | NestedConstraintGuard Ident
  - | DeclarationRequiresSignatureCtrGrd Ident
  - | InvalidConstraintGuard Prop
  - | TemporaryError Doc
- data BadBacktickInstance
  - = BIPolymorphicArgument Ident Ident
  - | BINested [(BIWhat, Name)]
  - | BIMultipleParams Ident
- data BIWhat
  - = BIFunctor
  - | BIInterface
  - | BIPrimitive
  - | BIForeign
  - | BIAbstractType
- errorImportance :: Error -> Int
- explainUnsolvable :: NameMap -> [Goal] -> Doc
- computeFreeVarNames :: [(Range, Warning)] -> [(Range, Error)] -> NameMap

# Documentation

cleanupErrors :: [(Range, Error)] -> [(Range, Error)] Source #

subsumes :: (Range, Error) -> (Range, Error) -> Bool Source #

Should the first error suppress the next one.

data Warning Source #

Constructors

DefaultingKind (TParam Name) Kind |
DefaultingWildType Kind |
DefaultingTo !TVarInfo Type |
NonExhaustivePropGuards Name |

#### Instances

Instances details

Generic Warning Source # |
Instance details Defined in Cryptol.TypeCheck.Error Associated Types type Rep Warning :: Type -> Type Source # Methods from :: Warning -> Rep Warning x Source # to :: Rep Warning x -> Warning Source #
Show Warning Source # |
Instance details Defined in Cryptol.TypeCheck.Error Methods showsPrec :: Int -> Warning -> ShowS Source # show :: Warning -> String Source # showList :: [Warning] -> ShowS Source #
TVars Warning Source # |
Instance details Defined in Cryptol.TypeCheck.Error Methods apSubst :: Subst -> Warning -> Warning Source #
FVS Warning Source # |
Instance details Defined in Cryptol.TypeCheck.Error Methods fvs :: Warning -> Set TVar Source #
PP Warning Source # |
Instance details Defined in Cryptol.TypeCheck.Error Methods ppPrec :: Int -> Warning -> Doc Source #
NFData Warning Source # |
Instance details Defined in Cryptol.TypeCheck.Error Methods rnf :: Warning -> () Source #
PP (WithNames Warning) Source # |
Instance details Defined in Cryptol.TypeCheck.Error Methods ppPrec :: Int -> WithNames Warning -> Doc Source #
type Rep Warning Source # |

Instance details

Defined in Cryptol.TypeCheck.Error

type Rep Warning = D1 ('MetaData "Warning" "Cryptol.TypeCheck.Error" "cryptol-3.0.0-DBVDUAjB1JeD0WzkHH4ckn" 'False) ((C1 ('MetaCons "DefaultingKind" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (TParam Name)) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Kind)) :+: C1 ('MetaCons "DefaultingWildType" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Kind))) :+: (C1 ('MetaCons "DefaultingTo" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 TVarInfo) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Type)) :+: C1 ('MetaCons "NonExhaustivePropGuards" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Name))))

data Error Source #

Various errors that might happen during type checking/inference

Constructors

KindMismatch (Maybe TypeSource) 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 TypeSource Path Type Type | Expected type, inferred type
SchemaMismatch Ident Schema Schema | Name of module parameter, expected scehema, actual schema. This may happen when instantiating modules.
RecursiveType TypeSource Path Type Type | Unification results in a recursive type
UnsolvedGoals [Goal] | A constraint that we could not solve, usually because there are some left-over variables that we could not infer.
UnsolvableGoals [Goal] | A constraint that we could not solve and we know it is impossible to do it.
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 TypeSource Path Type [TParam] | Unification variable depends on quantified variables that are not in scope.
NotForAll TypeSource Path 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
BadParameterKind TParam Kind | Kind other than `*` or `#` given to parameter of type synonym, newtype, function signature, etc.
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).
BareTypeApp | Bare expression of the form `{_}
UndefinedExistVar Name |
TypeShadowing String Name String |
MissingModTParam (Located Ident) |
MissingModVParam (Located Ident) |
MissingModParam Ident |
FunctorInstanceMissingArgument Ident |
FunctorInstanceBadArgument Ident |
FunctorInstanceMissingName Namespace Ident |
FunctorInstanceBadBacktick BadBacktickInstance |
UnsupportedFFIKind TypeSource TParam Kind | Kind is not supported for FFI
UnsupportedFFIType TypeSource FFITypeError | Type is not supported for FFI
NestedConstraintGuard Ident | Constraint guards may only apper at the top-level
DeclarationRequiresSignatureCtrGrd Ident | All declarataions in a recursive group involving constraint guards should have signatures
InvalidConstraintGuard Prop | The given constraint may not be used as a constraint guard
TemporaryError Doc | This is for errors that don't fit other cateogories. We should not use it much, and is generally to be used for transient errors, which are due to incomplete implementation.

#### Instances

Instances details

Generic Error Source # |
Instance details Defined in Cryptol.TypeCheck.Error Associated Types type Rep Error :: Type -> Type Source # Methods from :: Error -> Rep Error x Source # to :: Rep Error x -> Error Source #
Show Error Source # |
Instance details Defined in Cryptol.TypeCheck.Error Methods showsPrec :: Int -> Error -> ShowS Source # show :: Error -> String Source # showList :: [Error] -> ShowS Source #
TVars Error Source # |
Instance details Defined in Cryptol.TypeCheck.Error Methods apSubst :: Subst -> Error -> Error Source #
FVS Error Source # |
Instance details Defined in Cryptol.TypeCheck.Error Methods fvs :: Error -> Set TVar Source #
PP Error Source # |
Instance details Defined in Cryptol.TypeCheck.Error Methods ppPrec :: Int -> Error -> Doc Source #
NFData Error Source # |
Instance details Defined in Cryptol.TypeCheck.Error Methods rnf :: Error -> () Source #
PP (WithNames Error) Source # |
Instance details Defined in Cryptol.TypeCheck.Error Methods ppPrec :: Int -> WithNames Error -> Doc Source #
type Rep Error Source # |

Instance details

Defined in Cryptol.TypeCheck.Error

type Rep Error = D1 ('MetaData "Error" "Cryptol.TypeCheck.Error" "cryptol-3.0.0-DBVDUAjB1JeD0WzkHH4ckn" 'False) (((((C1 ('MetaCons "KindMismatch" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe TypeSource)) :*: (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Kind) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Kind))) :+: C1 ('MetaCons "TooManyTypeParams" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Int) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Kind))) :+: (C1 ('MetaCons "TyVarWithParams" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "TooManyTySynParams" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Name) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Int)))) :+: ((C1 ('MetaCons "TooFewTyParams" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Name) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Int)) :+: C1 ('MetaCons "RecursiveTypeDecls" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 [Name]))) :+: (C1 ('MetaCons "TypeMismatch" 'PrefixI 'False) ((S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 TypeSource) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Path)) :*: (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Type) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Type))) :+: (C1 ('MetaCons "SchemaMismatch" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Ident) :*: (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Schema) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Schema))) :+: C1 ('MetaCons "RecursiveType" 'PrefixI 'False) ((S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 TypeSource) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Path)) :*: (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Type) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Type))))))) :+: (((C1 ('MetaCons "UnsolvedGoals" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 [Goal])) :+: C1 ('MetaCons "UnsolvableGoals" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 [Goal]))) :+: (C1 ('MetaCons "UnsolvedDelayedCt" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 DelayedCt)) :+: C1 ('MetaCons "UnexpectedTypeWildCard" 'PrefixI 'False) (U1 :: Type -> Type))) :+: ((C1 ('MetaCons "TypeVariableEscaped" 'PrefixI 'False) ((S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 TypeSource) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Path)) :*: (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Type) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 [TParam]))) :+: C1 ('MetaCons "NotForAll" 'PrefixI 'False) ((S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 TypeSource) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Path)) :*: (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 TVar) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Type)))) :+: (C1 ('MetaCons "TooManyPositionalTypeParams" 'PrefixI 'False) (U1 :: Type -> Type) :+: (C1 ('MetaCons "BadParameterKind" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 TParam) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Kind)) :+: C1 ('MetaCons "CannotMixPositionalAndNamedTypeParams" 'PrefixI 'False) (U1 :: Type -> Type)))))) :+: ((((C1 ('MetaCons "UndefinedTypeParameter" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Located Ident))) :+: C1 ('MetaCons "RepeatedTypeParameter" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Ident) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 [Range]))) :+: (C1 ('MetaCons "AmbiguousSize" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 TVarInfo) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe Type))) :+: C1 ('MetaCons "BareTypeApp" 'PrefixI 'False) (U1 :: Type -> Type))) :+: ((C1 ('MetaCons "UndefinedExistVar" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Name)) :+: C1 ('MetaCons "TypeShadowing" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 String) :*: (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Name) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 String)))) :+: (C1 ('MetaCons "MissingModTParam" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Located Ident))) :+: (C1 ('MetaCons "MissingModVParam" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Located Ident))) :+: C1 ('MetaCons "MissingModParam" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Ident)))))) :+: (((C1 ('MetaCons "FunctorInstanceMissingArgument" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Ident)) :+: C1 ('MetaCons "FunctorInstanceBadArgument" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Ident))) :+: (C1 ('MetaCons "FunctorInstanceMissingName" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Namespace) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Ident)) :+: (C1 ('MetaCons "FunctorInstanceBadBacktick" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 BadBacktickInstance)) :+: C1 ('MetaCons "UnsupportedFFIKind" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 TypeSource) :*: (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 TParam) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Kind)))))) :+: ((C1 ('MetaCons "UnsupportedFFIType" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 TypeSource) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 FFITypeError)) :+: C1 ('MetaCons "NestedConstraintGuard" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Ident))) :+: (C1 ('MetaCons "DeclarationRequiresSignatureCtrGrd" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Ident)) :+: (C1 ('MetaCons "InvalidConstraintGuard" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Prop)) :+: C1 ('MetaCons "TemporaryError" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Doc))))))))

data BadBacktickInstance Source #

Constructors

BIPolymorphicArgument Ident Ident |
BINested [(BIWhat, Name)] |
BIMultipleParams Ident |

#### Instances

Instances details

Generic BadBacktickInstance Source # |
Instance details Defined in Cryptol.TypeCheck.Error Associated Types type Rep BadBacktickInstance :: Type -> Type Source # Methods from :: BadBacktickInstance -> Rep BadBacktickInstance x Source # to :: Rep BadBacktickInstance x -> BadBacktickInstance Source #
Show BadBacktickInstance Source # |
Instance details Defined in Cryptol.TypeCheck.Error Methods showsPrec :: Int -> BadBacktickInstance -> ShowS Source # show :: BadBacktickInstance -> String Source # showList :: [BadBacktickInstance] -> ShowS Source #
NFData BadBacktickInstance Source # |
Instance details Defined in Cryptol.TypeCheck.Error Methods rnf :: BadBacktickInstance -> () Source #
type Rep BadBacktickInstance Source # |

Instance details

Defined in Cryptol.TypeCheck.Error

type Rep BadBacktickInstance = D1 ('MetaData "BadBacktickInstance" "Cryptol.TypeCheck.Error" "cryptol-3.0.0-DBVDUAjB1JeD0WzkHH4ckn" 'False) (C1 ('MetaCons "BIPolymorphicArgument" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Ident) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Ident)) :+: (C1 ('MetaCons "BINested" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 [(BIWhat, Name)])) :+: C1 ('MetaCons "BIMultipleParams" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Ident))))

data BIWhat Source #

Constructors

BIFunctor |
BIInterface |
BIPrimitive |
BIForeign |
BIAbstractType |

#### Instances

Instances details

Generic BIWhat Source # |
Instance details Defined in Cryptol.TypeCheck.Error Associated Types type Rep BIWhat :: Type -> Type Source # Methods from :: BIWhat -> Rep BIWhat x Source # to :: Rep BIWhat x -> BIWhat Source #
Show BIWhat Source # |
Instance details Defined in Cryptol.TypeCheck.Error Methods showsPrec :: Int -> BIWhat -> ShowS Source # show :: BIWhat -> String Source # showList :: [BIWhat] -> ShowS Source #
NFData BIWhat Source # |
Instance details Defined in Cryptol.TypeCheck.Error Methods rnf :: BIWhat -> () Source #
type Rep BIWhat Source # |

Instance details

Defined in Cryptol.TypeCheck.Error

type Rep BIWhat = D1 ('MetaData "BIWhat" "Cryptol.TypeCheck.Error" "cryptol-3.0.0-DBVDUAjB1JeD0WzkHH4ckn" 'False) ((C1 ('MetaCons "BIFunctor" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "BIInterface" 'PrefixI 'False) (U1 :: Type -> Type)) :+: (C1 ('MetaCons "BIPrimitive" 'PrefixI 'False) (U1 :: Type -> Type) :+: (C1 ('MetaCons "BIForeign" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "BIAbstractType" 'PrefixI 'False) (U1 :: Type -> Type))))

errorImportance :: Error -> Int Source #

When we have multiple errors on the same location, we show only the ones with the has highest rating according to this function.

explainUnsolvable :: NameMap -> [Goal] -> Doc Source #

computeFreeVarNames :: [(Range, Warning)] -> [(Range, Error)] -> NameMap Source #

This picks the names to use when showing errors and warnings.