ghc-7.10.2: The GHC API

Safe Haskell | None
Language | Haskell2010

Unify

# Documentation

tcMatchTy :: TyVarSet -> Type -> Type -> Maybe TvSubst Source

tcMatchTys :: TyVarSet -> [Type] -> [Type] -> Maybe TvSubst Source

tcMatchTyX :: TyVarSet -> TvSubst -> Type -> Type -> Maybe TvSubst Source

ruleMatchTyX :: MatchEnv -> TvSubstEnv -> Type -> Type -> Maybe TvSubstEnv Source

tcMatchPreds :: [TyVar] -> [PredType] -> [PredType] -> Maybe TvSubstEnv Source

data MatchEnv Source

Constructors

ME |
Fields me_tmpls :: VarSet me_env :: RnEnv2

matchList :: (env -> a -> b -> Maybe env) -> env -> [a] -> [b] -> Maybe env Source

typesCantMatch :: [(Type, Type)] -> Bool Source

tcUnifyTy :: Type -> Type -> Maybe TvSubst Source

tcUnifyTys :: (TyVar -> BindFlag) -> [Type] -> [Type] -> Maybe TvSubst Source

data BindFlag Source

Constructors

BindMe |
Skolem |

data UnifyResultM a Source

Constructors

Unifiable a |
MaybeApart a |
SurelyApart |

type UnifyResult = UnifyResultM TvSubst Source

tcUnifyTysFG :: (TyVar -> BindFlag) -> [Type] -> [Type] -> UnifyResult Source