Safe Haskell | None |
---|---|
Language | Haskell2010 |
- data HsWrapper
- (<.>) :: HsWrapper -> HsWrapper -> HsWrapper
- mkWpTyApps :: [Type] -> HsWrapper
- mkWpEvApps :: [EvTerm] -> HsWrapper
- mkWpEvVarApps :: [EvVar] -> HsWrapper
- mkWpTyLams :: [TyVar] -> HsWrapper
- mkWpLams :: [Var] -> HsWrapper
- mkWpLet :: TcEvBinds -> HsWrapper
- mkWpCastN :: TcCoercionN -> HsWrapper
- mkWpCastR :: TcCoercionR -> HsWrapper
- mkWpFun :: HsWrapper -> HsWrapper -> TcType -> TcType -> HsWrapper
- mkWpFuns :: [(TcType, HsWrapper)] -> TcType -> HsWrapper -> HsWrapper
- idHsWrapper :: HsWrapper
- isIdHsWrapper :: HsWrapper -> Bool
- pprHsWrapper :: HsWrapper -> (Bool -> SDoc) -> SDoc
- data TcEvBinds
- = TcEvBinds EvBindsVar
- | EvBinds (Bag EvBind)
- data EvBindsVar = EvBindsVar (IORef EvBindMap) Unique
- newtype EvBindMap = EvBindMap {}
- emptyEvBindMap :: EvBindMap
- extendEvBinds :: EvBindMap -> EvBind -> EvBindMap
- lookupEvBind :: EvBindMap -> EvVar -> Maybe EvBind
- evBindMapBinds :: EvBindMap -> Bag EvBind
- foldEvBindMap :: (EvBind -> a -> a) -> a -> EvBindMap -> a
- data EvBind = EvBind {}
- emptyTcEvBinds :: TcEvBinds
- isEmptyTcEvBinds :: TcEvBinds -> Bool
- mkGivenEvBind :: EvVar -> EvTerm -> EvBind
- mkWantedEvBind :: EvVar -> EvTerm -> EvBind
- sccEvBinds :: Bag EvBind -> [SCC EvBind]
- evBindVar :: EvBind -> EvVar
- data EvTerm
- mkEvCast :: EvTerm -> TcCoercion -> EvTerm
- evVarsOfTerm :: EvTerm -> VarSet
- mkEvScSelectors :: EvTerm -> Class -> [TcType] -> [(TcPredType, EvTerm)]
- data EvLit
- evTermCoercion :: EvTerm -> TcCoercion
- data EvCallStack
- data EvTypeable
- type TcCoercion = Coercion
- type TcCoercionR = CoercionR
- type TcCoercionN = CoercionN
- type TcCoercionP = CoercionP
- data CoercionHole
- data Role
- data LeftOrRight
- pickLR :: LeftOrRight -> (a, a) -> a
- mkTcReflCo :: Role -> TcType -> TcCoercion
- mkTcNomReflCo :: TcType -> TcCoercionN
- mkTcRepReflCo :: TcType -> TcCoercionR
- mkTcTyConAppCo :: Role -> TyCon -> [TcCoercion] -> TcCoercion
- mkTcAppCo :: TcCoercion -> TcCoercionN -> TcCoercion
- mkTcFunCo :: Role -> TcCoercion -> TcCoercion -> TcCoercion
- mkTcAxInstCo :: Role -> CoAxiom br -> BranchIndex -> [TcType] -> [TcCoercion] -> TcCoercion
- mkTcUnbranchedAxInstCo :: CoAxiom Unbranched -> [TcType] -> [TcCoercion] -> TcCoercionR
- mkTcForAllCo :: TyVar -> TcCoercionN -> TcCoercion -> TcCoercion
- mkTcForAllCos :: [(TyVar, TcCoercionN)] -> TcCoercion -> TcCoercion
- mkTcSymCo :: TcCoercion -> TcCoercion
- mkTcTransCo :: TcCoercion -> TcCoercion -> TcCoercion
- mkTcNthCo :: Int -> TcCoercion -> TcCoercion
- mkTcLRCo :: LeftOrRight -> TcCoercion -> TcCoercion
- mkTcSubCo :: TcCoercionN -> TcCoercionR
- maybeTcSubCo :: EqRel -> TcCoercion -> TcCoercion
- tcDowngradeRole :: Role -> Role -> TcCoercion -> TcCoercion
- mkTcAxiomRuleCo :: CoAxiomRule -> [TcCoercion] -> TcCoercionR
- mkTcCoherenceLeftCo :: TcCoercion -> TcCoercionN -> TcCoercion
- mkTcCoherenceRightCo :: TcCoercion -> TcCoercionN -> TcCoercion
- mkTcPhantomCo :: TcCoercionN -> TcType -> TcType -> TcCoercionP
- mkTcKindCo :: TcCoercion -> TcCoercionN
- tcCoercionKind :: TcCoercion -> Pair TcType
- coVarsOfTcCo :: TcCoercion -> TcTyCoVarSet
- mkTcCoVarCo :: CoVar -> TcCoercion
- isTcReflCo :: TcCoercion -> Bool
- tcCoercionRole :: TcCoercion -> Role
- unwrapIP :: Type -> CoercionR
- wrapIP :: Type -> CoercionR
Documentation
mkWpTyApps :: [Type] -> HsWrapper Source #
mkWpEvApps :: [EvTerm] -> HsWrapper Source #
mkWpEvVarApps :: [EvVar] -> HsWrapper Source #
mkWpTyLams :: [TyVar] -> HsWrapper Source #
mkWpCastN :: TcCoercionN -> HsWrapper Source #
mkWpCastR :: TcCoercionR -> HsWrapper Source #
mkWpFuns :: [(TcType, HsWrapper)] -> TcType -> HsWrapper -> HsWrapper Source #
mkWpFuns [(ty1, wrap1), (ty2, wrap2)] ty_res wrap_res
,
where wrap1 :: ty1 "->" ty1'
and wrap2 :: ty2 "->" ty2'
,
wrap3 :: ty3 "->" ty3'
and ty_res
is either ty3
or ty3'
,
gives a wrapper (ty1' -> ty2' -> ty3) "->" (ty1 -> ty2 -> ty3')
.
Notice that the result wrapper goes the other way round to all
the others. This is a result of sub-typing contravariance.
isIdHsWrapper :: HsWrapper -> Bool Source #
data EvBindsVar Source #
foldEvBindMap :: (EvBind -> a -> a) -> a -> EvBindMap -> a Source #
isEmptyTcEvBinds :: TcEvBinds -> Bool Source #
evVarsOfTerm :: EvTerm -> VarSet Source #
mkEvScSelectors :: EvTerm -> Class -> [TcType] -> [(TcPredType, EvTerm)] Source #
evTermCoercion :: EvTerm -> TcCoercion Source #
data EvCallStack Source #
Evidence for CallStack
implicit parameters.
EvCsEmpty | |
EvCsPushCall Name RealSrcSpan EvTerm |
|
data EvTypeable Source #
Instructions on how to make a Typeable
dictionary.
See Note [Typeable evidence terms]
EvTypeableTyCon [EvTerm] | Dictionary for |
EvTypeableTyApp EvTerm EvTerm | Dictionary for |
EvTypeableTyLit EvTerm | Dictionary for a type literal,
e.g. |
type TcCoercion = Coercion Source #
type TcCoercionR = CoercionR Source #
type TcCoercionN = CoercionN Source #
type TcCoercionP = CoercionP Source #
data CoercionHole Source #
A coercion to be filled in by the type-checker. See Note [Coercion holes]
data LeftOrRight Source #
pickLR :: LeftOrRight -> (a, a) -> a Source #
mkTcReflCo :: Role -> TcType -> TcCoercion Source #
mkTcNomReflCo :: TcType -> TcCoercionN Source #
mkTcRepReflCo :: TcType -> TcCoercionR Source #
mkTcTyConAppCo :: Role -> TyCon -> [TcCoercion] -> TcCoercion Source #
mkTcAppCo :: TcCoercion -> TcCoercionN -> TcCoercion Source #
mkTcFunCo :: Role -> TcCoercion -> TcCoercion -> TcCoercion Source #
mkTcAxInstCo :: Role -> CoAxiom br -> BranchIndex -> [TcType] -> [TcCoercion] -> TcCoercion Source #
mkTcUnbranchedAxInstCo :: CoAxiom Unbranched -> [TcType] -> [TcCoercion] -> TcCoercionR Source #
mkTcForAllCo :: TyVar -> TcCoercionN -> TcCoercion -> TcCoercion Source #
mkTcForAllCos :: [(TyVar, TcCoercionN)] -> TcCoercion -> TcCoercion Source #
mkTcSymCo :: TcCoercion -> TcCoercion Source #
mkTcTransCo :: TcCoercion -> TcCoercion -> TcCoercion Source #
mkTcNthCo :: Int -> TcCoercion -> TcCoercion Source #
mkTcLRCo :: LeftOrRight -> TcCoercion -> TcCoercion Source #
mkTcSubCo :: TcCoercionN -> TcCoercionR Source #
maybeTcSubCo :: EqRel -> TcCoercion -> TcCoercion Source #
tcDowngradeRole :: Role -> Role -> TcCoercion -> TcCoercion Source #
mkTcAxiomRuleCo :: CoAxiomRule -> [TcCoercion] -> TcCoercionR Source #
mkTcPhantomCo :: TcCoercionN -> TcType -> TcType -> TcCoercionP Source #
mkTcKindCo :: TcCoercion -> TcCoercionN Source #
tcCoercionKind :: TcCoercion -> Pair TcType Source #
mkTcCoVarCo :: CoVar -> TcCoercion Source #
isTcReflCo :: TcCoercion -> Bool Source #
tcCoercionRole :: TcCoercion -> Role Source #
unwrapIP :: Type -> CoercionR Source #
Create a Coercion
that unwraps an implicit-parameter or
overloaded-label dictionary to expose the underlying value. We
expect the Type
to have the form `IP sym ty` or `IsLabel sym ty`,
and return a Coercion
`co :: IP sym ty ~ ty` or
`co :: IsLabel sym ty ~ Proxy# sym -> ty`. See also
Note [Type-checking overloaded labels] in TcExpr.