ghc-8.2.1.20171108: The GHC API

Safe HaskellNone
LanguageHaskell2010

IfaceType

Synopsis

Documentation

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 !Bool

a type equality. True indicates kind-homogeneous. See Note [Equality predicates in IfaceType] for details.

data IsPromoted Source #

Is a TyCon a promoted data constructor or just a normal type constructor?

Constructors

IsNotPromoted 
IsPromoted 

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 [TyBinders and ArgFlags] in TyCoRep

Constructors

Required 
Specified 
Inferred 

Instances

Eq ArgFlag # 

Methods

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

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

Data ArgFlag # 

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 :: (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 # 
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.

ifTyConBinderTyVar :: IfaceTyConBinder -> IfaceTvBndr Source #

Extract a IfaceTvBndr from a IfaceTyConBinder

ifTyConBinderName :: IfaceTyConBinder -> IfLclName Source #

Extract the variable name from a IfaceTyConBinder

eqIfaceTvBndrs :: IfRnEnv2 -> [IfaceTvBndr] -> [IfaceTvBndr] -> Maybe IfRnEnv2 Source #

Similar to eqTyVarBndrs, checks that tyvar lists are the same length and have matching kinds; if so, extend the IfRnEnv2. Returns Nothing if they don't match.

pprIfaceContext :: [IfacePredType] -> SDoc Source #

Prints a context or () if empty. This is used when, e.g., we want to display a context in an error message.

pprIfaceContextArr :: [IfacePredType] -> SDoc Source #

Prints "(C a, D b) =>", including the arrow. This is used when we want to print a context in a type.

pprIfaceForAll :: [IfaceForAllBndr] -> SDoc Source #

Render the "forall ... ." or "forall ... ->" bit of a type.

substIfaceType :: IfaceTySubst -> IfaceType -> IfaceType Source #

mkIfaceTySubst :: [IfaceTvBndr] -> [IfaceType] -> IfaceTySubst Source #