Safe Haskell | None |
---|---|
Language | Haskell98 |
Functions and instances relating to unification
Documentation
unifyTypes :: Type -> Type -> UnifyT Type Check () Source
Unify two types, updating the current substitution
unifyRows :: Type -> Type -> UnifyT Type Check () Source
Unify two rows, updating the current substitution
Common labels are first identified, and unified. Remaining labels and types are unified with a trailing row unification variable, if appropriate, otherwise leftover labels result in a unification error.
unifiesWith :: Environment -> Type -> Type -> Bool Source
Check that two types unify
replaceVarWithUnknown :: String -> Type -> UnifyT Type Check Type Source
Replace a single type variable with a new unification variable
varIfUnknown :: Type -> Type Source
Replace outermost unsolved unification variables with named type variables