ghc-8.4.4: The GHC API

Safe HaskellNone
LanguageHaskell2010

HsTypes

Synopsis

Documentation

data HsType pass Source #

Haskell Type

Constructors

HsForAllTy

Fields

HsQualTy 

Fields

HsTyVar Promoted (Located (IdP pass))
HsAppsTy [LHsAppType pass]
HsAppTy (LHsType pass) (LHsType pass)
HsFunTy (LHsType pass) (LHsType pass)
HsListTy (LHsType pass)
HsPArrTy (LHsType pass)
HsTupleTy HsTupleSort [LHsType pass]
HsSumTy [LHsType pass]
HsOpTy (LHsType pass) (Located (IdP pass)) (LHsType pass)
HsParTy (LHsType pass)
HsIParamTy (Located HsIPName) (LHsType pass)
(?x :: ty)
HsEqTy (LHsType pass) (LHsType pass)
ty1 ~ ty2
HsKindSig (LHsType pass) (LHsKind pass)
(ty :: kind)
HsSpliceTy (HsSplice pass) (PostTc pass Kind)
HsDocTy (LHsType pass) LHsDocString
HsBangTy HsSrcBang (LHsType pass)
HsRecTy [LConDeclField pass]
HsCoreTy Type
HsExplicitListTy Promoted (PostTc pass Kind) [LHsType pass]
HsExplicitTupleTy [PostTc pass Kind] [LHsType pass]
HsTyLit HsTyLit
HsWildCardTy (HsWildCardInfo pass)
Instances
DataId pass => Data (HsType pass) Source # 
Instance details

Defined in HsTypes

Methods

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

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

toConstr :: HsType pass -> Constr #

dataTypeOf :: HsType pass -> DataType #

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

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

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

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

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

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

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

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

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

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

(SourceTextX pass, OutputableBndrId pass) => Outputable (HsType pass) Source # 
Instance details

Defined in HsTypes

Methods

ppr :: HsType pass -> SDoc Source #

pprPrec :: Rational -> HsType pass -> SDoc Source #

type LHsType pass Source #

Arguments

 = Located (HsType pass)

May have AnnKeywordId : AnnComma when in a list

Located Haskell Type

type HsKind pass = HsType pass Source #

Haskell Kind

type LHsKind pass Source #

Arguments

 = Located (HsKind pass)

AnnKeywordId : AnnDcolon

Located Haskell Kind

data HsTyVarBndr pass Source #

Haskell Type Variable Binder

Instances
DataId pass => Data (HsTyVarBndr pass) Source # 
Instance details

Defined in HsTypes

Methods

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

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

toConstr :: HsTyVarBndr pass -> Constr #

dataTypeOf :: HsTyVarBndr pass -> DataType #

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

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

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

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

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

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

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

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

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

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

(SourceTextX pass, OutputableBndrId pass) => Outputable (HsTyVarBndr pass) Source # 
Instance details

Defined in HsTypes

type LHsTyVarBndr pass = Located (HsTyVarBndr pass) Source #

Located Haskell Type Variable Binder

data LHsQTyVars pass Source #

Located Haskell Quantified Type Variables

Constructors

HsQTvs 
Instances
DataId pass => Data (LHsQTyVars pass) Source # 
Instance details

Defined in HsTypes

Methods

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

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

toConstr :: LHsQTyVars pass -> Constr #

dataTypeOf :: LHsQTyVars pass -> DataType #

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

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

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

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

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

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

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

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

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

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

(SourceTextX pass, OutputableBndrId pass) => Outputable (LHsQTyVars pass) Source # 
Instance details

Defined in HsTypes

Methods

ppr :: LHsQTyVars pass -> SDoc Source #

pprPrec :: Rational -> LHsQTyVars pass -> SDoc Source #

data HsImplicitBndrs pass thing Source #

Haskell Implicit Binders

Constructors

HsIB 

Fields

Instances
(DataId pass, Data thing) => Data (HsImplicitBndrs pass thing) Source # 
Instance details

Defined in HsTypes

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> HsImplicitBndrs pass thing -> c (HsImplicitBndrs pass thing) #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (HsImplicitBndrs pass thing) #

toConstr :: HsImplicitBndrs pass thing -> Constr #

dataTypeOf :: HsImplicitBndrs pass thing -> DataType #

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

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

gmapT :: (forall b. Data b => b -> b) -> HsImplicitBndrs pass thing -> HsImplicitBndrs pass thing #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> HsImplicitBndrs pass thing -> r #

gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> HsImplicitBndrs pass thing -> r #

gmapQ :: (forall d. Data d => d -> u) -> HsImplicitBndrs pass thing -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> HsImplicitBndrs pass thing -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> HsImplicitBndrs pass thing -> m (HsImplicitBndrs pass thing) #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> HsImplicitBndrs pass thing -> m (HsImplicitBndrs pass thing) #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> HsImplicitBndrs pass thing -> m (HsImplicitBndrs pass thing) #

Outputable thing => Outputable (HsImplicitBndrs pass thing) Source # 
Instance details

Defined in HsTypes

Methods

ppr :: HsImplicitBndrs pass thing -> SDoc Source #

pprPrec :: Rational -> HsImplicitBndrs pass thing -> SDoc Source #

data HsWildCardBndrs pass thing Source #

Haskell Wildcard Binders

Constructors

HsWC 

Fields

Instances
(DataId pass, Data thing) => Data (HsWildCardBndrs pass thing) Source # 
Instance details

Defined in HsTypes

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> HsWildCardBndrs pass thing -> c (HsWildCardBndrs pass thing) #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (HsWildCardBndrs pass thing) #

toConstr :: HsWildCardBndrs pass thing -> Constr #

dataTypeOf :: HsWildCardBndrs pass thing -> DataType #

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

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

gmapT :: (forall b. Data b => b -> b) -> HsWildCardBndrs pass thing -> HsWildCardBndrs pass thing #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> HsWildCardBndrs pass thing -> r #

gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> HsWildCardBndrs pass thing -> r #

gmapQ :: (forall d. Data d => d -> u) -> HsWildCardBndrs pass thing -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> HsWildCardBndrs pass thing -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> HsWildCardBndrs pass thing -> m (HsWildCardBndrs pass thing) #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> HsWildCardBndrs pass thing -> m (HsWildCardBndrs pass thing) #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> HsWildCardBndrs pass thing -> m (HsWildCardBndrs pass thing) #

Outputable thing => Outputable (HsWildCardBndrs pass thing) Source # 
Instance details

Defined in HsTypes

Methods

ppr :: HsWildCardBndrs pass thing -> SDoc Source #

pprPrec :: Rational -> HsWildCardBndrs pass thing -> SDoc Source #

type LHsSigType pass = HsImplicitBndrs pass (LHsType pass) Source #

Located Haskell Signature Type

type LHsSigWcType pass = HsWildCardBndrs pass (LHsSigType pass) Source #

Located Haskell Signature Wildcard Type

type LHsWcType pass = HsWildCardBndrs pass (LHsType pass) Source #

Located Haskell Wildcard Type

data HsTupleSort Source #

Haskell Tuple Sort

Instances
Data HsTupleSort Source # 
Instance details

Defined in HsTypes

Methods

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

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

toConstr :: HsTupleSort -> Constr #

dataTypeOf :: HsTupleSort -> DataType #

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

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

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

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

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

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

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

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

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

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

data Promoted Source #

Promoted data types.

Constructors

Promoted 
NotPromoted 
Instances
Eq Promoted Source # 
Instance details

Defined in HsTypes

Data Promoted Source # 
Instance details

Defined in HsTypes

Methods

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

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

toConstr :: Promoted -> Constr #

dataTypeOf :: Promoted -> DataType #

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

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

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

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

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

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

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

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

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

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

Show Promoted Source # 
Instance details

Defined in HsTypes

type HsContext pass = [LHsType pass] Source #

Haskell Context

type LHsContext pass Source #

Arguments

 = Located (HsContext pass)

AnnKeywordId : AnnUnit

Located Haskell Context

data HsTyLit Source #

Haskell Type Literal

Instances
Data HsTyLit Source # 
Instance details

Defined in HsTypes

Methods

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

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

toConstr :: HsTyLit -> Constr #

dataTypeOf :: HsTyLit -> DataType #

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

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

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

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

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

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

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

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

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

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

Outputable HsTyLit Source # 
Instance details

Defined in HsTypes

newtype HsIPName Source #

These names are used early on to store the names of implicit parameters. They completely disappear after type-checking.

Constructors

HsIPName FastString 
Instances
Eq HsIPName Source # 
Instance details

Defined in HsTypes

Data HsIPName Source # 
Instance details

Defined in HsTypes

Methods

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

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

toConstr :: HsIPName -> Constr #

dataTypeOf :: HsIPName -> DataType #

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

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

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

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

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

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

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

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

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

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

OutputableBndr HsIPName Source # 
Instance details

Defined in HsTypes

Outputable HsIPName Source # 
Instance details

Defined in HsTypes

data HsAppType pass Source #

Haskell Application Type

Constructors

HsAppInfix (Located (IdP pass)) 
HsAppPrefix (LHsType pass) 
Instances
DataId pass => Data (HsAppType pass) Source # 
Instance details

Defined in HsTypes

Methods

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

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

toConstr :: HsAppType pass -> Constr #

dataTypeOf :: HsAppType pass -> DataType #

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

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

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

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

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

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

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

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

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

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

(SourceTextX pass, OutputableBndrId pass) => Outputable (HsAppType pass) Source # 
Instance details

Defined in HsTypes

Methods

ppr :: HsAppType pass -> SDoc Source #

pprPrec :: Rational -> HsAppType pass -> SDoc Source #

type LHsAppType pass Source #

Located Haskell Application Type

type LBangType pass = Located (BangType pass) Source #

Located Bang Type

type BangType pass = HsType pass Source #

Bang Type

data HsSrcBang Source #

Haskell Source Bang

Bangs on data constructor arguments as the user wrote them in the source code.

(HsSrcBang _ SrcUnpack SrcLazy) and (HsSrcBang _ SrcUnpack NoSrcStrict) (without StrictData) makes no sense, we emit a warning (in checkValidDataCon) and treat it like (HsSrcBang _ NoSrcUnpack SrcLazy)

Instances
Data HsSrcBang Source # 
Instance details

Defined in DataCon

Methods

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

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

toConstr :: HsSrcBang -> Constr #

dataTypeOf :: HsSrcBang -> DataType #

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

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

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

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

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

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

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

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

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

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

Outputable HsSrcBang Source # 
Instance details

Defined in DataCon

data HsImplBang Source #

Haskell Implementation Bang

Bangs of data constructor arguments as generated by the compiler after consulting HsSrcBang, flags, etc.

Constructors

HsLazy

Lazy field, or one with an unlifted type

HsStrict

Strict but not unpacked field

HsUnpack (Maybe Coercion)

Strict and unpacked field co :: arg-ty ~ product-ty HsBang

Instances
Data HsImplBang Source # 
Instance details

Defined in DataCon

Methods

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

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

toConstr :: HsImplBang -> Constr #

dataTypeOf :: HsImplBang -> DataType #

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

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

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

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

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

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

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

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

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

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

Outputable HsImplBang Source # 
Instance details

Defined in DataCon

data SrcStrictness Source #

Source Strictness

What strictness annotation the user wrote

Constructors

SrcLazy

Lazy, ie '~'

SrcStrict

Strict, ie !

NoSrcStrict

no strictness annotation

Instances
Eq SrcStrictness Source # 
Instance details

Defined in DataCon

Data SrcStrictness Source # 
Instance details

Defined in DataCon

Methods

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

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

toConstr :: SrcStrictness -> Constr #

dataTypeOf :: SrcStrictness -> DataType #

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

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

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

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

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

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

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

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

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

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

Outputable SrcStrictness Source # 
Instance details

Defined in DataCon

Binary SrcStrictness Source # 
Instance details

Defined in DataCon

data SrcUnpackedness Source #

Source Unpackedness

What unpackedness the user requested

Constructors

SrcUnpack

{--} specified

SrcNoUnpack

{--} specified

NoSrcUnpack

no unpack pragma

Instances
Eq SrcUnpackedness Source # 
Instance details

Defined in DataCon

Data SrcUnpackedness Source # 
Instance details

Defined in DataCon

Methods

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

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

toConstr :: SrcUnpackedness -> Constr #

dataTypeOf :: SrcUnpackedness -> DataType #

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

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

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

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

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

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

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

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

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

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

Outputable SrcUnpackedness Source # 
Instance details

Defined in DataCon

Binary SrcUnpackedness Source # 
Instance details

Defined in DataCon

data ConDeclField pass Source #

Constructor Declaration Field

Constructors

ConDeclField

Fields

Instances
DataId pass => Data (ConDeclField pass) Source # 
Instance details

Defined in HsTypes

Methods

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

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

toConstr :: ConDeclField pass -> Constr #

dataTypeOf :: ConDeclField pass -> DataType #

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

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

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

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

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

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

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

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

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

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

(SourceTextX pass, OutputableBndrId pass) => Outputable (ConDeclField pass) Source # 
Instance details

Defined in HsTypes

type LConDeclField pass Source #

Arguments

 = Located (ConDeclField pass)

May have AnnKeywordId : AnnComma when in a list

Located Constructor Declaration Field

updateGadtResult Source #

Arguments

:: Monad m 
=> (SDoc -> m ()) 
-> SDoc 
-> HsConDetails (LHsType GhcRn) (Located [LConDeclField GhcRn])

Original details

-> LHsType GhcRn

Original result type

-> m (HsConDetails (LHsType GhcRn) (Located [LConDeclField GhcRn]), LHsType GhcRn) 

data HsConDetails arg rec Source #

Haskell Constructor Details

Constructors

PrefixCon [arg] 
RecCon rec 
InfixCon arg arg 
Instances
(Data arg, Data rec) => Data (HsConDetails arg rec) Source # 
Instance details

Defined in HsTypes

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> HsConDetails arg rec -> c (HsConDetails arg rec) #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (HsConDetails arg rec) #

toConstr :: HsConDetails arg rec -> Constr #

dataTypeOf :: HsConDetails arg rec -> DataType #

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

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

gmapT :: (forall b. Data b => b -> b) -> HsConDetails arg rec -> HsConDetails arg rec #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> HsConDetails arg rec -> r #

gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> HsConDetails arg rec -> r #

gmapQ :: (forall d. Data d => d -> u) -> HsConDetails arg rec -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> HsConDetails arg rec -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> HsConDetails arg rec -> m (HsConDetails arg rec) #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> HsConDetails arg rec -> m (HsConDetails arg rec) #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> HsConDetails arg rec -> m (HsConDetails arg rec) #

(Outputable arg, Outputable rec) => Outputable (HsConDetails arg rec) Source # 
Instance details

Defined in HsTypes

Methods

ppr :: HsConDetails arg rec -> SDoc Source #

pprPrec :: Rational -> HsConDetails arg rec -> SDoc Source #

data FieldOcc pass Source #

Field Occurrence

Represents an *occurrence* of an unambiguous field. We store both the RdrName the user originally wrote, and after the renamer, the selector function.

Constructors

FieldOcc 

Fields

Instances
Eq (PostRn pass (IdP pass)) => Eq (FieldOcc pass) Source # 
Instance details

Defined in HsTypes

Methods

(==) :: FieldOcc pass -> FieldOcc pass -> Bool #

(/=) :: FieldOcc pass -> FieldOcc pass -> Bool #

DataId pass => Data (FieldOcc pass) Source # 
Instance details

Defined in HsTypes

Methods

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

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

toConstr :: FieldOcc pass -> Constr #

dataTypeOf :: FieldOcc pass -> DataType #

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

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

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

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

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

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

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

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

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

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

Ord (PostRn pass (IdP pass)) => Ord (FieldOcc pass) Source # 
Instance details

Defined in HsTypes

Methods

compare :: FieldOcc pass -> FieldOcc pass -> Ordering #

(<) :: FieldOcc pass -> FieldOcc pass -> Bool #

(<=) :: FieldOcc pass -> FieldOcc pass -> Bool #

(>) :: FieldOcc pass -> FieldOcc pass -> Bool #

(>=) :: FieldOcc pass -> FieldOcc pass -> Bool #

max :: FieldOcc pass -> FieldOcc pass -> FieldOcc pass #

min :: FieldOcc pass -> FieldOcc pass -> FieldOcc pass #

Outputable (FieldOcc pass) Source # 
Instance details

Defined in HsTypes

Methods

ppr :: FieldOcc pass -> SDoc Source #

pprPrec :: Rational -> FieldOcc pass -> SDoc Source #

type LFieldOcc pass = Located (FieldOcc pass) Source #

Located Field Occurrence

data AmbiguousFieldOcc pass Source #

Ambiguous Field Occurrence

Represents an *occurrence* of a field that is potentially ambiguous after the renamer, with the ambiguity resolved by the typechecker. We always store the RdrName that the user originally wrote, and store the selector function after the renamer (for unambiguous occurrences) or the typechecker (for ambiguous occurrences).

See Note [HsRecField and HsRecUpdField] in HsPat and Note [Disambiguating record fields] in TcExpr. See Note [Located RdrNames] in HsExpr

Constructors

Unambiguous (Located RdrName) (PostRn pass (IdP pass)) 
Ambiguous (Located RdrName) (PostTc pass (IdP pass)) 
Instances
DataId pass => Data (AmbiguousFieldOcc pass) Source # 
Instance details

Defined in HsTypes

Methods

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

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

toConstr :: AmbiguousFieldOcc pass -> Constr #

dataTypeOf :: AmbiguousFieldOcc pass -> DataType #

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

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

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

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

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

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

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

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

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

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

OutputableBndr (AmbiguousFieldOcc pass) Source # 
Instance details

Defined in HsTypes

Outputable (AmbiguousFieldOcc pass) Source # 
Instance details

Defined in HsTypes

newtype HsWildCardInfo pass Source #

Constructors

AnonWildCard (PostRn pass (Located Name)) 
Instances
DataId pass => Data (HsWildCardInfo pass) Source # 
Instance details

Defined in HsTypes

Methods

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

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

toConstr :: HsWildCardInfo pass -> Constr #

dataTypeOf :: HsWildCardInfo pass -> DataType #

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

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

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

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

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

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

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

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

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

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

Outputable (HsWildCardInfo pass) Source # 
Instance details

Defined in HsTypes

hsImplicitBody :: HsImplicitBndrs pass thing -> thing Source #

isHsKindedTyVar :: HsTyVarBndr pass -> Bool Source #

Does this HsTyVarBndr come with an explicit kind annotation?

hsTvbAllKinded :: LHsQTyVars pass -> Bool Source #

Do all type variables in this LHsQTyVars come with kind annotations?

splitLHsPatSynTy :: LHsType pass -> ([LHsTyVarBndr pass], LHsContext pass, [LHsTyVarBndr pass], LHsContext pass, LHsType pass) Source #

splitHsAppsTy :: [LHsAppType pass] -> ([[LHsType pass]], [Located (IdP pass)]) Source #

Splits a [HsAppType pass] (the payload of an HsAppsTy) into regions of prefix types (normal types) and infix operators. If splitHsAppsTy tys = (non_syms, syms), then tys starts with the first element of non_syms followed by the first element of syms followed by the next element of non_syms, etc. It is guaranteed that the non_syms list has one more element than the syms list.

getAppsTyHead_maybe :: [LHsAppType pass] -> Maybe (LHsType pass, [LHsType pass], LexicalFixity) Source #

Retrieves the head of an HsAppsTy, if this can be done unambiguously, without consulting fixities.

mkHsOpTy :: LHsType pass -> Located (IdP pass) -> LHsType pass -> HsType pass Source #

mkHsAppTy :: LHsType pass -> LHsType pass -> LHsType pass Source #

mkHsAppTys :: LHsType pass -> [LHsType pass] -> LHsType pass Source #

hsLTyVarBndrToType :: LHsTyVarBndr pass -> LHsType pass Source #

Convert a LHsTyVarBndr to an equivalent LHsType.

hsLTyVarBndrsToTypes :: LHsQTyVars pass -> [LHsType pass] Source #

Convert a LHsTyVarBndrs to a list of types. Works on *type* variable only, no kind vars.

pprHsForAllExtra :: (SourceTextX pass, OutputableBndrId pass) => Maybe SrcSpan -> [LHsTyVarBndr pass] -> LHsContext pass -> SDoc Source #

Version of pprHsForAll that can also print an extra-constraints wildcard, e.g. _ => a -> Bool or (Show a, _) => a -> String. This underscore will be printed when the 'Maybe SrcSpan' argument is a Just containing the location of the extra-constraints wildcard. A special function for this is needed, as the extra-constraints wildcard is removed from the actual context and type, and stored in a separate field, thus just printing the type will not print the extra-constraints wildcard.

isCompoundHsType :: LHsType pass -> Bool Source #

Return True for compound types that will need parentheses when used in an argument position.

parenthesizeCompoundHsType :: LHsType pass -> LHsType pass Source #

parenthesizeCompoundHsType ty checks if isCompoundHsType ty is true, and if so, surrounds ty with an HsParTy. Otherwise, it simply returns ty.