unison-parser-typechecker-0.0.0
Safe HaskellSafe-Inferred
LanguageHaskell2010

Unison.KindInference.Error

Synopsis

Documentation

data KindError v loc Source #

Errors that may arise during kind inference

Constructors

CycleDetected loc (UVar v loc) (ConstraintMap v loc)

A variable is constrained to have an infinite kind

UnexpectedArgument

Something of kind * or Effect is applied to an argument

Fields

  • loc

    src span of abs

  • (UVar v loc)

    abs var

  • (UVar v loc)

    arg var

  • (ConstraintMap v loc)

    context | An arrow kind is applied to a type, but its kind doesn't match the expected argument kind

ArgumentMismatch 

Fields

  • (UVar v loc)

    abs var

  • (UVar v loc)

    expected var

  • (UVar v loc)

    given var

  • (ConstraintMap v loc)

    context | Same as ArgumentMismatch, but for applications to the builtin Arrow type.

ArgumentMismatchArrow 

Fields

EffectListMismatch (ConstraintConflict v loc) (ConstraintMap v loc)

Something appeared in an effect list that isn't of kind Effect

ConstraintConflict

Generic constraint conflict

Fields

Instances

Instances details
Show (KindError v loc) Source # 
Instance details

Defined in Unison.KindInference.Error

Methods

showsPrec :: Int -> KindError v loc -> ShowS #

show :: KindError v loc -> String #

showList :: [KindError v loc] -> ShowS #

lspLoc :: Semigroup loc => KindError v loc -> loc Source #

data ConstraintConflict v loc Source #

Two incompatible constraints on a UVar.

Constructors

ConstraintConflict' 

Fields

improveError :: Var v => KindError v loc -> Solve v loc (KindError v loc) Source #

Transform generic constraint conflicts into more specific error by examining its ConstraintContext.