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

Unison.KindInference.Generate

Description

Handles generating kind constraints to be fed to the kind constraint solver (found in Unison.KindInference.Solve).

Synopsis

Documentation

typeConstraints :: (Var v, Ord loc) => UVar v loc -> Type v loc -> Gen v loc [GeneratedConstraint v loc] Source #

Generate kind constraints arising from a given type. The given UVar is constrained to have the kind of the given type.

termConstraints :: forall v loc. (Var v, Ord loc) => Term v loc -> Gen v loc [GeneratedConstraint v loc] Source #

Check that all annotations in a term are well-kinded

declComponentConstraints :: forall v loc. (Var v, Ord loc) => [(Reference, Decl v loc)] -> Gen v loc [GeneratedConstraint v loc] Source #

Generate kind constraints for a mutally recursive component of decls

builtinConstraints :: forall v loc. (Ord loc, BuiltinAnnotation loc, Var v) => Gen v loc [GeneratedConstraint v loc] Source #

Constraints on language builtins, used to initialize the kind inference state (initialState)