Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
Synopsis
- data BooleanMismatch
- data ExistentialMismatch
- data TypeError v loc
- = Mismatch {
- foundType :: Type v loc
- expectedType :: Type v loc
- foundLeaf :: Type v loc
- expectedLeaf :: Type v loc
- mismatchSite :: Term v loc
- note :: ErrorNote v loc
- | BooleanMismatch {
- getBooleanMismatch :: BooleanMismatch
- mismatchSite :: Term v loc
- foundType :: Type v loc
- note :: ErrorNote v loc
- | ExistentialMismatch {
- getExistentialMismatch :: ExistentialMismatch
- expectedType :: Type v loc
- expectedLoc :: loc
- foundType :: Type v loc
- mismatchSite :: Term v loc
- note :: ErrorNote v loc
- | FunctionApplication { }
- | NotFunctionApplication { }
- | AbilityCheckFailure { }
- | AbilityEqFailure { }
- | AbilityEqFailureFromAp { }
- | UnguardedLetRecCycle { }
- | UnknownType {
- unknownTypeV :: v
- typeSite :: loc
- note :: ErrorNote v loc
- | UnknownTerm {
- unknownTermV :: v
- termSite :: loc
- suggestions :: [Suggestion v loc]
- expectedType :: Type v loc
- note :: ErrorNote v loc
- | DuplicateDefinitions { }
- | UncoveredPatterns loc (NonEmpty (Pattern ()))
- | RedundantPattern loc
- | KindInferenceFailure (KindError v loc)
- | Other (ErrorNote v loc)
- = Mismatch {
- type RedundantTypeAnnotation = Bool
- data TypeInfo v loc = TopLevelComponent {
- definitions :: [(v, Type v loc, RedundantTypeAnnotation)]
- type TypeNote v loc = Either (TypeError v loc) (TypeInfo v loc)
- typeErrorFromNote :: (Ord loc, Show loc, Var v) => ErrorNote v loc -> TypeError v loc
- typeInfoFromNote :: (Ord loc, Show loc, Var v) => InfoNote v loc -> Maybe (TypeInfo v loc)
- allErrors :: (Var v, Ord loc) => ErrorExtractor v loc (TypeError v loc)
- topLevelComponent :: InfoExtractor v a (TypeInfo v a)
- redundantPattern :: ErrorExtractor v a (TypeError v a)
- kindInferenceFailure :: ErrorExtractor v a (TypeError v a)
- uncoveredPatterns :: ErrorExtractor v a (TypeError v a)
- abilityCheckFailure :: ErrorExtractor v a (TypeError v a)
- abilityEqFailure :: ErrorExtractor v a (TypeError v a)
- duplicateDefinitions :: ErrorExtractor v a (TypeError v a)
- unknownType :: ErrorExtractor v loc (TypeError v loc)
- unknownTerm :: Var v => ErrorExtractor v loc (TypeError v loc)
- generalMismatch :: (Var v, Ord loc) => ErrorExtractor v loc (TypeError v loc)
- and :: (Var v, Ord loc) => ErrorExtractor v loc (TypeError v loc)
- or :: (Var v, Ord loc) => ErrorExtractor v loc (TypeError v loc)
- cond :: (Var v, Ord loc) => ErrorExtractor v loc (TypeError v loc)
- matchGuard :: (Var v, Ord loc) => ErrorExtractor v loc (TypeError v loc)
- unguardedCycle :: ErrorExtractor v loc (TypeError v loc)
- booleanMismatch0 :: (Var v, Ord loc) => BooleanMismatch -> SubseqExtractor v loc () -> ErrorExtractor v loc (TypeError v loc)
- existentialMismatch0 :: (Var v, Ord loc) => ExistentialMismatch -> SubseqExtractor v loc loc -> ErrorExtractor v loc (TypeError v loc)
- ifBody :: (Var v, Ord loc) => ErrorExtractor v loc (TypeError v loc)
- listBody :: (Var v, Ord loc) => ErrorExtractor v loc (TypeError v loc)
- matchBody :: (Var v, Ord loc) => ErrorExtractor v loc (TypeError v loc)
- applyingNonFunction :: Var v => ErrorExtractor v loc (TypeError v loc)
- applyingFunction :: forall v loc. Var v => ErrorExtractor v loc (TypeError v loc)
- inSubtypes :: SubseqExtractor v loc (Type v loc, Type v loc, Maybe (Type v loc, Type v loc))
Documentation
data BooleanMismatch Source #
Instances
Show BooleanMismatch Source # | |
Defined in Unison.Typechecker.TypeError showsPrec :: Int -> BooleanMismatch -> ShowS # show :: BooleanMismatch -> String # showList :: [BooleanMismatch] -> ShowS # |
data ExistentialMismatch Source #
Instances
Show ExistentialMismatch Source # | |
Defined in Unison.Typechecker.TypeError showsPrec :: Int -> ExistentialMismatch -> ShowS # show :: ExistentialMismatch -> String # showList :: [ExistentialMismatch] -> ShowS # |
Mismatch | |
| |
BooleanMismatch | |
| |
ExistentialMismatch | |
| |
FunctionApplication | |
NotFunctionApplication | |
AbilityCheckFailure | |
AbilityEqFailure | |
AbilityEqFailureFromAp | |
UnguardedLetRecCycle | |
UnknownType | |
| |
UnknownTerm | |
| |
DuplicateDefinitions | |
UncoveredPatterns loc (NonEmpty (Pattern ())) | |
RedundantPattern loc | |
KindInferenceFailure (KindError v loc) | |
Other (ErrorNote v loc) |
type RedundantTypeAnnotation = Bool Source #
TopLevelComponent | |
|
topLevelComponent :: InfoExtractor v a (TypeInfo v a) Source #
redundantPattern :: ErrorExtractor v a (TypeError v a) Source #
kindInferenceFailure :: ErrorExtractor v a (TypeError v a) Source #
uncoveredPatterns :: ErrorExtractor v a (TypeError v a) Source #
abilityCheckFailure :: ErrorExtractor v a (TypeError v a) Source #
abilityEqFailure :: ErrorExtractor v a (TypeError v a) Source #
duplicateDefinitions :: ErrorExtractor v a (TypeError v a) Source #
unknownType :: ErrorExtractor v loc (TypeError v loc) Source #
unknownTerm :: Var v => ErrorExtractor v loc (TypeError v loc) Source #
generalMismatch :: (Var v, Ord loc) => ErrorExtractor v loc (TypeError v loc) Source #
matchGuard :: (Var v, Ord loc) => ErrorExtractor v loc (TypeError v loc) Source #
unguardedCycle :: ErrorExtractor v loc (TypeError v loc) Source #
booleanMismatch0 :: (Var v, Ord loc) => BooleanMismatch -> SubseqExtractor v loc () -> ErrorExtractor v loc (TypeError v loc) Source #
existentialMismatch0 :: (Var v, Ord loc) => ExistentialMismatch -> SubseqExtractor v loc loc -> ErrorExtractor v loc (TypeError v loc) Source #
applyingNonFunction :: Var v => ErrorExtractor v loc (TypeError v loc) Source #
applyingFunction :: forall v loc. Var v => ErrorExtractor v loc (TypeError v loc) Source #
Want to collect this info:
The n
th argument to $sel:f:Mismatch
is $sel:foundType:Mismatch
, but I was expecting $sel:expectedType:Mismatch
.
30 | asdf asdf asdf
If you're curious
$sel:f:Mismatch
has type blah
, where
a
was chosen as A
b
was chosen as B
c
was chosen as C
(many colors / groups)
inSubtypes :: SubseqExtractor v loc (Type v loc, Type v loc, Maybe (Type v loc, Type v loc)) Source #