ghc-8.2.2: The GHC API

Safe Haskell | None
Language | Haskell2010

HsTypes

Synopsis

- data HsType name
  - = HsForAllTy {
    - hst_bndrs :: [LHsTyVarBndr name]
    - hst_body :: LHsType name
    }
  - | HsQualTy {
    - hst_ctxt :: LHsContext name
    - hst_body :: LHsType name
    }
  - | HsTyVar Promoted (Located name)
  - | HsAppsTy [LHsAppType name]
  - | HsAppTy (LHsType name) (LHsType name)
  - | HsFunTy (LHsType name) (LHsType name)
  - | HsListTy (LHsType name)
  - | HsPArrTy (LHsType name)
  - | HsTupleTy HsTupleSort [LHsType name]
  - | HsSumTy [LHsType name]
  - | HsOpTy (LHsType name) (Located name) (LHsType name)
  - | HsParTy (LHsType name)
  - | HsIParamTy (Located HsIPName) (LHsType name)
  - | HsEqTy (LHsType name) (LHsType name)
  - | HsKindSig (LHsType name) (LHsKind name)
  - | HsSpliceTy (HsSplice name) (PostTc name Kind)
  - | HsDocTy (LHsType name) LHsDocString
  - | HsBangTy HsSrcBang (LHsType name)
  - | HsRecTy [LConDeclField name]
  - | HsCoreTy Type
  - | HsExplicitListTy Promoted (PostTc name Kind) [LHsType name]
  - | HsExplicitTupleTy [PostTc name Kind] [LHsType name]
  - | HsTyLit HsTyLit
  - | HsWildCardTy (HsWildCardInfo name)
- type LHsType name = Located (HsType name)
- type HsKind name = HsType name
- type LHsKind name = Located (HsKind name)
- data HsTyVarBndr name
  - = UserTyVar (Located name)
  - | KindedTyVar (Located name) (LHsKind name)
- type LHsTyVarBndr name = Located (HsTyVarBndr name)
- data LHsQTyVars name = HsQTvs {
  - hsq_implicit :: PostRn name [Name]
  - hsq_explicit :: [LHsTyVarBndr name]
  - hsq_dependent :: PostRn name NameSet
  }
- data HsImplicitBndrs name thing = HsIB {
  - hsib_vars :: PostRn name [Name]
  - hsib_body :: thing
  - hsib_closed :: PostRn name Bool
  }
- data HsWildCardBndrs name thing = HsWC {
  - hswc_wcs :: PostRn name [Name]
  - hswc_body :: thing
  }
- type LHsSigType name = HsImplicitBndrs name (LHsType name)
- type LHsSigWcType name = HsWildCardBndrs name (LHsSigType name)
- type LHsWcType name = HsWildCardBndrs name (LHsType name)
- data HsTupleSort
  - = HsUnboxedTuple
  - | HsBoxedTuple
  - | HsConstraintTuple
  - | HsBoxedOrConstraintTuple
- data Promoted
  - = Promoted
  - | NotPromoted
- type HsContext name = [LHsType name]
- type LHsContext name = Located (HsContext name)
- data HsTyLit
  - = HsNumTy SourceText Integer
  - | HsStrTy SourceText FastString
- newtype HsIPName = HsIPName FastString
- hsIPNameFS :: HsIPName -> FastString
- data HsAppType name
  - = HsAppInfix (Located name)
  - | HsAppPrefix (LHsType name)
- type LHsAppType name = Located (HsAppType name)
- type LBangType name = Located (BangType name)
- type BangType name = HsType name
- data HsSrcBang = HsSrcBang SourceText SrcUnpackedness SrcStrictness
- data HsImplBang
  - = HsLazy
  - | HsStrict
  - | HsUnpack (Maybe Coercion)
- data SrcStrictness
  - = SrcLazy
  - | SrcStrict
  - | NoSrcStrict
- data SrcUnpackedness
  - = SrcUnpack
  - | SrcNoUnpack
  - | NoSrcUnpack
- getBangType :: LHsType a -> LHsType a
- getBangStrictness :: LHsType a -> HsSrcBang
- data ConDeclField name = ConDeclField {
  - cd_fld_names :: [LFieldOcc name]
  - cd_fld_type :: LBangType name
  - cd_fld_doc :: Maybe LHsDocString
  }
- type LConDeclField name = Located (ConDeclField name)
- pprConDeclFields :: OutputableBndrId name => [LConDeclField name] -> SDoc
- updateGadtResult :: Monad m => (SDoc -> m ()) -> SDoc -> HsConDetails (LHsType Name) (Located [LConDeclField Name]) -> LHsType Name -> m (HsConDetails (LHsType Name) (Located [LConDeclField Name]), LHsType Name)
- data HsConDetails arg rec
  - = PrefixCon [arg]
  - | RecCon rec
  - | InfixCon arg arg
- data FieldOcc name = FieldOcc {
  - rdrNameFieldOcc :: Located RdrName
  - selectorFieldOcc :: PostRn name name
  }
- type LFieldOcc name = Located (FieldOcc name)
- mkFieldOcc :: Located RdrName -> FieldOcc RdrName
- data AmbiguousFieldOcc name
  - = Unambiguous (Located RdrName) (PostRn name name)
  - | Ambiguous (Located RdrName) (PostTc name name)
- mkAmbiguousFieldOcc :: Located RdrName -> AmbiguousFieldOcc RdrName
- rdrNameAmbiguousFieldOcc :: AmbiguousFieldOcc name -> RdrName
- selectorAmbiguousFieldOcc :: AmbiguousFieldOcc Id -> Id
- unambiguousFieldOcc :: AmbiguousFieldOcc Id -> FieldOcc Id
- ambiguousFieldOcc :: FieldOcc name -> AmbiguousFieldOcc name
- newtype HsWildCardInfo name = AnonWildCard (PostRn name (Located Name))
- mkAnonWildCardTy :: HsType RdrName
- wildCardName :: HsWildCardInfo Name -> Name
- sameWildCard :: Located (HsWildCardInfo name) -> Located (HsWildCardInfo name) -> Bool
- mkHsImplicitBndrs :: thing -> HsImplicitBndrs RdrName thing
- mkHsWildCardBndrs :: thing -> HsWildCardBndrs RdrName thing
- hsImplicitBody :: HsImplicitBndrs name thing -> thing
- mkEmptyImplicitBndrs :: thing -> HsImplicitBndrs Name thing
- mkEmptyWildCardBndrs :: thing -> HsWildCardBndrs Name thing
- mkHsQTvs :: [LHsTyVarBndr RdrName] -> LHsQTyVars RdrName
- hsQTvExplicit :: LHsQTyVars name -> [LHsTyVarBndr name]
- emptyLHsQTvs :: LHsQTyVars Name
- isEmptyLHsQTvs :: LHsQTyVars Name -> Bool
- isHsKindedTyVar :: HsTyVarBndr name -> Bool
- hsTvbAllKinded :: LHsQTyVars name -> Bool
- hsScopedTvs :: LHsSigType Name -> [Name]
- hsWcScopedTvs :: LHsSigWcType Name -> [Name]
- dropWildCards :: LHsSigWcType name -> LHsSigType name
- hsTyVarName :: HsTyVarBndr name -> name
- hsAllLTyVarNames :: LHsQTyVars Name -> [Name]
- hsLTyVarLocNames :: LHsQTyVars name -> [Located name]
- hsLTyVarName :: LHsTyVarBndr name -> name
- hsLTyVarLocName :: LHsTyVarBndr name -> Located name
- hsExplicitLTyVarNames :: LHsQTyVars name -> [name]
- splitLHsInstDeclTy :: LHsSigType Name -> ([Name], LHsContext Name, LHsType Name)
- getLHsInstDeclHead :: LHsSigType name -> LHsType name
- getLHsInstDeclClass_maybe :: LHsSigType name -> Maybe (Located name)
- splitLHsPatSynTy :: LHsType name -> ([LHsTyVarBndr name], LHsContext name, [LHsTyVarBndr name], LHsContext name, LHsType name)
- splitLHsForAllTy :: LHsType name -> ([LHsTyVarBndr name], LHsType name)
- splitLHsQualTy :: LHsType name -> (LHsContext name, LHsType name)
- splitLHsSigmaTy :: LHsType name -> ([LHsTyVarBndr name], LHsContext name, LHsType name)
- splitHsFunType :: LHsType Name -> ([LHsType Name], LHsType Name)
- splitHsAppsTy :: [LHsAppType name] -> ([[LHsType name]], [Located name])
- splitHsAppTys :: LHsType Name -> [LHsType Name] -> (LHsType Name, [LHsType Name])
- getAppsTyHead_maybe :: [LHsAppType name] -> Maybe (LHsType name, [LHsType name], LexicalFixity)
- hsTyGetAppHead_maybe :: LHsType name -> Maybe (Located name, [LHsType name])
- mkHsOpTy :: LHsType name -> Located name -> LHsType name -> HsType name
- mkHsAppTy :: LHsType name -> LHsType name -> LHsType name
- mkHsAppTys :: LHsType name -> [LHsType name] -> LHsType name
- ignoreParens :: LHsType name -> LHsType name
- hsSigType :: LHsSigType name -> LHsType name
- hsSigWcType :: LHsSigWcType name -> LHsType name
- hsLTyVarBndrToType :: LHsTyVarBndr name -> LHsType name
- hsLTyVarBndrsToTypes :: LHsQTyVars name -> [LHsType name]
- pprParendHsType :: OutputableBndrId name => HsType name -> SDoc
- pprHsForAll :: OutputableBndrId name => [LHsTyVarBndr name] -> LHsContext name -> SDoc
- pprHsForAllTvs :: OutputableBndrId name => [LHsTyVarBndr name] -> SDoc
- pprHsForAllExtra :: OutputableBndrId name => Maybe SrcSpan -> [LHsTyVarBndr name] -> LHsContext name -> SDoc
- pprHsContext :: OutputableBndrId name => HsContext name -> SDoc
- pprHsContextNoArrow :: OutputableBndrId name => HsContext name -> SDoc
- pprHsContextMaybe :: OutputableBndrId name => HsContext name -> Maybe SDoc

# Documentation

data HsType name #

Haskell Type

Constructors

HsForAllTy

- `AnnKeywordId` : `AnnForall`, `AnnDot`,`AnnDarrow` For details on above see note [Api annotations] in ApiAnnotation

Fields

- hst_bndrs :: [LHsTyVarBndr name]
- hst_body :: LHsType name

HsQualTy |

Fields

- hst_ctxt :: LHsContext name
- hst_body :: LHsType name

HsTyVar Promoted (Located name)

- `AnnKeywordId` : None

HsAppsTy [LHsAppType name]

- `AnnKeywordId` : None

HsAppTy (LHsType name) (LHsType name)

- `AnnKeywordId` : None

HsFunTy (LHsType name) (LHsType name)

- `AnnKeywordId` : `AnnRarrow`,

HsListTy (LHsType name)

- `AnnKeywordId` : `AnnOpen` `'['`, `AnnClose` `']'`

HsPArrTy (LHsType name)

- `AnnKeywordId` : `AnnOpen` `'[:'`, `AnnClose` `':]'`

HsTupleTy HsTupleSort [LHsType name]

- `AnnKeywordId` : `AnnOpen` `'(' or '(#'`, `AnnClose` `')' or '#)'`

HsSumTy [LHsType name]

- `AnnKeywordId` : `AnnOpen` `'(#'`, `AnnClose` '#)'@

HsOpTy (LHsType name) (Located name) (LHsType name)

- `AnnKeywordId` : None

HsParTy (LHsType name)

- `AnnKeywordId` : `AnnOpen` `'('`, `AnnClose` `')'`

HsIParamTy (Located HsIPName) (LHsType name)

    (?x :: ty)

- `AnnKeywordId` : `AnnDcolon`

HsEqTy (LHsType name) (LHsType name)

    ty1 ~ ty2

- `AnnKeywordId` : `AnnTilde`

HsKindSig (LHsType name) (LHsKind name)

    (ty :: kind)

- `AnnKeywordId` : `AnnOpen` `'('`, `AnnDcolon`,`AnnClose` `')'`

HsSpliceTy (HsSplice name) (PostTc name Kind)

- `AnnKeywordId` : `AnnOpen` `'$('`, `AnnClose` `')'`

HsDocTy (LHsType name) LHsDocString

- `AnnKeywordId` : None

HsBangTy HsSrcBang (LHsType name)

- `AnnKeywordId` : `AnnOpen` `'{-# UNPACK' or '{-# NOUNPACK'`, `AnnClose` `'#-}'` `AnnBang` `'!'`

HsRecTy [LConDeclField name]

- `AnnKeywordId` : `AnnOpen` `'{'`, `AnnClose` `'}'`

HsCoreTy Type

- `AnnKeywordId` : None

HsExplicitListTy Promoted (PostTc name Kind) [LHsType name]

- `AnnKeywordId` : `AnnOpen` `"'["`, `AnnClose` `']'`

HsExplicitTupleTy [PostTc name Kind] [LHsType name]

- `AnnKeywordId` : `AnnOpen` `"'("`, `AnnClose` `')'`

HsTyLit HsTyLit

- `AnnKeywordId` : None

HsWildCardTy (HsWildCardInfo name)

- `AnnKeywordId` : None

Instances

DataId name => Data (HsType name) # |

Methods

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

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

toConstr :: HsType name -> Constr Source #

dataTypeOf :: HsType name -> DataType Source #

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

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

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

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

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

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

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

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

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

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

OutputableBndrId name => Outputable (HsType name) # |
Methods ppr :: HsType name -> SDoc # pprPrec :: Rational -> HsType name -> SDoc #

type LHsType name #

Arguments

= Located (HsType name) | May have `AnnKeywordId` : `AnnComma` when in a list

Located Haskell Type

type HsKind name = HsType name #

Haskell Kind

type LHsKind name #

Arguments

= Located (HsKind name) | `AnnKeywordId` : `AnnDcolon`

Located Haskell Kind

data HsTyVarBndr name #

Haskell Type Variable Binder

Constructors

UserTyVar (Located name) |

KindedTyVar (Located name) (LHsKind name)

- `AnnKeywordId` : `AnnOpen`, `AnnDcolon`, `AnnClose`

Instances

DataId name => Data (HsTyVarBndr name) # |

Methods

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

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

toConstr :: HsTyVarBndr name -> Constr Source #

dataTypeOf :: HsTyVarBndr name -> DataType Source #

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

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

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

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

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

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

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

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

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

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

OutputableBndrId name => Outputable (HsTyVarBndr name) # |
Methods ppr :: HsTyVarBndr name -> SDoc # pprPrec :: Rational -> HsTyVarBndr name -> SDoc #

type LHsTyVarBndr name = Located (HsTyVarBndr name) #

Located Haskell Type Variable Binder

data LHsQTyVars name #

Located Haskell Quantified Type Variables

Constructors

HsQTvs |

Fields

- hsq_implicit :: PostRn name [Name]
- hsq_explicit :: [LHsTyVarBndr name]
- hsq_dependent :: PostRn name NameSet

Instances

DataId name => Data (LHsQTyVars name) # |

Methods

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

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

toConstr :: LHsQTyVars name -> Constr Source #

dataTypeOf :: LHsQTyVars name -> DataType Source #

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

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

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

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

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

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

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

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

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

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

OutputableBndrId name => Outputable (LHsQTyVars name) # |
Methods ppr :: LHsQTyVars name -> SDoc # pprPrec :: Rational -> LHsQTyVars name -> SDoc #

data HsImplicitBndrs name thing #

Haskell Implicit Binders

Constructors

HsIB |

Fields

- hsib_vars :: PostRn name [Name]
- hsib_body :: thing
- hsib_closed :: PostRn name Bool

Instances

(Data name, Data thing, Data (PostRn name [Name]), Data (PostRn name Bool)) => Data (HsImplicitBndrs name thing) # |

Methods

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

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

toConstr :: HsImplicitBndrs name thing -> Constr Source #

dataTypeOf :: HsImplicitBndrs name thing -> DataType Source #

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

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

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

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

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

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

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

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

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

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

Outputable thing => Outputable (HsImplicitBndrs name thing) # |
Methods ppr :: HsImplicitBndrs name thing -> SDoc # pprPrec :: Rational -> HsImplicitBndrs name thing -> SDoc #

data HsWildCardBndrs name thing #

Haskell Wildcard Binders

Constructors

HsWC |

Fields

- hswc_wcs :: PostRn name [Name]
- hswc_body :: thing

Instances

(Data name, Data thing, Data (PostRn name [Name])) => Data (HsWildCardBndrs name thing) # |

Methods

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

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

toConstr :: HsWildCardBndrs name thing -> Constr Source #

dataTypeOf :: HsWildCardBndrs name thing -> DataType Source #

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

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

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

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

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

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

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

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

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

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

Outputable thing => Outputable (HsWildCardBndrs name thing) # |
Methods ppr :: HsWildCardBndrs name thing -> SDoc # pprPrec :: Rational -> HsWildCardBndrs name thing -> SDoc #

type LHsSigType name = HsImplicitBndrs name (LHsType name) #

Located Haskell Signature Type

type LHsSigWcType name = HsWildCardBndrs name (LHsSigType name) #

Located Haskell Signature Wildcard Type

type LHsWcType name = HsWildCardBndrs name (LHsType name) #

Located Haskell Wildcard Type

data HsTupleSort #

Haskell Tuple Sort

Constructors

HsUnboxedTuple |
HsBoxedTuple |
HsConstraintTuple |
HsBoxedOrConstraintTuple |

Instances

Data HsTupleSort # |

Methods

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

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

toConstr :: HsTupleSort -> Constr Source #

dataTypeOf :: HsTupleSort -> DataType Source #

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

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

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

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

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

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

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

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

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

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

data Promoted #

Promoted data types.

Constructors

Promoted |
NotPromoted |

Instances

Eq Promoted # |
Methods (==) :: Promoted -> Promoted -> Bool # (/=) :: Promoted -> Promoted -> Bool #
Data Promoted # |

Methods

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

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

toConstr :: Promoted -> Constr Source #

dataTypeOf :: Promoted -> DataType Source #

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

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

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

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

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

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

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

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

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

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

Show Promoted # |
Methods showsPrec :: Int -> Promoted -> ShowS Source # show :: Promoted -> String Source # showList :: [Promoted] -> ShowS Source #

type HsContext name = [LHsType name] #

Haskell Context

type LHsContext name #

Arguments

= Located (HsContext name) | `AnnKeywordId` : `AnnUnit`

Located Haskell Context

data HsTyLit #

Haskell Type Literal

Constructors

HsNumTy SourceText Integer |
HsStrTy SourceText FastString |

Instances

Data HsTyLit # |

Methods

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

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

toConstr :: HsTyLit -> Constr Source #

dataTypeOf :: HsTyLit -> DataType Source #

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

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

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

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

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

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

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

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

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

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

Outputable HsTyLit # |
Methods ppr :: HsTyLit -> SDoc # pprPrec :: Rational -> HsTyLit -> SDoc #

newtype HsIPName #

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 # |
Methods (==) :: HsIPName -> HsIPName -> Bool # (/=) :: HsIPName -> HsIPName -> Bool #
Data HsIPName # |

Methods

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

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

toConstr :: HsIPName -> Constr Source #

dataTypeOf :: HsIPName -> DataType Source #

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

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

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

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

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

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

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

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

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

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

OutputableBndr HsIPName # |
Methods pprBndr :: BindingSite -> HsIPName -> SDoc # pprPrefixOcc :: HsIPName -> SDoc # pprInfixOcc :: HsIPName -> SDoc # bndrIsJoin_maybe :: HsIPName -> Maybe Int #
Outputable HsIPName # |
Methods ppr :: HsIPName -> SDoc # pprPrec :: Rational -> HsIPName -> SDoc #

hsIPNameFS :: HsIPName -> FastString #

data HsAppType name #

Haskell Application Type

Constructors

HsAppInfix (Located name) |
HsAppPrefix (LHsType name) |

Instances

DataId name => Data (HsAppType name) # |

Methods

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

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

toConstr :: HsAppType name -> Constr Source #

dataTypeOf :: HsAppType name -> DataType Source #

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

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

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

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

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

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

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

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

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

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

OutputableBndrId name => Outputable (HsAppType name) # |
Methods ppr :: HsAppType name -> SDoc # pprPrec :: Rational -> HsAppType name -> SDoc #

type LHsAppType name #

Arguments

= Located (HsAppType name) | `AnnKeywordId` : `AnnSimpleQuote`

Located Haskell Application Type

type LBangType name = Located (BangType name) #

Located Bang Type

type BangType name = HsType name #

Bang Type

data HsSrcBang #

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)`

Constructors

HsSrcBang SourceText SrcUnpackedness SrcStrictness |

Instances

Data HsSrcBang # |

Methods

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

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

toConstr :: HsSrcBang -> Constr Source #

dataTypeOf :: HsSrcBang -> DataType Source #

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

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

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

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

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

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

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

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

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

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

Outputable HsSrcBang # |
Methods ppr :: HsSrcBang -> SDoc # pprPrec :: Rational -> HsSrcBang -> SDoc #

data HsImplBang #

Haskell Implementation Bang

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

Constructors

HsLazy | Lazy field
HsStrict | Strict but not unpacked field
HsUnpack (Maybe Coercion) | Strict and unpacked field co :: arg-ty ~ product-ty HsBang

Instances

Data HsImplBang # |

Methods

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

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

toConstr :: HsImplBang -> Constr Source #

dataTypeOf :: HsImplBang -> DataType Source #

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

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

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

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

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

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

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

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

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

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

Outputable HsImplBang # |
Methods ppr :: HsImplBang -> SDoc # pprPrec :: Rational -> HsImplBang -> SDoc #

data SrcStrictness #

Source Strictness

What strictness annotation the user wrote

Constructors

SrcLazy | Lazy, ie '~'
SrcStrict | Strict, ie `!`
NoSrcStrict | no strictness annotation

Instances

Eq SrcStrictness # |
Methods (==) :: SrcStrictness -> SrcStrictness -> Bool # (/=) :: SrcStrictness -> SrcStrictness -> Bool #
Data SrcStrictness # |

Methods

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

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

toConstr :: SrcStrictness -> Constr Source #

dataTypeOf :: SrcStrictness -> DataType Source #

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

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

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

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

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

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

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

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

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

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

Outputable SrcStrictness # |
Methods ppr :: SrcStrictness -> SDoc # pprPrec :: Rational -> SrcStrictness -> SDoc #
Binary SrcStrictness # |
Methods put_ :: BinHandle -> SrcStrictness -> IO () # put :: BinHandle -> SrcStrictness -> IO (Bin * SrcStrictness) # get :: BinHandle -> IO SrcStrictness #

data SrcUnpackedness #

Source Unpackedness

What unpackedness the user requested

Constructors

SrcUnpack | {--} specified
SrcNoUnpack | {--} specified
NoSrcUnpack | no unpack pragma

Instances

Eq SrcUnpackedness # |
Methods (==) :: SrcUnpackedness -> SrcUnpackedness -> Bool # (/=) :: SrcUnpackedness -> SrcUnpackedness -> Bool #
Data SrcUnpackedness # |

Methods

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

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

toConstr :: SrcUnpackedness -> Constr Source #

dataTypeOf :: SrcUnpackedness -> DataType Source #

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

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

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

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

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

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

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

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

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

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

Outputable SrcUnpackedness # |
Methods ppr :: SrcUnpackedness -> SDoc # pprPrec :: Rational -> SrcUnpackedness -> SDoc #
Binary SrcUnpackedness # |
Methods put_ :: BinHandle -> SrcUnpackedness -> IO () # put :: BinHandle -> SrcUnpackedness -> IO (Bin * SrcUnpackedness) # get :: BinHandle -> IO SrcUnpackedness #

getBangType :: LHsType a -> LHsType a #

getBangStrictness :: LHsType a -> HsSrcBang #

data ConDeclField name #

Constructor Declaration Field

Constructors

ConDeclField

- `AnnKeywordId` : `AnnDcolon`

Fields

- cd_fld_names :: [LFieldOcc name]

  See Note [ConDeclField names]

- cd_fld_type :: LBangType name
- cd_fld_doc :: Maybe LHsDocString

Instances

DataId name => Data (ConDeclField name) # |

Methods

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

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

toConstr :: ConDeclField name -> Constr Source #

dataTypeOf :: ConDeclField name -> DataType Source #

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

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

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

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

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

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

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

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

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

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

OutputableBndrId name => Outputable (ConDeclField name) # |
Methods ppr :: ConDeclField name -> SDoc # pprPrec :: Rational -> ConDeclField name -> SDoc #

type LConDeclField name #

Arguments

= Located (ConDeclField name) | May have `AnnKeywordId` : `AnnComma` when in a list

Located Constructor Declaration Field

pprConDeclFields :: OutputableBndrId name => [LConDeclField name] -> SDoc #

updateGadtResult #

Arguments

:: Monad m |
=> (SDoc -> m ()) |
-> SDoc |
-> HsConDetails (LHsType Name) (Located [LConDeclField Name]) | Original details
-> LHsType Name | Original result type
-> m (HsConDetails (LHsType Name) (Located [LConDeclField Name]), LHsType Name) |

data HsConDetails arg rec #

Haskell Constructor Details

Constructors

PrefixCon [arg] |
RecCon rec |
InfixCon arg arg |

Instances

(Data rec, Data arg) => Data (HsConDetails arg rec) # |

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) Source #

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

toConstr :: HsConDetails arg rec -> Constr Source #

dataTypeOf :: HsConDetails arg rec -> DataType Source #

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

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

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

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

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

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

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

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

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

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

(Outputable arg, Outputable rec) => Outputable (HsConDetails arg rec) # |
Methods ppr :: HsConDetails arg rec -> SDoc # pprPrec :: Rational -> HsConDetails arg rec -> SDoc #

data FieldOcc name #

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

- rdrNameFieldOcc :: Located RdrName

  See Note [Located RdrNames] in HsExpr

- selectorFieldOcc :: PostRn name name

Instances

Eq (PostRn name name) => Eq (FieldOcc name) # |
Methods (==) :: FieldOcc name -> FieldOcc name -> Bool # (/=) :: FieldOcc name -> FieldOcc name -> Bool #
(Data name, Data (PostRn name name)) => Data (FieldOcc name) # |

Methods

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

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

toConstr :: FieldOcc name -> Constr Source #

dataTypeOf :: FieldOcc name -> DataType Source #

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

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

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

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

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

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

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

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

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

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

Ord (PostRn name name) => Ord (FieldOcc name) # |
Methods compare :: FieldOcc name -> FieldOcc name -> Ordering # (<) :: FieldOcc name -> FieldOcc name -> Bool # (<=) :: FieldOcc name -> FieldOcc name -> Bool # (>) :: FieldOcc name -> FieldOcc name -> Bool # (>=) :: FieldOcc name -> FieldOcc name -> Bool # max :: FieldOcc name -> FieldOcc name -> FieldOcc name # min :: FieldOcc name -> FieldOcc name -> FieldOcc name #
Outputable (FieldOcc name) # |
Methods ppr :: FieldOcc name -> SDoc # pprPrec :: Rational -> FieldOcc name -> SDoc #

type LFieldOcc name = Located (FieldOcc name) #

Located Field Occurrence

mkFieldOcc :: Located RdrName -> FieldOcc RdrName #

data AmbiguousFieldOcc name #

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 name name) |
Ambiguous (Located RdrName) (PostTc name name) |

Instances

(Data name, Data (PostRn name name), Data (PostTc name name)) => Data (AmbiguousFieldOcc name) # |

Methods

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

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

toConstr :: AmbiguousFieldOcc name -> Constr Source #

dataTypeOf :: AmbiguousFieldOcc name -> DataType Source #

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

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

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

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

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

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

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

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

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

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

OutputableBndr (AmbiguousFieldOcc name) # |
Methods pprBndr :: BindingSite -> AmbiguousFieldOcc name -> SDoc # pprPrefixOcc :: AmbiguousFieldOcc name -> SDoc # pprInfixOcc :: AmbiguousFieldOcc name -> SDoc # bndrIsJoin_maybe :: AmbiguousFieldOcc name -> Maybe Int #
Outputable (AmbiguousFieldOcc name) # |
Methods ppr :: AmbiguousFieldOcc name -> SDoc # pprPrec :: Rational -> AmbiguousFieldOcc name -> SDoc #

mkAmbiguousFieldOcc :: Located RdrName -> AmbiguousFieldOcc RdrName #

rdrNameAmbiguousFieldOcc :: AmbiguousFieldOcc name -> RdrName #

selectorAmbiguousFieldOcc :: AmbiguousFieldOcc Id -> Id #

unambiguousFieldOcc :: AmbiguousFieldOcc Id -> FieldOcc Id #

ambiguousFieldOcc :: FieldOcc name -> AmbiguousFieldOcc name #

newtype HsWildCardInfo name #

Constructors

AnonWildCard (PostRn name (Located Name)) |

Instances

DataId name => Data (HsWildCardInfo name) # |

Methods

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

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

toConstr :: HsWildCardInfo name -> Constr Source #

dataTypeOf :: HsWildCardInfo name -> DataType Source #

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

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

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

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

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

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

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

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

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

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

Outputable (HsWildCardInfo name) # |
Methods ppr :: HsWildCardInfo name -> SDoc # pprPrec :: Rational -> HsWildCardInfo name -> SDoc #

mkAnonWildCardTy :: HsType RdrName #

wildCardName :: HsWildCardInfo Name -> Name #

sameWildCard :: Located (HsWildCardInfo name) -> Located (HsWildCardInfo name) -> Bool #

mkHsImplicitBndrs :: thing -> HsImplicitBndrs RdrName thing #

mkHsWildCardBndrs :: thing -> HsWildCardBndrs RdrName thing #

hsImplicitBody :: HsImplicitBndrs name thing -> thing #

mkEmptyImplicitBndrs :: thing -> HsImplicitBndrs Name thing #

mkEmptyWildCardBndrs :: thing -> HsWildCardBndrs Name thing #

mkHsQTvs :: [LHsTyVarBndr RdrName] -> LHsQTyVars RdrName #

hsQTvExplicit :: LHsQTyVars name -> [LHsTyVarBndr name] #

emptyLHsQTvs :: LHsQTyVars Name #

isEmptyLHsQTvs :: LHsQTyVars Name -> Bool #

isHsKindedTyVar :: HsTyVarBndr name -> Bool #

Does this `HsTyVarBndr` come with an explicit kind annotation?

hsTvbAllKinded :: LHsQTyVars name -> Bool #

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

hsScopedTvs :: LHsSigType Name -> [Name] #

hsWcScopedTvs :: LHsSigWcType Name -> [Name] #

dropWildCards :: LHsSigWcType name -> LHsSigType name #

hsTyVarName :: HsTyVarBndr name -> name #

hsAllLTyVarNames :: LHsQTyVars Name -> [Name] #

hsLTyVarLocNames :: LHsQTyVars name -> [Located name] #

hsLTyVarName :: LHsTyVarBndr name -> name #

hsLTyVarLocName :: LHsTyVarBndr name -> Located name #

hsExplicitLTyVarNames :: LHsQTyVars name -> [name] #

splitLHsInstDeclTy :: LHsSigType Name -> ([Name], LHsContext Name, LHsType Name) #

getLHsInstDeclHead :: LHsSigType name -> LHsType name #

getLHsInstDeclClass_maybe :: LHsSigType name -> Maybe (Located name) #

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

splitLHsForAllTy :: LHsType name -> ([LHsTyVarBndr name], LHsType name) #

splitLHsQualTy :: LHsType name -> (LHsContext name, LHsType name) #

splitLHsSigmaTy :: LHsType name -> ([LHsTyVarBndr name], LHsContext name, LHsType name) #

splitHsFunType :: LHsType Name -> ([LHsType Name], LHsType Name) #

splitHsAppsTy :: [LHsAppType name] -> ([[LHsType name]], [Located name]) #

Splits a [HsAppType name] (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.

splitHsAppTys :: LHsType Name -> [LHsType Name] -> (LHsType Name, [LHsType Name]) #

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

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

hsTyGetAppHead_maybe :: LHsType name -> Maybe (Located name, [LHsType name]) #

mkHsOpTy :: LHsType name -> Located name -> LHsType name -> HsType name #

mkHsAppTy :: LHsType name -> LHsType name -> LHsType name #

mkHsAppTys :: LHsType name -> [LHsType name] -> LHsType name #

ignoreParens :: LHsType name -> LHsType name #

hsSigType :: LHsSigType name -> LHsType name #

hsSigWcType :: LHsSigWcType name -> LHsType name #

hsLTyVarBndrToType :: LHsTyVarBndr name -> LHsType name #

Convert a LHsTyVarBndr to an equivalent LHsType.

hsLTyVarBndrsToTypes :: LHsQTyVars name -> [LHsType name] #

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

pprParendHsType :: OutputableBndrId name => HsType name -> SDoc #

pprHsForAll :: OutputableBndrId name => [LHsTyVarBndr name] -> LHsContext name -> SDoc #

pprHsForAllTvs :: OutputableBndrId name => [LHsTyVarBndr name] -> SDoc #

pprHsForAllExtra :: OutputableBndrId name => Maybe SrcSpan -> [LHsTyVarBndr name] -> LHsContext name -> SDoc #

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.

pprHsContext :: OutputableBndrId name => HsContext name -> SDoc #

pprHsContextNoArrow :: OutputableBndrId name => HsContext name -> SDoc #

pprHsContextMaybe :: OutputableBndrId name => HsContext name -> Maybe SDoc #