TcUnify

ghc-7.10.3: The GHC API

Safe Haskell | None
Language | Haskell2010

TcUnify

Synopsis

- tcWrapResult :: HsExpr TcId -> TcRhoType -> TcRhoType -> TcM (HsExpr TcId)
- tcGen :: UserTypeCtxt -> TcType -> ([TcTyVar] -> TcRhoType -> TcM result) -> TcM (HsWrapper, result)
- tcSubType :: UserTypeCtxt -> TcSigmaType -> TcSigmaType -> TcM HsWrapper
- tcSubType_NC :: UserTypeCtxt -> TcSigmaType -> TcSigmaType -> TcM HsWrapper
- tcSubTypeDS :: UserTypeCtxt -> TcSigmaType -> TcRhoType -> TcM HsWrapper
- tcSubTypeDS_NC :: UserTypeCtxt -> TcSigmaType -> TcRhoType -> TcM HsWrapper
- checkConstraints :: SkolemInfo -> [TcTyVar] -> [EvVar] -> TcM result -> TcM (TcEvBinds, result)
- buildImplication :: SkolemInfo -> [TcTyVar] -> [EvVar] -> TcM result -> TcM (Bag Implication, TcEvBinds, result)
- unifyType :: TcTauType -> TcTauType -> TcM TcCoercion
- unifyTypeList :: [TcTauType] -> TcM ()
- unifyTheta :: TcThetaType -> TcThetaType -> TcM [TcCoercion]
- unifyKindX :: TcKind -> TcKind -> TcM (Maybe Ordering)
- tcInfer :: (TcType -> TcM a) -> TcM (a, TcType)
- matchExpectedListTy :: TcRhoType -> TcM (TcCoercion, TcRhoType)
- matchExpectedPArrTy :: TcRhoType -> TcM (TcCoercion, TcRhoType)
- matchExpectedTyConApp :: TyCon -> TcRhoType -> TcM (TcCoercion, [TcSigmaType])
- matchExpectedAppTy :: TcRhoType -> TcM (TcCoercion, (TcSigmaType, TcSigmaType))
- matchExpectedFunTys :: SDoc -> Arity -> TcRhoType -> TcM (TcCoercion, [TcSigmaType], TcRhoType)
- matchExpectedFunKind :: TcKind -> TcM (Maybe (TcKind, TcKind))
- wrapFunResCoercion :: [TcType] -> HsWrapper -> TcM HsWrapper

# Documentation

tcWrapResult :: HsExpr TcId -> TcRhoType -> TcRhoType -> TcM (HsExpr TcId)

tcGen :: UserTypeCtxt -> TcType -> ([TcTyVar] -> TcRhoType -> TcM result) -> TcM (HsWrapper, result)

tcSubType :: UserTypeCtxt -> TcSigmaType -> TcSigmaType -> TcM HsWrapper

tcSubType_NC :: UserTypeCtxt -> TcSigmaType -> TcSigmaType -> TcM HsWrapper

tcSubTypeDS :: UserTypeCtxt -> TcSigmaType -> TcRhoType -> TcM HsWrapper

tcSubTypeDS_NC :: UserTypeCtxt -> TcSigmaType -> TcRhoType -> TcM HsWrapper

checkConstraints :: SkolemInfo -> [TcTyVar] -> [EvVar] -> TcM result -> TcM (TcEvBinds, result)

buildImplication :: SkolemInfo -> [TcTyVar] -> [EvVar] -> TcM result -> TcM (Bag Implication, TcEvBinds, result)

unifyType :: TcTauType -> TcTauType -> TcM TcCoercion

unifyTypeList :: [TcTauType] -> TcM ()

unifyTheta :: TcThetaType -> TcThetaType -> TcM [TcCoercion]

unifyKindX :: TcKind -> TcKind -> TcM (Maybe Ordering)

tcInfer :: (TcType -> TcM a) -> TcM (a, TcType)

Infer a type using a type "checking" function by passing in a ReturnTv, which can unify with *anything*. See also Note [ReturnTv] in TcType

matchExpectedListTy :: TcRhoType -> TcM (TcCoercion, TcRhoType)

matchExpectedPArrTy :: TcRhoType -> TcM (TcCoercion, TcRhoType)

matchExpectedTyConApp :: TyCon -> TcRhoType -> TcM (TcCoercion, [TcSigmaType])

matchExpectedAppTy :: TcRhoType -> TcM (TcCoercion, (TcSigmaType, TcSigmaType))

matchExpectedFunTys :: SDoc -> Arity -> TcRhoType -> TcM (TcCoercion, [TcSigmaType], TcRhoType)

matchExpectedFunKind :: TcKind -> TcM (Maybe (TcKind, TcKind))

wrapFunResCoercion :: [TcType] -> HsWrapper -> TcM HsWrapper