syntax-tree-0.1.0.0: Typed ASTs

Safe HaskellNone
LanguageHaskell2010

AST.Unify.Error

Description

A type for unification errors

Synopsis

Documentation

data UnifyError t k Source #

An error that occurred during unification

Constructors

SkolemUnified (k # t) (k # t)

A universally quantified variable was unified with a different type

SkolemEscape (k # t)

A universally quantified variable escapes its scope

ConstraintsViolation (t k) (TypeConstraintsOf t)

A term violates constraints that should apply to it

Occurs (t k) (t k)

Infinite type encountered. A type occurs within itself

Mismatch (t k) (t k)

Unification between two mismatching type structures

Instances
KNodes t => KNodes (UnifyError t) Source # 
Instance details

Defined in AST.Unify.Error

Associated Types

type KNodesConstraint (UnifyError t) c :: Constraint Source #

data KWitness (UnifyError t) a :: Type Source #

Methods

kLiftConstraint :: KNodesConstraint (UnifyError t) c => KWitness (UnifyError t) n -> Proxy c -> (c n -> r) -> r Source #

KFunctor t => KFunctor (UnifyError t) Source # 
Instance details

Defined in AST.Unify.Error

Methods

mapK :: (forall (n :: Knot -> Type). KWitness (UnifyError t) n -> Tree p n -> Tree q n) -> Tree (UnifyError t) p -> Tree (UnifyError t) q Source #

KFoldable t => KFoldable (UnifyError t) Source # 
Instance details

Defined in AST.Unify.Error

Methods

foldMapK :: Monoid a => (forall (n :: Knot -> Type). KWitness (UnifyError t) n -> Tree p n -> a) -> Tree (UnifyError t) p -> a Source #

KTraversable t => KTraversable (UnifyError t) Source # 
Instance details

Defined in AST.Unify.Error

Methods

sequenceK :: Applicative f => Tree (UnifyError t) (ContainedK f p) -> f (Tree (UnifyError t) p) Source #

Constraints (UnifyError t k) Eq => Eq (UnifyError t k) Source # 
Instance details

Defined in AST.Unify.Error

Methods

(==) :: UnifyError t k -> UnifyError t k -> Bool #

(/=) :: UnifyError t k -> UnifyError t k -> Bool #

Constraints (UnifyError t k) Ord => Ord (UnifyError t k) Source # 
Instance details

Defined in AST.Unify.Error

Methods

compare :: UnifyError t k -> UnifyError t k -> Ordering #

(<) :: UnifyError t k -> UnifyError t k -> Bool #

(<=) :: UnifyError t k -> UnifyError t k -> Bool #

(>) :: UnifyError t k -> UnifyError t k -> Bool #

(>=) :: UnifyError t k -> UnifyError t k -> Bool #

max :: UnifyError t k -> UnifyError t k -> UnifyError t k #

min :: UnifyError t k -> UnifyError t k -> UnifyError t k #

Constraints (UnifyError t k) Show => Show (UnifyError t k) Source # 
Instance details

Defined in AST.Unify.Error

Methods

showsPrec :: Int -> UnifyError t k -> ShowS #

show :: UnifyError t k -> String #

showList :: [UnifyError t k] -> ShowS #

Generic (UnifyError t k) Source # 
Instance details

Defined in AST.Unify.Error

Associated Types

type Rep (UnifyError t k) :: Type -> Type #

Methods

from :: UnifyError t k -> Rep (UnifyError t k) x #

to :: Rep (UnifyError t k) x -> UnifyError t k #

Constraints (UnifyError t k) Binary => Binary (UnifyError t k) Source # 
Instance details

Defined in AST.Unify.Error

Methods

put :: UnifyError t k -> Put #

get :: Get (UnifyError t k) #

putList :: [UnifyError t k] -> Put #

Constraints (UnifyError t k) NFData => NFData (UnifyError t k) Source # 
Instance details

Defined in AST.Unify.Error

Methods

rnf :: UnifyError t k -> () #

Constraints (UnifyError t k) Pretty => Pretty (UnifyError t k) Source # 
Instance details

Defined in AST.Unify.Error

data KWitness (UnifyError t) n Source # 
Instance details

Defined in AST.Unify.Error

data KWitness (UnifyError t) n where
type KNodesConstraint (UnifyError t) c Source # 
Instance details

Defined in AST.Unify.Error

type Rep (UnifyError t k) Source # 
Instance details

Defined in AST.Unify.Error

_SkolemUnified :: forall t k. Prism' (UnifyError t k) ((#) k t, (#) k t) Source #

_SkolemEscape :: forall t k. Prism' (UnifyError t k) ((#) k t) Source #

_Occurs :: forall t k. Prism' (UnifyError t k) (t k, t k) Source #

_Mismatch :: forall t k. Prism' (UnifyError t k) (t k, t k) Source #