Safe Haskell | None |
---|---|
Language | Haskell2010 |
Synopsis
- type IfExtName = Name
- type IfLclName = FastString
- data IfaceType
- = IfaceFreeTyVar TyVar
- | IfaceTyVar IfLclName
- | IfaceLitTy IfaceTyLit
- | IfaceAppTy IfaceType IfaceType
- | IfaceFunTy IfaceType IfaceType
- | IfaceDFunTy IfaceType IfaceType
- | IfaceForAllTy IfaceForAllBndr IfaceType
- | IfaceTyConApp IfaceTyCon IfaceTcArgs
- | IfaceCastTy IfaceType IfaceCoercion
- | IfaceCoercionTy IfaceCoercion
- | IfaceTupleTy TupleSort IsPromoted IfaceTcArgs
- type IfacePredType = IfaceType
- type IfaceKind = IfaceType
- data IfaceCoercion
- = IfaceReflCo Role IfaceType
- | IfaceFunCo Role IfaceCoercion IfaceCoercion
- | IfaceTyConAppCo Role IfaceTyCon [IfaceCoercion]
- | IfaceAppCo IfaceCoercion IfaceCoercion
- | IfaceForAllCo IfaceTvBndr IfaceCoercion IfaceCoercion
- | IfaceCoVarCo IfLclName
- | IfaceAxiomInstCo IfExtName BranchIndex [IfaceCoercion]
- | IfaceUnivCo IfaceUnivCoProv Role IfaceType IfaceType
- | IfaceSymCo IfaceCoercion
- | IfaceTransCo IfaceCoercion IfaceCoercion
- | IfaceNthCo Int IfaceCoercion
- | IfaceLRCo LeftOrRight IfaceCoercion
- | IfaceInstCo IfaceCoercion IfaceCoercion
- | IfaceCoherenceCo IfaceCoercion IfaceCoercion
- | IfaceKindCo IfaceCoercion
- | IfaceSubCo IfaceCoercion
- | IfaceAxiomRuleCo IfLclName [IfaceCoercion]
- | IfaceFreeCoVar CoVar
- | IfaceHoleCo CoVar
- data IfaceUnivCoProv
- data IfaceTyCon = IfaceTyCon {}
- data IfaceTyConInfo = IfaceTyConInfo {}
- data IfaceTyConSort
- data IsPromoted
- data IfaceTyLit
- data IfaceTcArgs
- type IfaceContext = [IfacePredType]
- data IfaceBndr
- data IfaceOneShot
- type IfaceLamBndr = (IfaceBndr, IfaceOneShot)
- type IfaceTvBndr = (IfLclName, IfaceKind)
- type IfaceIdBndr = (IfLclName, IfaceType)
- type IfaceTyConBinder = TyVarBndr IfaceTvBndr TyConBndrVis
- type IfaceForAllBndr = TyVarBndr IfaceTvBndr ArgFlag
- data ArgFlag
- data ShowForAllFlag
- ifForAllBndrTyVar :: IfaceForAllBndr -> IfaceTvBndr
- ifForAllBndrName :: IfaceForAllBndr -> IfLclName
- ifTyConBinderTyVar :: IfaceTyConBinder -> IfaceTvBndr
- ifTyConBinderName :: IfaceTyConBinder -> IfLclName
- isIfaceLiftedTypeKind :: IfaceKind -> Bool
- tcArgsIfaceTypes :: IfaceTcArgs -> [IfaceType]
- pprIfaceType :: IfaceType -> SDoc
- pprParendIfaceType :: IfaceType -> SDoc
- pprPrecIfaceType :: TyPrec -> IfaceType -> SDoc
- pprIfaceContext :: TyPrec -> [IfacePredType] -> SDoc
- pprIfaceContextArr :: [IfacePredType] -> SDoc
- pprIfaceIdBndr :: IfaceIdBndr -> SDoc
- pprIfaceLamBndr :: IfaceLamBndr -> SDoc
- pprIfaceTvBndr :: Bool -> IfaceTvBndr -> SDoc
- pprIfaceTyConBinders :: [IfaceTyConBinder] -> SDoc
- pprIfaceBndrs :: [IfaceBndr] -> SDoc
- pprIfaceTcArgs :: IfaceTcArgs -> SDoc
- pprParendIfaceTcArgs :: IfaceTcArgs -> SDoc
- pprIfaceForAllPart :: [IfaceForAllBndr] -> [IfacePredType] -> SDoc -> SDoc
- pprIfaceForAllPartMust :: [IfaceForAllBndr] -> [IfacePredType] -> SDoc -> SDoc
- pprIfaceForAll :: [IfaceForAllBndr] -> SDoc
- pprIfaceSigmaType :: ShowForAllFlag -> IfaceType -> SDoc
- pprIfaceTyLit :: IfaceTyLit -> SDoc
- pprIfaceCoercion :: IfaceCoercion -> SDoc
- pprParendIfaceCoercion :: IfaceCoercion -> SDoc
- splitIfaceSigmaTy :: IfaceType -> ([IfaceForAllBndr], [IfacePredType], IfaceType)
- pprIfaceTypeApp :: TyPrec -> IfaceTyCon -> IfaceTcArgs -> SDoc
- pprUserIfaceForAll :: [IfaceForAllBndr] -> SDoc
- pprIfaceCoTcApp :: TyPrec -> IfaceTyCon -> [IfaceCoercion] -> SDoc
- pprTyTcApp :: TyPrec -> IfaceTyCon -> IfaceTcArgs -> SDoc
- pprIfacePrefixApp :: TyPrec -> SDoc -> [SDoc] -> SDoc
- suppressIfaceInvisibles :: DynFlags -> [IfaceTyConBinder] -> [a] -> [a]
- stripIfaceInvisVars :: DynFlags -> [IfaceTyConBinder] -> [IfaceTyConBinder]
- stripInvisArgs :: DynFlags -> IfaceTcArgs -> IfaceTcArgs
- mkIfaceTySubst :: [(IfLclName, IfaceType)] -> IfaceTySubst
- substIfaceTyVar :: IfaceTySubst -> IfLclName -> IfaceType
- substIfaceTcArgs :: IfaceTySubst -> IfaceTcArgs -> IfaceTcArgs
- inDomIfaceTySubst :: IfaceTySubst -> IfaceTvBndr -> Bool
Documentation
type IfLclName = FastString Source #
type IfacePredType = IfaceType Source #
data IfaceCoercion Source #
Instances
Outputable IfaceCoercion Source # | |
Binary IfaceCoercion Source # | |
data IfaceUnivCoProv Source #
IfaceUnsafeCoerceProv | |
IfacePhantomProv IfaceCoercion | |
IfaceProofIrrelProv IfaceCoercion | |
IfacePluginProv String |
Instances
Binary IfaceUnivCoProv Source # | |
data IfaceTyCon Source #
Instances
Eq IfaceTyCon Source # | |
Defined in IfaceType (==) :: IfaceTyCon -> IfaceTyCon -> Bool # (/=) :: IfaceTyCon -> IfaceTyCon -> Bool # | |
Outputable IfaceTyCon Source # | |
Binary IfaceTyCon Source # | |
data IfaceTyConInfo Source #
Instances
Eq IfaceTyConInfo Source # | |
Defined in IfaceType (==) :: IfaceTyConInfo -> IfaceTyConInfo -> Bool # (/=) :: IfaceTyConInfo -> IfaceTyConInfo -> Bool # | |
Binary IfaceTyConInfo Source # | |
data IfaceTyConSort Source #
The various types of TyCons which have special, built-in syntax.
IfaceNormalTyCon | a regular tycon |
IfaceTupleTyCon !Arity !TupleSort | e.g. |
IfaceSumTyCon !Arity | e.g. |
IfaceEqualityTyCon | A heterogeneous equality TyCon (i.e. eqPrimTyCon, eqReprPrimTyCon, heqTyCon) that is actually being applied to two types of the same kind. This affects pretty-printing only: see Note [Equality predicates in IfaceType] |
Instances
Eq IfaceTyConSort Source # | |
Defined in IfaceType (==) :: IfaceTyConSort -> IfaceTyConSort -> Bool # (/=) :: IfaceTyConSort -> IfaceTyConSort -> Bool # | |
Binary IfaceTyConSort Source # | |
data IsPromoted Source #
Is a TyCon a promoted data constructor or just a normal type constructor?
Instances
Eq IsPromoted Source # | |
Defined in IfaceType (==) :: IsPromoted -> IsPromoted -> Bool # (/=) :: IsPromoted -> IsPromoted -> Bool # | |
Binary IsPromoted Source # | |
data IfaceTyLit Source #
Instances
Eq IfaceTyLit Source # | |
Defined in IfaceType (==) :: IfaceTyLit -> IfaceTyLit -> Bool # (/=) :: IfaceTyLit -> IfaceTyLit -> Bool # | |
Outputable IfaceTyLit Source # | |
Binary IfaceTyLit Source # | |
data IfaceTcArgs Source #
Instances
Semigroup IfaceTcArgs Source # | |
Defined in IfaceType (<>) :: IfaceTcArgs -> IfaceTcArgs -> IfaceTcArgs Source # sconcat :: NonEmpty IfaceTcArgs -> IfaceTcArgs Source # stimes :: Integral b => b -> IfaceTcArgs -> IfaceTcArgs Source # | |
Monoid IfaceTcArgs Source # | |
Defined in IfaceType mempty :: IfaceTcArgs Source # mappend :: IfaceTcArgs -> IfaceTcArgs -> IfaceTcArgs Source # mconcat :: [IfaceTcArgs] -> IfaceTcArgs Source # | |
Outputable IfaceTcArgs Source # | |
Binary IfaceTcArgs Source # | |
type IfaceContext = [IfacePredType] Source #
data IfaceOneShot Source #
Instances
Binary IfaceOneShot Source # | |
type IfaceLamBndr = (IfaceBndr, IfaceOneShot) Source #
type IfaceTvBndr = (IfLclName, IfaceKind) Source #
type IfaceIdBndr = (IfLclName, IfaceType) Source #
Argument Flag
Is something required to appear in source Haskell (Required
),
permitted by request (Specified
) (visible type application), or
prohibited entirely from appearing in source Haskell (Inferred
)?
See Note [TyVarBndrs, TyVarBinders, TyConBinders, and visibility] in TyCoRep
Instances
Eq ArgFlag Source # | |
Data ArgFlag Source # | |
Defined in Var gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> ArgFlag -> c ArgFlag Source # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c ArgFlag Source # toConstr :: ArgFlag -> Constr Source # dataTypeOf :: ArgFlag -> DataType Source # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c ArgFlag) Source # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c ArgFlag) Source # gmapT :: (forall b. Data b => b -> b) -> ArgFlag -> ArgFlag Source # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> ArgFlag -> r Source # gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> ArgFlag -> r Source # gmapQ :: (forall d. Data d => d -> u) -> ArgFlag -> [u] Source # gmapQi :: Int -> (forall d. Data d => d -> u) -> ArgFlag -> u Source # gmapM :: Monad m => (forall d. Data d => d -> m d) -> ArgFlag -> m ArgFlag Source # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> ArgFlag -> m ArgFlag Source # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> ArgFlag -> m ArgFlag Source # | |
Outputable ArgFlag Source # | |
Binary ArgFlag Source # | |
Outputable tv => Outputable (TyVarBndr tv ArgFlag) Source # | |
data ShowForAllFlag Source #
Show forall flag
Unconditionally show the forall quantifier with (ShowForAllMust
)
or when (ShowForAllWhen
) the names used are free in the binder
or when compiling with -fprint-explicit-foralls.
ifForAllBndrTyVar :: IfaceForAllBndr -> IfaceTvBndr Source #
Extract an IfaceTvBndr
from an IfaceForAllBndr
.
ifForAllBndrName :: IfaceForAllBndr -> IfLclName Source #
Extract the variable name from an IfaceForAllBndr
.
ifTyConBinderTyVar :: IfaceTyConBinder -> IfaceTvBndr Source #
Extract an IfaceTvBndr
from an IfaceTyConBinder
.
ifTyConBinderName :: IfaceTyConBinder -> IfLclName Source #
Extract the variable name from an IfaceTyConBinder
.
tcArgsIfaceTypes :: IfaceTcArgs -> [IfaceType] Source #
pprIfaceType :: IfaceType -> SDoc Source #
pprParendIfaceType :: IfaceType -> SDoc Source #
pprIfaceContext :: TyPrec -> [IfacePredType] -> SDoc Source #
Prints a context or ()
if empty
You give it the context precedence
pprIfaceContextArr :: [IfacePredType] -> SDoc Source #
Prints "(C a, D b) =>", including the arrow. Used when we want to print a context in a type, so we use FunPrec to decide whether to parenthesise a singleton predicate; e.g. Num a => a -> a
pprIfaceIdBndr :: IfaceIdBndr -> SDoc Source #
pprIfaceLamBndr :: IfaceLamBndr -> SDoc Source #
pprIfaceTvBndr :: Bool -> IfaceTvBndr -> SDoc Source #
pprIfaceTyConBinders :: [IfaceTyConBinder] -> SDoc Source #
pprIfaceBndrs :: [IfaceBndr] -> SDoc Source #
pprIfaceTcArgs :: IfaceTcArgs -> SDoc Source #
pprIfaceForAllPart :: [IfaceForAllBndr] -> [IfacePredType] -> SDoc -> SDoc Source #
pprIfaceForAllPartMust :: [IfaceForAllBndr] -> [IfacePredType] -> SDoc -> SDoc Source #
Like pprIfaceForAllPart
, but always uses an explicit forall
.
pprIfaceForAll :: [IfaceForAllBndr] -> SDoc Source #
Render the "forall ... ." or "forall ... ->" bit of a type.
pprIfaceSigmaType :: ShowForAllFlag -> IfaceType -> SDoc Source #
pprIfaceTyLit :: IfaceTyLit -> SDoc Source #
pprIfaceCoercion :: IfaceCoercion -> SDoc Source #
splitIfaceSigmaTy :: IfaceType -> ([IfaceForAllBndr], [IfacePredType], IfaceType) Source #
pprIfaceTypeApp :: TyPrec -> IfaceTyCon -> IfaceTcArgs -> SDoc Source #
pprUserIfaceForAll :: [IfaceForAllBndr] -> SDoc Source #
pprIfaceCoTcApp :: TyPrec -> IfaceTyCon -> [IfaceCoercion] -> SDoc Source #
pprTyTcApp :: TyPrec -> IfaceTyCon -> IfaceTcArgs -> SDoc Source #
suppressIfaceInvisibles :: DynFlags -> [IfaceTyConBinder] -> [a] -> [a] Source #
stripIfaceInvisVars :: DynFlags -> [IfaceTyConBinder] -> [IfaceTyConBinder] Source #
stripInvisArgs :: DynFlags -> IfaceTcArgs -> IfaceTcArgs Source #
mkIfaceTySubst :: [(IfLclName, IfaceType)] -> IfaceTySubst Source #
substIfaceTyVar :: IfaceTySubst -> IfLclName -> IfaceType Source #
substIfaceTcArgs :: IfaceTySubst -> IfaceTcArgs -> IfaceTcArgs Source #
inDomIfaceTySubst :: IfaceTySubst -> IfaceTvBndr -> Bool Source #