Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
Handles generating kind constraints to be fed to the kind constraint solver (found in Unison.KindInference.Solve).
Synopsis
- typeConstraints :: (Var v, Ord loc) => UVar v loc -> Type v loc -> Gen v loc [GeneratedConstraint v loc]
- termConstraints :: forall v loc. (Var v, Ord loc) => Term v loc -> Gen v loc [GeneratedConstraint v loc]
- declComponentConstraints :: forall v loc. (Var v, Ord loc) => [(Reference, Decl v loc)] -> Gen v loc [GeneratedConstraint v loc]
- builtinConstraints :: forall v loc. (Ord loc, BuiltinAnnotation loc, Var v) => Gen v loc [GeneratedConstraint v loc]
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
)