ghc-7.8.2: The GHC API

Safe Haskell | None
Language | Haskell98

Unify

# Documentation

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

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

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

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

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

data MatchEnv

Constructors

ME |
Fields me_tmpls :: VarSet me_env :: RnEnv2

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

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

tcUnifyTy :: Type -> Type -> Maybe TvSubst

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

data BindFlag

Constructors

BindMe |
Skolem |

niFixTvSubst :: TvSubstEnv -> TvSubst

niSubstTvSet :: TvSubstEnv -> TyVarSet -> TyVarSet

data UnifyResultM a

Constructors

Unifiable a |
MaybeApart a |
SurelyApart |

type UnifyResult = UnifyResultM TvSubst

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