ghc-9.12.1: The GHC API
Safe HaskellNone
LanguageGHC2021

GHC.Iface.Type

Synopsis

Documentation

newtype IfLclName Source #

A local name in iface syntax

Constructors

IfLclName 

Instances

Instances details
NFData IfLclName Source # 
Instance details

Defined in GHC.Iface.Type

Methods

rnf :: IfLclName -> () Source #

Binary IfLclName Source # 
Instance details

Defined in GHC.Iface.Type

Outputable IfLclName Source # 
Instance details

Defined in GHC.Iface.Type

Methods

ppr :: IfLclName -> SDoc Source #

Show IfLclName Source # 
Instance details

Defined in GHC.Iface.Type

Eq IfLclName Source # 
Instance details

Defined in GHC.Iface.Type

Ord IfLclName Source # 
Instance details

Defined in GHC.Iface.Type

data IfaceType Source #

A kind of universal type, used for types and kinds.

Any time a Type is pretty-printed, it is first converted to an IfaceType before being printed. See Note [Pretty printing via Iface syntax] in GHC.Types.TyThing.Ppr

data IfaceCoercion Source #

data IfaceTyCon Source #

Constructors

IfaceTyCon 

Fields

  • ifaceTyConName :: IfExtName
     
  • ifaceTyConInfo :: !IfaceTyConInfo

    We add a bang to this field as heap analysis showed that this constructor retains a thunk to a value that is usually shared.

    See !12200 for how this bang saved ~10% residency when loading mi_extra_decls on the agda code base.

    See Note [Sharing IfaceTyConInfo] for why sharing is so important for IfaceTyConInfo.

Instances

Instances details
NFData IfaceTyCon Source # 
Instance details

Defined in GHC.Iface.Type

Methods

rnf :: IfaceTyCon -> () Source #

Binary IfaceTyCon Source # 
Instance details

Defined in GHC.Iface.Type

Outputable IfaceTyCon Source # 
Instance details

Defined in GHC.Iface.Type

Methods

ppr :: IfaceTyCon -> SDoc Source #

Eq IfaceTyCon Source # 
Instance details

Defined in GHC.Iface.Type

Ord IfaceTyCon Source # 
Instance details

Defined in GHC.Iface.Type

mkIfaceTyConInfo :: PromotionFlag -> IfaceTyConSort -> IfaceTyConInfo Source #

This smart constructor allows sharing of the two most common cases. See Note [Sharing IfaceTyConInfo]

data IfaceTyConSort Source #

The various types of TyCons which have special, built-in syntax.

Constructors

IfaceNormalTyCon

a regular tycon

IfaceTupleTyCon !Arity !TupleSort

a tuple, e.g. (a, b, c) or (#a, b, c#). The arity is the tuple width, not the tycon arity (which is twice the width in the case of unboxed tuples).

IfaceSumTyCon !Arity

an unboxed sum, e.g. (# a | b | c #)

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]

data IfaceAppArgs Source #

Stores the arguments in a type application as a list. See Note [Suppressing invisible arguments].

Instances

Instances details
NFData IfaceAppArgs Source # 
Instance details

Defined in GHC.Iface.Type

Methods

rnf :: IfaceAppArgs -> () Source #

Binary IfaceAppArgs Source # 
Instance details

Defined in GHC.Iface.Type

Outputable IfaceAppArgs Source # 
Instance details

Defined in GHC.Iface.Type

Monoid IfaceAppArgs Source # 
Instance details

Defined in GHC.Iface.Type

Semigroup IfaceAppArgs Source # 
Instance details

Defined in GHC.Iface.Type

Eq IfaceAppArgs Source # 
Instance details

Defined in GHC.Iface.Type

Ord IfaceAppArgs Source # 
Instance details

Defined in GHC.Iface.Type

data IfaceBndr Source #

Instances

Instances details
NFData IfaceBndr Source # 
Instance details

Defined in GHC.Iface.Type

Methods

rnf :: IfaceBndr -> () Source #

Binary IfaceBndr Source # 
Instance details

Defined in GHC.Iface.Type

Outputable IfaceBndr Source # 
Instance details

Defined in GHC.Iface.Type

Methods

ppr :: IfaceBndr -> SDoc Source #

Eq IfaceBndr Source # 
Instance details

Defined in GHC.Iface.Type

Ord IfaceBndr Source # 
Instance details

Defined in GHC.Iface.Type

data IfaceOneShot Source #

Instances

Instances details
NFData IfaceOneShot Source # 
Instance details

Defined in GHC.Iface.Type

Methods

rnf :: IfaceOneShot -> () Source #

Binary IfaceOneShot Source # 
Instance details

Defined in GHC.Iface.Type

Outputable IfaceOneShot Source # 
Instance details

Defined in GHC.Iface.Type

data ForAllTyFlag Source #

ForAllTyFlag

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 [VarBndrs, ForAllTyBinders, TyConBinders, and visibility] in GHC.Core.TyCo.Rep

Bundled Patterns

pattern Inferred :: ForAllTyFlag 
pattern Specified :: ForAllTyFlag 

Instances

Instances details
NFData ForAllTyFlag Source # 
Instance details

Defined in GHC.Hs.Specificity

Methods

rnf :: ForAllTyFlag -> () Source #

Binary ForAllTyFlag Source # 
Instance details

Defined in GHC.Hs.Specificity

Outputable ForAllTyFlag Source # 
Instance details

Defined in GHC.Hs.Specificity

Data ForAllTyFlag Source # 
Instance details

Defined in Language.Haskell.Syntax.Specificity

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> ForAllTyFlag -> c ForAllTyFlag #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c ForAllTyFlag #

toConstr :: ForAllTyFlag -> Constr #

dataTypeOf :: ForAllTyFlag -> DataType #

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c ForAllTyFlag) #

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c ForAllTyFlag) #

gmapT :: (forall b. Data b => b -> b) -> ForAllTyFlag -> ForAllTyFlag #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> ForAllTyFlag -> r #

gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> ForAllTyFlag -> r #

gmapQ :: (forall d. Data d => d -> u) -> ForAllTyFlag -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> ForAllTyFlag -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> ForAllTyFlag -> m ForAllTyFlag #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> ForAllTyFlag -> m ForAllTyFlag #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> ForAllTyFlag -> m ForAllTyFlag #

Eq ForAllTyFlag Source # 
Instance details

Defined in Language.Haskell.Syntax.Specificity

Ord ForAllTyFlag Source # 
Instance details

Defined in Language.Haskell.Syntax.Specificity

Outputable tv => Outputable (VarBndr tv ForAllTyFlag) Source # 
Instance details

Defined in GHC.Types.Var

data FunTyFlag Source #

The non-dependent version of ForAllTyFlag. See Note [FunTyFlag] Appears here partly so that it's together with its friends ForAllTyFlag and ForallVisFlag, but also because it is used in IfaceType, rather early in the compilation chain

Constructors

FTF_T_T 
FTF_T_C 
FTF_C_T 
FTF_C_C 

Instances

Instances details
Binary FunTyFlag Source # 
Instance details

Defined in GHC.Types.Var

Outputable FunTyFlag Source # 
Instance details

Defined in GHC.Types.Var

Methods

ppr :: FunTyFlag -> SDoc Source #

Data FunTyFlag Source # 
Instance details

Defined in GHC.Types.Var

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> FunTyFlag -> c FunTyFlag #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c FunTyFlag #

toConstr :: FunTyFlag -> Constr #

dataTypeOf :: FunTyFlag -> DataType #

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c FunTyFlag) #

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c FunTyFlag) #

gmapT :: (forall b. Data b => b -> b) -> FunTyFlag -> FunTyFlag #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> FunTyFlag -> r #

gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> FunTyFlag -> r #

gmapQ :: (forall d. Data d => d -> u) -> FunTyFlag -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> FunTyFlag -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> FunTyFlag -> m FunTyFlag #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> FunTyFlag -> m FunTyFlag #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> FunTyFlag -> m FunTyFlag #

Eq FunTyFlag Source # 
Instance details

Defined in GHC.Types.Var

Ord FunTyFlag Source # 
Instance details

Defined in GHC.Types.Var

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.

data ShowHowMuch Source #

Constructors

ShowHeader AltPpr

Header information only, not rhs

ShowSome (Maybe (OccName -> Bool)) AltPpr

Show the declaration and its RHS. The Maybe predicate allows filtering of the sub-components which should be printing; any sub-components filtered out will be elided with ....

ShowIface

Everything including GHC-internal information (used in --show-iface)

Instances

Instances details
Outputable ShowHowMuch Source # 
Instance details

Defined in GHC.Iface.Type

Methods

ppr :: ShowHowMuch -> SDoc Source #

newtype AltPpr Source #

Constructors

AltPpr (Maybe (OccName -> SDoc)) 

mkIfaceTyConKind :: [IfaceTyConBinder] -> IfaceKind -> IfaceKind Source #

Build the tyConKind from the binders and the result kind. Keep in sync with mkTyConKind in GHC.Core.TyCon.

ifForAllBndrName :: IfaceForAllBndr -> IfLclName Source #

Extract the variable name from an IfaceForAllBndr.

ifTyConBinderName :: IfaceTyConBinder -> IfLclName Source #

Extract the variable name from an IfaceTyConBinder.

putIfaceType :: WriteBinHandle -> IfaceType -> IO () Source #

Serialises an IfaceType to the given WriteBinHandle.

Serialising inner IfaceType's uses the put of IfaceType which may be using a deduplication table. See Note [Deduplication during iface binary serialisation].

getIfaceType :: HasCallStack => ReadBinHandle -> IO IfaceType Source #

Deserialises an IfaceType from the given ReadBinHandle.

Reading inner IfaceType's uses the get of IfaceType which may be using a deduplication table. See Note [Deduplication during iface binary serialisation].

ifaceTypeSharedByte :: Word8 Source #

This is the byte tag we expect to read when the next value is not an IfaceType value, but an offset into a lookup table. See Note [Deduplication during iface binary serialisation].

Must not overlap with any byte tag in getIfaceType.

isIfaceLiftedTypeKind :: IfaceKind -> Bool Source #

Returns true for Type or (TYPE LiftedRep)

newtype SuppressBndrSig Source #

Do we want to suppress kind annotations on binders? See Note [Suppressing binder signatures]

Constructors

SuppressBndrSig Bool 

newtype UseBndrParens Source #

Constructors

UseBndrParens Bool 

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

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.

mkIfaceTySubst :: [(IfLclName, IfaceType)] -> IfaceTySubst Source #

inDomIfaceTySubst :: IfaceTySubst -> IfaceTvBndr -> Bool Source #

many_ty :: IfaceType Source #

The type 'Many :: Multiplicity'.