ghc-7.8.4: 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 |

data UnifyResultM a

Constructors

Unifiable a |
MaybeApart a |
SurelyApart |

type UnifyResult = UnifyResultM TvSubst

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