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]
- | IfaceAxiomRuleCo IfLclName [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
- | 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 :: PprPrec -> IfaceType -> SDoc
- pprIfaceContext :: PprPrec -> [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 :: PprPrec -> IfaceTyCon -> IfaceTcArgs -> SDoc
- pprUserIfaceForAll :: [IfaceForAllBndr] -> SDoc
- pprIfaceCoTcApp :: PprPrec -> IfaceTyCon -> [IfaceCoercion] -> SDoc
- pprTyTcApp :: PprPrec -> IfaceTyCon -> IfaceTcArgs -> SDoc
- pprIfacePrefixApp :: PprPrec -> 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 #
Instances
Outputable IfaceType # | |
Binary IfaceType # | |
Binary (DefMethSpec IfaceType) # | |
type IfacePredType = IfaceType Source #
data IfaceCoercion Source #
Instances
Outputable IfaceCoercion # | |
Binary IfaceCoercion # | |
data IfaceUnivCoProv Source #
IfaceUnsafeCoerceProv | |
IfacePhantomProv IfaceCoercion | |
IfaceProofIrrelProv IfaceCoercion | |
IfacePluginProv String |
Instances
Binary IfaceUnivCoProv # | |
data IfaceTyCon Source #
Instances
Eq IfaceTyCon # | |
Defined in IfaceType (==) :: IfaceTyCon -> IfaceTyCon -> Bool # (/=) :: IfaceTyCon -> IfaceTyCon -> Bool # | |
Outputable IfaceTyCon # | |
Binary IfaceTyCon # | |
data IfaceTyConInfo Source #
Instances
Eq IfaceTyConInfo # | |
Defined in IfaceType (==) :: IfaceTyConInfo -> IfaceTyConInfo -> Bool # (/=) :: IfaceTyConInfo -> IfaceTyConInfo -> Bool # | |
Binary IfaceTyConInfo # | |
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 # | |
Defined in IfaceType (==) :: IfaceTyConSort -> IfaceTyConSort -> Bool # (/=) :: IfaceTyConSort -> IfaceTyConSort -> Bool # | |
Binary IfaceTyConSort # | |
data IsPromoted Source #
Is a TyCon a promoted data constructor or just a normal type constructor?
Instances
Eq IsPromoted # | |
Defined in IfaceType (==) :: IsPromoted -> IsPromoted -> Bool # (/=) :: IsPromoted -> IsPromoted -> Bool # | |
Binary IsPromoted # | |
data IfaceTyLit Source #
Instances
Eq IfaceTyLit # | |
Defined in IfaceType (==) :: IfaceTyLit -> IfaceTyLit -> Bool # (/=) :: IfaceTyLit -> IfaceTyLit -> Bool # | |
Outputable IfaceTyLit # | |
Binary IfaceTyLit # | |
data IfaceTcArgs Source #
Instances
Semigroup IfaceTcArgs # | |
Defined in IfaceType (<>) :: IfaceTcArgs -> IfaceTcArgs -> IfaceTcArgs Source # sconcat :: NonEmpty IfaceTcArgs -> IfaceTcArgs Source # stimes :: Integral b => b -> IfaceTcArgs -> IfaceTcArgs Source # | |
Monoid IfaceTcArgs # | |
Defined in IfaceType mempty :: IfaceTcArgs Source # mappend :: IfaceTcArgs -> IfaceTcArgs -> IfaceTcArgs Source # mconcat :: [IfaceTcArgs] -> IfaceTcArgs Source # | |
Outputable IfaceTcArgs # | |
Binary IfaceTcArgs # | |
type IfaceContext = [IfacePredType] Source #
data IfaceOneShot Source #
Instances
Binary IfaceOneShot # | |
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 # | |
Data ArgFlag # | |
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 # | |
Ord ArgFlag # | |
Outputable ArgFlag # | |
Binary ArgFlag # | |
Outputable tv => Outputable (TyVarBndr tv ArgFlag) # | |
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 IfaceBndr
from an IfaceForAllBndr
.
ifForAllBndrName :: IfaceForAllBndr -> IfLclName Source #
Extract the variable name from an IfaceForAllBndr
.
ifTyConBinderTyVar :: IfaceTyConBinder -> IfaceTvBndr Source #
Extract an IfaceBndr
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 :: PprPrec -> [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 :: PprPrec -> IfaceTyCon -> IfaceTcArgs -> SDoc Source #
pprUserIfaceForAll :: [IfaceForAllBndr] -> SDoc Source #
pprIfaceCoTcApp :: PprPrec -> IfaceTyCon -> [IfaceCoercion] -> SDoc Source #
pprTyTcApp :: PprPrec -> 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 #