glam
Safe HaskellSafe-Inferred
LanguageHaskell2010

Glam.Rules.Type

Description

The rules for checking types.

Synopsis

Documentation

data TVarBinding Source #

Things a type variable can refer to

Constructors

Syn [TVar] Type

A type synonym (with a list of arguments)

Self

A fixed point

Fields

Bound

Anything else

guard :: Guardedness -> Guardedness Source #

Going under a

checkType :: MonadCheckType m => Type -> m (Type, First TVar) Source #

Check that a type is well-formed and expand type synonyms. This handles desugaring recursive uses of type synonyms to fixed points: if the current type synonym is used (and applied to the same arguments), the second return value contains the fixed point variable to abstract over.

checkPolytype :: MonadCheckType m => Polytype -> m Polytype Source #

Check a polytype

checkTypeSynonym :: MonadCheckType m => TVar -> [TVar] -> Type -> m Type Source #

Check a type synonym definition