ghc-8.10.3: The GHC API
Safe HaskellNone
LanguageHaskell2010

IfaceType

Synopsis

Documentation

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 IfaceSyn] in PprTyThing

Instances

Instances details
NFData IfaceType # 
Instance details

Defined in IfaceType

Methods

rnf :: IfaceType -> () Source #

Outputable IfaceType # 
Instance details

Defined in IfaceType

Binary IfaceType # 
Instance details

Defined in IfaceType

Binary (DefMethSpec IfaceType) # 
Instance details

Defined in IfaceType

data IfaceMCoercion Source #

Instances

Instances details
NFData IfaceMCoercion # 
Instance details

Defined in IfaceType

Methods

rnf :: IfaceMCoercion -> () Source #

Binary IfaceMCoercion # 
Instance details

Defined in IfaceType

data IfaceTyCon Source #

Instances

Instances details
Eq IfaceTyCon # 
Instance details

Defined in IfaceType

NFData IfaceTyCon # 
Instance details

Defined in IfaceType

Methods

rnf :: IfaceTyCon -> () Source #

Outputable IfaceTyCon # 
Instance details

Defined in IfaceType

Binary IfaceTyCon # 
Instance details

Defined in IfaceType

data IfaceTyConInfo Source #

Instances

Instances details
Eq IfaceTyConInfo # 
Instance details

Defined in IfaceType

NFData IfaceTyConInfo # 
Instance details

Defined in IfaceType

Methods

rnf :: IfaceTyConInfo -> () Source #

Binary IfaceTyConInfo # 
Instance details

Defined in IfaceType

data IfaceTyConSort Source #

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

Constructors

IfaceNormalTyCon

a regular tycon

IfaceTupleTyCon !Arity !TupleSort

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

IfaceSumTyCon !Arity

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]

Instances

Instances details
Eq IfaceTyConSort # 
Instance details

Defined in IfaceType

NFData IfaceTyConSort # 
Instance details

Defined in IfaceType

Methods

rnf :: IfaceTyConSort -> () Source #

Binary IfaceTyConSort # 
Instance details

Defined in IfaceType

data IfaceTyLit Source #

Instances

Instances details
Eq IfaceTyLit # 
Instance details

Defined in IfaceType

NFData IfaceTyLit # 
Instance details

Defined in IfaceType

Methods

rnf :: IfaceTyLit -> () Source #

Outputable IfaceTyLit # 
Instance details

Defined in IfaceType

Binary IfaceTyLit # 
Instance details

Defined in IfaceType

data IfaceAppArgs Source #

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

data IfaceBndr Source #

Instances

Instances details
NFData IfaceBndr # 
Instance details

Defined in IfaceType

Methods

rnf :: IfaceBndr -> () Source #

Outputable IfaceBndr # 
Instance details

Defined in IfaceType

Binary IfaceBndr # 
Instance details

Defined in IfaceType

data IfaceOneShot Source #

Instances

Instances details
NFData IfaceOneShot # 
Instance details

Defined in IfaceType

Methods

rnf :: IfaceOneShot -> () Source #

Binary IfaceOneShot # 
Instance details

Defined in IfaceType

data ArgFlag 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 [VarBndrs, TyCoVarBinders, TyConBinders, and visibility] in TyCoRep

Constructors

Inferred 
Specified 
Required 

Instances

Instances details
Eq ArgFlag # 
Instance details

Defined in Var

Methods

(==) :: ArgFlag -> ArgFlag -> Bool #

(/=) :: ArgFlag -> ArgFlag -> Bool #

Data ArgFlag # 
Instance details

Defined in Var

Methods

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 :: forall r r'. (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 # 
Instance details

Defined in Var

Outputable ArgFlag # 
Instance details

Defined in Var

Binary ArgFlag # 
Instance details

Defined in Var

Outputable tv => Outputable (VarBndr tv ArgFlag) # 
Instance details

Defined in Var

data AnonArgFlag Source #

The non-dependent version of ArgFlag.

Constructors

VisArg

Used for (->): an ordinary non-dependent arrow. The argument is visible in source code.

InvisArg

Used for (=>): a non-dependent predicate arrow. The argument is invisible in source code.

Instances

Instances details
Eq AnonArgFlag # 
Instance details

Defined in Var

Data AnonArgFlag # 
Instance details

Defined in Var

Methods

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

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

toConstr :: AnonArgFlag -> Constr Source #

dataTypeOf :: AnonArgFlag -> DataType Source #

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

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

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

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

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

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

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

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

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

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

Ord AnonArgFlag # 
Instance details

Defined in Var

Outputable AnonArgFlag # 
Instance details

Defined in Var

Binary AnonArgFlag # 
Instance details

Defined in Var

data ForallVisFlag Source #

Is a forall invisible (e.g., forall a b. {...}, with a dot) or visible (e.g., forall a b -> {...}, with an arrow)?

Constructors

ForallVis

A visible forall (with an arrow)

ForallInvis

An invisible forall (with a dot)

Instances

Instances details
Eq ForallVisFlag # 
Instance details

Defined in Var

Data ForallVisFlag # 
Instance details

Defined in Var

Methods

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

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

toConstr :: ForallVisFlag -> Constr Source #

dataTypeOf :: ForallVisFlag -> DataType Source #

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

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

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

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

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

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

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

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

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

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

Ord ForallVisFlag # 
Instance details

Defined in Var

Outputable ForallVisFlag # 
Instance details

Defined in 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.

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

Build the tyConKind from the binders and the result kind. Keep in sync with mkTyConKind in types/TyCon.

ifForAllBndrName :: IfaceForAllBndr -> IfLclName Source #

Extract the variable name from an IfaceForAllBndr.

ifTyConBinderName :: IfaceTyConBinder -> IfLclName Source #

Extract the variable name from an IfaceTyConBinder.

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 #