GHC.Hs.Type

ghc-9.0.1: The GHC API

Safe Haskell | None
Language | Haskell2010

GHC.Hs.Type

Synopsis

- type Mult = Type
- data HsScaled pass a = HsScaled (HsArrow pass) a
- hsMult :: HsScaled pass a -> HsArrow pass
- hsScaledThing :: HsScaled pass a -> a
- data HsArrow pass
  - = HsUnrestrictedArrow IsUnicodeSyntax
  - | HsLinearArrow IsUnicodeSyntax
  - | HsExplicitMult IsUnicodeSyntax (LHsType pass)
- arrowToHsType :: HsArrow GhcRn -> LHsType GhcRn
- hsLinear :: a -> HsScaled pass a
- hsUnrestricted :: a -> HsScaled pass a
- isUnrestricted :: HsArrow GhcRn -> Bool
- data HsType pass
  - = HsForAllTy {
    - hst_xforall :: XForAllTy pass
    - hst_tele :: HsForAllTelescope pass
    - hst_body :: LHsType pass
    }
  - | HsQualTy {
    - hst_xqual :: XQualTy pass
    - hst_ctxt :: LHsContext pass
    - hst_body :: LHsType pass
    }
  - | HsTyVar (XTyVar pass) PromotionFlag (Located (IdP pass))
  - | HsAppTy (XAppTy pass) (LHsType pass) (LHsType pass)
  - | HsAppKindTy (XAppKindTy pass) (LHsType pass) (LHsKind pass)
  - | HsFunTy (XFunTy pass) (HsArrow pass) (LHsType pass) (LHsType pass)
  - | HsListTy (XListTy pass) (LHsType pass)
  - | HsTupleTy (XTupleTy pass) HsTupleSort [LHsType pass]
  - | HsSumTy (XSumTy pass) [LHsType pass]
  - | HsOpTy (XOpTy pass) (LHsType pass) (Located (IdP pass)) (LHsType pass)
  - | HsParTy (XParTy pass) (LHsType pass)
  - | HsIParamTy (XIParamTy pass) (Located HsIPName) (LHsType pass)
  - | HsStarTy (XStarTy pass) Bool
  - | HsKindSig (XKindSig pass) (LHsType pass) (LHsKind pass)
  - | HsSpliceTy (XSpliceTy pass) (HsSplice pass)
  - | HsDocTy (XDocTy pass) (LHsType pass) LHsDocString
  - | HsBangTy (XBangTy pass) HsSrcBang (LHsType pass)
  - | HsRecTy (XRecTy pass) [LConDeclField pass]
  - | HsExplicitListTy (XExplicitListTy pass) PromotionFlag [LHsType pass]
  - | HsExplicitTupleTy (XExplicitTupleTy pass) [LHsType pass]
  - | HsTyLit (XTyLit pass) HsTyLit
  - | HsWildCardTy (XWildCardTy pass)
  - | XHsType (XXType pass)
- data NewHsTypeX = NHsCoreTy Type
- type LHsType pass = Located (HsType pass)
- type HsKind pass = HsType pass
- type LHsKind pass = Located (HsKind pass)
- data HsForAllTelescope pass
  - = HsForAllVis {
    - hsf_xvis :: XHsForAllVis pass
    - hsf_vis_bndrs :: [LHsTyVarBndr () pass]
    }
  - | HsForAllInvis {
    - hsf_xinvis :: XHsForAllInvis pass
    - hsf_invis_bndrs :: [LHsTyVarBndr Specificity pass]
    }
  - | XHsForAllTelescope !(XXHsForAllTelescope pass)
- data HsTyVarBndr flag pass
  - = UserTyVar (XUserTyVar pass) flag (Located (IdP pass))
  - | KindedTyVar (XKindedTyVar pass) flag (Located (IdP pass)) (LHsKind pass)
  - | XTyVarBndr !(XXTyVarBndr pass)
- type LHsTyVarBndr flag pass = Located (HsTyVarBndr flag pass)
- data LHsQTyVars pass
  - = HsQTvs {
    - hsq_ext :: XHsQTvs pass
    - hsq_explicit :: [LHsTyVarBndr () pass]
    }
  - | XLHsQTyVars !(XXLHsQTyVars pass)
- data HsImplicitBndrs pass thing
  - = HsIB {
    - hsib_ext :: XHsIB pass thing
    - hsib_body :: thing
    }
  - | XHsImplicitBndrs !(XXHsImplicitBndrs pass thing)
- data HsWildCardBndrs pass thing
  - = HsWC {
    - hswc_ext :: XHsWC pass thing
    - hswc_body :: thing
    }
  - | XHsWildCardBndrs !(XXHsWildCardBndrs pass thing)
- data HsPatSigType pass
  - = HsPS {
    - hsps_ext :: XHsPS pass
    - hsps_body :: LHsType pass
    }
  - | XHsPatSigType !(XXHsPatSigType pass)
- data HsPSRn = HsPSRn {
  - hsps_nwcs :: [Name]
  - hsps_imp_tvs :: [Name]
  }
- type LHsSigType pass = HsImplicitBndrs pass (LHsType pass)
- type LHsSigWcType pass = HsWildCardBndrs pass (LHsSigType pass)
- type LHsWcType pass = HsWildCardBndrs pass (LHsType pass)
- data HsTupleSort
  - = HsUnboxedTuple
  - | HsBoxedTuple
  - | HsConstraintTuple
  - | HsBoxedOrConstraintTuple
- type HsContext pass = [LHsType pass]
- type LHsContext pass = Located (HsContext pass)
- noLHsContext :: LHsContext pass
- data HsTyLit
  - = HsNumTy SourceText Integer
  - | HsStrTy SourceText FastString
- newtype HsIPName = HsIPName FastString
- hsIPNameFS :: HsIPName -> FastString
- data HsArg tm ty
  - = HsValArg tm
  - | HsTypeArg SrcSpan ty
  - | HsArgPar SrcSpan
- numVisibleArgs :: [HsArg tm ty] -> Arity
- type LHsTypeArg p = HsArg (LHsType p) (LHsKind p)
- lhsTypeArgSrcSpan :: LHsTypeArg pass -> SrcSpan
- class OutputableBndrFlag flag
- type LBangType pass = Located (BangType pass)
- type BangType pass = HsType pass
- 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 pass
  - = ConDeclField {
    - cd_fld_ext :: XConDeclField pass
    - cd_fld_names :: [LFieldOcc pass]
    - cd_fld_type :: LBangType pass
    - cd_fld_doc :: Maybe LHsDocString
    }
  - | XConDeclField !(XXConDeclField pass)
- type LConDeclField pass = Located (ConDeclField pass)
- pprConDeclFields :: OutputableBndrId p => [LConDeclField (GhcPass p)] -> SDoc
- data HsConDetails arg rec
  - = PrefixCon [arg]
  - | RecCon rec
  - | InfixCon arg arg
- data FieldOcc pass
  - = FieldOcc {
    - extFieldOcc :: XCFieldOcc pass
    - rdrNameFieldOcc :: Located RdrName
    }
  - | XFieldOcc !(XXFieldOcc pass)
- type LFieldOcc pass = Located (FieldOcc pass)
- mkFieldOcc :: Located RdrName -> FieldOcc GhcPs
- data AmbiguousFieldOcc pass
  - = Unambiguous (XUnambiguous pass) (Located RdrName)
  - | Ambiguous (XAmbiguous pass) (Located RdrName)
  - | XAmbiguousFieldOcc !(XXAmbiguousFieldOcc pass)
- mkAmbiguousFieldOcc :: Located RdrName -> AmbiguousFieldOcc GhcPs
- rdrNameAmbiguousFieldOcc :: AmbiguousFieldOcc (GhcPass p) -> RdrName
- selectorAmbiguousFieldOcc :: AmbiguousFieldOcc GhcTc -> Id
- unambiguousFieldOcc :: AmbiguousFieldOcc GhcTc -> FieldOcc GhcTc
- ambiguousFieldOcc :: FieldOcc GhcTc -> AmbiguousFieldOcc GhcTc
- mkAnonWildCardTy :: HsType GhcPs
- pprAnonWildCard :: SDoc
- mkHsImplicitBndrs :: thing -> HsImplicitBndrs GhcPs thing
- mkHsWildCardBndrs :: thing -> HsWildCardBndrs GhcPs thing
- mkHsPatSigType :: LHsType GhcPs -> HsPatSigType GhcPs
- hsImplicitBody :: HsImplicitBndrs (GhcPass p) thing -> thing
- mkEmptyImplicitBndrs :: thing -> HsImplicitBndrs GhcRn thing
- mkEmptyWildCardBndrs :: thing -> HsWildCardBndrs GhcRn thing
- mkHsForAllVisTele :: [LHsTyVarBndr () (GhcPass p)] -> HsForAllTelescope (GhcPass p)
- mkHsForAllInvisTele :: [LHsTyVarBndr Specificity (GhcPass p)] -> HsForAllTelescope (GhcPass p)
- mkHsQTvs :: [LHsTyVarBndr () GhcPs] -> LHsQTyVars GhcPs
- hsQTvExplicit :: LHsQTyVars pass -> [LHsTyVarBndr () pass]
- emptyLHsQTvs :: LHsQTyVars GhcRn
- isHsKindedTyVar :: HsTyVarBndr flag pass -> Bool
- hsTvbAllKinded :: LHsQTyVars pass -> Bool
- isLHsForAllTy :: LHsType p -> Bool
- hsScopedTvs :: LHsSigType GhcRn -> [Name]
- hsWcScopedTvs :: LHsSigWcType GhcRn -> [Name]
- dropWildCards :: LHsSigWcType pass -> LHsSigType pass
- hsTyVarName :: HsTyVarBndr flag (GhcPass p) -> IdP (GhcPass p)
- hsAllLTyVarNames :: LHsQTyVars GhcRn -> [Name]
- hsLTyVarLocNames :: LHsQTyVars (GhcPass p) -> [Located (IdP (GhcPass p))]
- hsLTyVarName :: LHsTyVarBndr flag (GhcPass p) -> IdP (GhcPass p)
- hsLTyVarNames :: [LHsTyVarBndr flag (GhcPass p)] -> [IdP (GhcPass p)]
- hsLTyVarLocName :: LHsTyVarBndr flag (GhcPass p) -> Located (IdP (GhcPass p))
- hsExplicitLTyVarNames :: LHsQTyVars (GhcPass p) -> [IdP (GhcPass p)]
- splitLHsInstDeclTy :: LHsSigType GhcRn -> ([Name], LHsContext GhcRn, LHsType GhcRn)
- getLHsInstDeclHead :: LHsSigType (GhcPass p) -> LHsType (GhcPass p)
- getLHsInstDeclClass_maybe :: LHsSigType (GhcPass p) -> Maybe (Located (IdP (GhcPass p)))
- splitLHsPatSynTy :: LHsType pass -> ([LHsTyVarBndr Specificity pass], LHsContext pass, [LHsTyVarBndr Specificity pass], LHsContext pass, LHsType pass)
- splitLHsForAllTyInvis :: LHsType pass -> ([LHsTyVarBndr Specificity pass], LHsType pass)
- splitLHsForAllTyInvis_KP :: LHsType pass -> (Maybe [LHsTyVarBndr Specificity pass], LHsType pass)
- splitLHsQualTy :: LHsType pass -> (LHsContext pass, LHsType pass)
- splitLHsSigmaTyInvis :: LHsType pass -> ([LHsTyVarBndr Specificity pass], LHsContext pass, LHsType pass)
- splitLHsGadtTy :: LHsType pass -> (Maybe [LHsTyVarBndr Specificity pass], Maybe (LHsContext pass), LHsType pass)
- splitHsFunType :: LHsType (GhcPass p) -> ([HsScaled (GhcPass p) (LHsType (GhcPass p))], LHsType (GhcPass p), [AddAnn])
- hsTyGetAppHead_maybe :: LHsType (GhcPass p) -> Maybe (Located (IdP (GhcPass p)))
- mkHsOpTy :: LHsType (GhcPass p) -> Located (IdP (GhcPass p)) -> LHsType (GhcPass p) -> HsType (GhcPass p)
- mkHsAppTy :: LHsType (GhcPass p) -> LHsType (GhcPass p) -> LHsType (GhcPass p)
- mkHsAppTys :: LHsType (GhcPass p) -> [LHsType (GhcPass p)] -> LHsType (GhcPass p)
- mkHsAppKindTy :: XAppKindTy (GhcPass p) -> LHsType (GhcPass p) -> LHsType (GhcPass p) -> LHsType (GhcPass p)
- ignoreParens :: LHsType pass -> LHsType pass
- hsSigType :: LHsSigType (GhcPass p) -> LHsType (GhcPass p)
- hsSigWcType :: LHsSigWcType pass -> LHsType pass
- hsPatSigType :: HsPatSigType pass -> LHsType pass
- hsTyKindSig :: LHsType pass -> Maybe (LHsKind pass)
- hsConDetailsArgs :: HsConDetails (LHsType a) (Located [LConDeclField a]) -> [LHsType a]
- setHsTyVarBndrFlag :: flag -> HsTyVarBndr flag' (GhcPass pass) -> HsTyVarBndr flag (GhcPass pass)
- hsTyVarBndrFlag :: HsTyVarBndr flag (GhcPass pass) -> flag
- pprHsType :: OutputableBndrId p => HsType (GhcPass p) -> SDoc
- pprHsForAll :: forall p. OutputableBndrId p => HsForAllTelescope (GhcPass p) -> LHsContext (GhcPass p) -> SDoc
- pprHsExplicitForAll :: OutputableBndrId p => Maybe [LHsTyVarBndr () (GhcPass p)] -> SDoc
- pprLHsContext :: OutputableBndrId p => LHsContext (GhcPass p) -> SDoc
- hsTypeNeedsParens :: PprPrec -> HsType (GhcPass p) -> Bool
- parenthesizeHsType :: PprPrec -> LHsType (GhcPass p) -> LHsType (GhcPass p)
- parenthesizeHsContext :: PprPrec -> LHsContext (GhcPass p) -> LHsContext (GhcPass p)

# Documentation

type Mult = Type Source #

Mult is a type alias for Type.

Mult must contain Type because multiplicity variables are mere type variables (of kind Multiplicity) in Haskell. So the simplest implementation is to make Mult be Type.

Multiplicities can be formed with: - One: GHC.Types.One (= oneDataCon) - Many: GHC.Types.Many (= manyDataCon) - Multiplication: GHC.Types.MultMul (= multMulTyCon)

So that Mult feels a bit more structured, we provide pattern synonyms and smart constructors for these.

data HsScaled pass a Source #

This is used in the syntax. In constructor declaration. It must keep the arrow representation.

Constructors

HsScaled (HsArrow pass) a |

#### Instances

Instances details

Data thing => Data (HsScaled GhcTc thing) # |
Instance details Defined in GHC.Hs.Instances Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> HsScaled GhcTc thing -> c (HsScaled GhcTc thing) Source # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (HsScaled GhcTc thing) Source # toConstr :: HsScaled GhcTc thing -> Constr Source # dataTypeOf :: HsScaled GhcTc thing -> DataType Source # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c (HsScaled GhcTc thing)) Source # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (HsScaled GhcTc thing)) Source # gmapT :: (forall b. Data b => b -> b) -> HsScaled GhcTc thing -> HsScaled GhcTc thing Source # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> HsScaled GhcTc thing -> r Source # gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> HsScaled GhcTc thing -> r Source # gmapQ :: (forall d. Data d => d -> u) -> HsScaled GhcTc thing -> [u] Source # gmapQi :: Int -> (forall d. Data d => d -> u) -> HsScaled GhcTc thing -> u Source # gmapM :: Monad m => (forall d. Data d => d -> m d) -> HsScaled GhcTc thing -> m (HsScaled GhcTc thing) Source # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> HsScaled GhcTc thing -> m (HsScaled GhcTc thing) Source # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> HsScaled GhcTc thing -> m (HsScaled GhcTc thing) Source #
Data thing => Data (HsScaled GhcRn thing) # |
Instance details Defined in GHC.Hs.Instances Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> HsScaled GhcRn thing -> c (HsScaled GhcRn thing) Source # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (HsScaled GhcRn thing) Source # toConstr :: HsScaled GhcRn thing -> Constr Source # dataTypeOf :: HsScaled GhcRn thing -> DataType Source # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c (HsScaled GhcRn thing)) Source # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (HsScaled GhcRn thing)) Source # gmapT :: (forall b. Data b => b -> b) -> HsScaled GhcRn thing -> HsScaled GhcRn thing Source # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> HsScaled GhcRn thing -> r Source # gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> HsScaled GhcRn thing -> r Source # gmapQ :: (forall d. Data d => d -> u) -> HsScaled GhcRn thing -> [u] Source # gmapQi :: Int -> (forall d. Data d => d -> u) -> HsScaled GhcRn thing -> u Source # gmapM :: Monad m => (forall d. Data d => d -> m d) -> HsScaled GhcRn thing -> m (HsScaled GhcRn thing) Source # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> HsScaled GhcRn thing -> m (HsScaled GhcRn thing) Source # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> HsScaled GhcRn thing -> m (HsScaled GhcRn thing) Source #
Data thing => Data (HsScaled GhcPs thing) # |
Instance details Defined in GHC.Hs.Instances Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> HsScaled GhcPs thing -> c (HsScaled GhcPs thing) Source # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (HsScaled GhcPs thing) Source # toConstr :: HsScaled GhcPs thing -> Constr Source # dataTypeOf :: HsScaled GhcPs thing -> DataType Source # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c (HsScaled GhcPs thing)) Source # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (HsScaled GhcPs thing)) Source # gmapT :: (forall b. Data b => b -> b) -> HsScaled GhcPs thing -> HsScaled GhcPs thing Source # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> HsScaled GhcPs thing -> r Source # gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> HsScaled GhcPs thing -> r Source # gmapQ :: (forall d. Data d => d -> u) -> HsScaled GhcPs thing -> [u] Source # gmapQi :: Int -> (forall d. Data d => d -> u) -> HsScaled GhcPs thing -> u Source # gmapM :: Monad m => (forall d. Data d => d -> m d) -> HsScaled GhcPs thing -> m (HsScaled GhcPs thing) Source # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> HsScaled GhcPs thing -> m (HsScaled GhcPs thing) Source # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> HsScaled GhcPs thing -> m (HsScaled GhcPs thing) Source #
Outputable a => Outputable (HsScaled pass a) # |
Instance details Defined in GHC.Hs.Type Methods ppr :: HsScaled pass a -> SDoc Source # pprPrec :: Rational -> HsScaled pass a -> SDoc Source #

hsMult :: HsScaled pass a -> HsArrow pass Source #

hsScaledThing :: HsScaled pass a -> a Source #

data HsArrow pass Source #

Denotes the type of arrows in the surface language

Constructors

HsUnrestrictedArrow IsUnicodeSyntax | a -> b or a → b
HsLinearArrow IsUnicodeSyntax | a %1 -> b or a %1 → b, or a ⊸ b
HsExplicitMult IsUnicodeSyntax (LHsType pass) | a %m -> b or a %m → b (very much including `a %Many -> b`! This is how the programmer wrote it). It is stored as an `HsType` so as to preserve the syntax as written in the program.

#### Instances

Instances details

Data (HsArrow GhcTc) # |
Instance details Defined in GHC.Hs.Instances Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> HsArrow GhcTc -> c (HsArrow GhcTc) Source # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (HsArrow GhcTc) Source # toConstr :: HsArrow GhcTc -> Constr Source # dataTypeOf :: HsArrow GhcTc -> DataType Source # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c (HsArrow GhcTc)) Source # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (HsArrow GhcTc)) Source # gmapT :: (forall b. Data b => b -> b) -> HsArrow GhcTc -> HsArrow GhcTc Source # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> HsArrow GhcTc -> r Source # gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> HsArrow GhcTc -> r Source # gmapQ :: (forall d. Data d => d -> u) -> HsArrow GhcTc -> [u] Source # gmapQi :: Int -> (forall d. Data d => d -> u) -> HsArrow GhcTc -> u Source # gmapM :: Monad m => (forall d. Data d => d -> m d) -> HsArrow GhcTc -> m (HsArrow GhcTc) Source # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> HsArrow GhcTc -> m (HsArrow GhcTc) Source # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> HsArrow GhcTc -> m (HsArrow GhcTc) Source #
Data (HsArrow GhcRn) # |
Instance details Defined in GHC.Hs.Instances Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> HsArrow GhcRn -> c (HsArrow GhcRn) Source # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (HsArrow GhcRn) Source # toConstr :: HsArrow GhcRn -> Constr Source # dataTypeOf :: HsArrow GhcRn -> DataType Source # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c (HsArrow GhcRn)) Source # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (HsArrow GhcRn)) Source # gmapT :: (forall b. Data b => b -> b) -> HsArrow GhcRn -> HsArrow GhcRn Source # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> HsArrow GhcRn -> r Source # gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> HsArrow GhcRn -> r Source # gmapQ :: (forall d. Data d => d -> u) -> HsArrow GhcRn -> [u] Source # gmapQi :: Int -> (forall d. Data d => d -> u) -> HsArrow GhcRn -> u Source # gmapM :: Monad m => (forall d. Data d => d -> m d) -> HsArrow GhcRn -> m (HsArrow GhcRn) Source # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> HsArrow GhcRn -> m (HsArrow GhcRn) Source # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> HsArrow GhcRn -> m (HsArrow GhcRn) Source #
Data (HsArrow GhcPs) # |
Instance details Defined in GHC.Hs.Instances Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> HsArrow GhcPs -> c (HsArrow GhcPs) Source # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (HsArrow GhcPs) Source # toConstr :: HsArrow GhcPs -> Constr Source # dataTypeOf :: HsArrow GhcPs -> DataType Source # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c (HsArrow GhcPs)) Source # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (HsArrow GhcPs)) Source # gmapT :: (forall b. Data b => b -> b) -> HsArrow GhcPs -> HsArrow GhcPs Source # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> HsArrow GhcPs -> r Source # gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> HsArrow GhcPs -> r Source # gmapQ :: (forall d. Data d => d -> u) -> HsArrow GhcPs -> [u] Source # gmapQi :: Int -> (forall d. Data d => d -> u) -> HsArrow GhcPs -> u Source # gmapM :: Monad m => (forall d. Data d => d -> m d) -> HsArrow GhcPs -> m (HsArrow GhcPs) Source # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> HsArrow GhcPs -> m (HsArrow GhcPs) Source # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> HsArrow GhcPs -> m (HsArrow GhcPs) Source #
OutputableBndrId pass => Outputable (HsArrow (GhcPass pass)) # |
Instance details Defined in GHC.Hs.Type Methods ppr :: HsArrow (GhcPass pass) -> SDoc Source # pprPrec :: Rational -> HsArrow (GhcPass pass) -> SDoc Source #

arrowToHsType :: HsArrow GhcRn -> LHsType GhcRn Source #

Convert an arrow into its corresponding multiplicity. In essence this erases the information of whether the programmer wrote an explicit multiplicity or a shorthand.

hsLinear :: a -> HsScaled pass a Source #

When creating syntax we use the shorthands. It's better for printing, also, the shorthands work trivially at each pass.

hsUnrestricted :: a -> HsScaled pass a Source #

When creating syntax we use the shorthands. It's better for printing, also, the shorthands work trivially at each pass.

isUnrestricted :: HsArrow GhcRn -> Bool Source #

data HsType pass Source #

Haskell Type

Constructors

HsForAllTy | `AnnKeywordId` : `AnnForall`, `AnnDot`,`AnnDarrow` For details on above see note [Api annotations] in GHC.Parser.Annotation
Fields hst_xforall :: XForAllTy pass hst_tele :: HsForAllTelescope pass hst_body :: LHsType pass
HsQualTy |
Fields hst_xqual :: XQualTy pass hst_ctxt :: LHsContext pass hst_body :: LHsType pass
HsTyVar (XTyVar pass) PromotionFlag (Located (IdP pass)) | `AnnKeywordId` : None
HsAppTy (XAppTy pass) (LHsType pass) (LHsType pass) | `AnnKeywordId` : None
HsAppKindTy (XAppKindTy pass) (LHsType pass) (LHsKind pass) |
HsFunTy (XFunTy pass) (HsArrow pass) (LHsType pass) (LHsType pass) | `AnnKeywordId` : `AnnRarrow`,
HsListTy (XListTy pass) (LHsType pass) | `AnnKeywordId` : `AnnOpen` `'['`, `AnnClose` `']'`
HsTupleTy (XTupleTy pass) HsTupleSort [LHsType pass] | `AnnKeywordId` : `AnnOpen` `'(' or '(#'`, `AnnClose` `')' or '#)'`
HsSumTy (XSumTy pass) [LHsType pass] | `AnnKeywordId` : `AnnOpen` `'(#'`, `AnnClose` '#)'@
HsOpTy (XOpTy pass) (LHsType pass) (Located (IdP pass)) (LHsType pass) | `AnnKeywordId` : None
HsParTy (XParTy pass) (LHsType pass) | `AnnKeywordId` : `AnnOpen` `'('`, `AnnClose` `')'`
HsIParamTy (XIParamTy pass) (Located HsIPName) (LHsType pass) |
    (?x :: ty)
`AnnKeywordId` : `AnnDcolon`
HsStarTy (XStarTy pass) Bool | `AnnKeywordId` : None
HsKindSig (XKindSig pass) (LHsType pass) (LHsKind pass) |
    (ty :: kind)
`AnnKeywordId` : `AnnOpen` `'('`, `AnnDcolon`,`AnnClose` `')'`
HsSpliceTy (XSpliceTy pass) (HsSplice pass) | `AnnKeywordId` : `AnnOpen` `'$('`, `AnnClose` `')'`
HsDocTy (XDocTy pass) (LHsType pass) LHsDocString | `AnnKeywordId` : None
HsBangTy (XBangTy pass) HsSrcBang (LHsType pass) | `AnnKeywordId` : `AnnOpen` `'{-# UNPACK' or '{-# NOUNPACK'`, `AnnClose` `'#-}'` `AnnBang` `'!'`
HsRecTy (XRecTy pass) [LConDeclField pass] | `AnnKeywordId` : `AnnOpen` `'{'`, `AnnClose` `'}'`
HsExplicitListTy | HsCoreTy (XCoreTy pass) Type -- An escape hatch for tunnelling a *closed* -- Core Type through HsSyn. -- ^ - `AnnKeywordId` : None
Fields (XExplicitListTy pass) PromotionFlag [LHsType pass] `AnnKeywordId` : `AnnOpen` `"'["`, `AnnClose` `']'`
HsExplicitTupleTy (XExplicitTupleTy pass) [LHsType pass] | `AnnKeywordId` : `AnnOpen` `"'("`, `AnnClose` `')'`
HsTyLit (XTyLit pass) HsTyLit | `AnnKeywordId` : None
HsWildCardTy (XWildCardTy pass) | `AnnKeywordId` : None
XHsType (XXType pass) |

#### Instances

Instances details

Data (LHsTypeArg GhcTc) # |
Instance details Defined in GHC.Hs.Instances Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> LHsTypeArg GhcTc -> c (LHsTypeArg GhcTc) Source # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (LHsTypeArg GhcTc) Source # toConstr :: LHsTypeArg GhcTc -> Constr Source # dataTypeOf :: LHsTypeArg GhcTc -> DataType Source # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c (LHsTypeArg GhcTc)) Source # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (LHsTypeArg GhcTc)) Source # gmapT :: (forall b. Data b => b -> b) -> LHsTypeArg GhcTc -> LHsTypeArg GhcTc Source # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> LHsTypeArg GhcTc -> r Source # gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> LHsTypeArg GhcTc -> r Source # gmapQ :: (forall d. Data d => d -> u) -> LHsTypeArg GhcTc -> [u] Source # gmapQi :: Int -> (forall d. Data d => d -> u) -> LHsTypeArg GhcTc -> u Source # gmapM :: Monad m => (forall d. Data d => d -> m d) -> LHsTypeArg GhcTc -> m (LHsTypeArg GhcTc) Source # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> LHsTypeArg GhcTc -> m (LHsTypeArg GhcTc) Source # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> LHsTypeArg GhcTc -> m (LHsTypeArg GhcTc) Source #
Data (LHsTypeArg GhcRn) # |
Instance details Defined in GHC.Hs.Instances Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> LHsTypeArg GhcRn -> c (LHsTypeArg GhcRn) Source # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (LHsTypeArg GhcRn) Source # toConstr :: LHsTypeArg GhcRn -> Constr Source # dataTypeOf :: LHsTypeArg GhcRn -> DataType Source # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c (LHsTypeArg GhcRn)) Source # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (LHsTypeArg GhcRn)) Source # gmapT :: (forall b. Data b => b -> b) -> LHsTypeArg GhcRn -> LHsTypeArg GhcRn Source # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> LHsTypeArg GhcRn -> r Source # gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> LHsTypeArg GhcRn -> r Source # gmapQ :: (forall d. Data d => d -> u) -> LHsTypeArg GhcRn -> [u] Source # gmapQi :: Int -> (forall d. Data d => d -> u) -> LHsTypeArg GhcRn -> u Source # gmapM :: Monad m => (forall d. Data d => d -> m d) -> LHsTypeArg GhcRn -> m (LHsTypeArg GhcRn) Source # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> LHsTypeArg GhcRn -> m (LHsTypeArg GhcRn) Source # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> LHsTypeArg GhcRn -> m (LHsTypeArg GhcRn) Source #
Data (LHsTypeArg GhcPs) # |
Instance details Defined in GHC.Hs.Instances Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> LHsTypeArg GhcPs -> c (LHsTypeArg GhcPs) Source # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (LHsTypeArg GhcPs) Source # toConstr :: LHsTypeArg GhcPs -> Constr Source # dataTypeOf :: LHsTypeArg GhcPs -> DataType Source # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c (LHsTypeArg GhcPs)) Source # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (LHsTypeArg GhcPs)) Source # gmapT :: (forall b. Data b => b -> b) -> LHsTypeArg GhcPs -> LHsTypeArg GhcPs Source # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> LHsTypeArg GhcPs -> r Source # gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> LHsTypeArg GhcPs -> r Source # gmapQ :: (forall d. Data d => d -> u) -> LHsTypeArg GhcPs -> [u] Source # gmapQi :: Int -> (forall d. Data d => d -> u) -> LHsTypeArg GhcPs -> u Source # gmapM :: Monad m => (forall d. Data d => d -> m d) -> LHsTypeArg GhcPs -> m (LHsTypeArg GhcPs) Source # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> LHsTypeArg GhcPs -> m (LHsTypeArg GhcPs) Source # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> LHsTypeArg GhcPs -> m (LHsTypeArg GhcPs) Source #
Data (HsType GhcTc) # |
Instance details Defined in GHC.Hs.Instances Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> HsType GhcTc -> c (HsType GhcTc) Source # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (HsType GhcTc) Source # toConstr :: HsType GhcTc -> Constr Source # dataTypeOf :: HsType GhcTc -> DataType Source # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c (HsType GhcTc)) Source # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (HsType GhcTc)) Source # gmapT :: (forall b. Data b => b -> b) -> HsType GhcTc -> HsType GhcTc Source # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> HsType GhcTc -> r Source # gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> HsType GhcTc -> r Source # gmapQ :: (forall d. Data d => d -> u) -> HsType GhcTc -> [u] Source # gmapQi :: Int -> (forall d. Data d => d -> u) -> HsType GhcTc -> u Source # gmapM :: Monad m => (forall d. Data d => d -> m d) -> HsType GhcTc -> m (HsType GhcTc) Source # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> HsType GhcTc -> m (HsType GhcTc) Source # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> HsType GhcTc -> m (HsType GhcTc) Source #
Data (HsType GhcRn) # |
Instance details Defined in GHC.Hs.Instances Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> HsType GhcRn -> c (HsType GhcRn) Source # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (HsType GhcRn) Source # toConstr :: HsType GhcRn -> Constr Source # dataTypeOf :: HsType GhcRn -> DataType Source # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c (HsType GhcRn)) Source # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (HsType GhcRn)) Source # gmapT :: (forall b. Data b => b -> b) -> HsType GhcRn -> HsType GhcRn Source # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> HsType GhcRn -> r Source # gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> HsType GhcRn -> r Source # gmapQ :: (forall d. Data d => d -> u) -> HsType GhcRn -> [u] Source # gmapQi :: Int -> (forall d. Data d => d -> u) -> HsType GhcRn -> u Source # gmapM :: Monad m => (forall d. Data d => d -> m d) -> HsType GhcRn -> m (HsType GhcRn) Source # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> HsType GhcRn -> m (HsType GhcRn) Source # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> HsType GhcRn -> m (HsType GhcRn) Source #
Data (HsType GhcPs) # |
Instance details Defined in GHC.Hs.Instances Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> HsType GhcPs -> c (HsType GhcPs) Source # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (HsType GhcPs) Source # toConstr :: HsType GhcPs -> Constr Source # dataTypeOf :: HsType GhcPs -> DataType Source # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c (HsType GhcPs)) Source # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (HsType GhcPs)) Source # gmapT :: (forall b. Data b => b -> b) -> HsType GhcPs -> HsType GhcPs Source # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> HsType GhcPs -> r Source # gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> HsType GhcPs -> r Source # gmapQ :: (forall d. Data d => d -> u) -> HsType GhcPs -> [u] Source # gmapQi :: Int -> (forall d. Data d => d -> u) -> HsType GhcPs -> u Source # gmapM :: Monad m => (forall d. Data d => d -> m d) -> HsType GhcPs -> m (HsType GhcPs) Source # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> HsType GhcPs -> m (HsType GhcPs) Source # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> HsType GhcPs -> m (HsType GhcPs) Source #
OutputableBndrId p => Outputable (HsType (GhcPass p)) # |
Instance details Defined in GHC.Hs.Type Methods ppr :: HsType (GhcPass p) -> SDoc Source # pprPrec :: Rational -> HsType (GhcPass p) -> SDoc Source #

data NewHsTypeX Source #

Constructors

NHsCoreTy Type |

#### Instances

Instances details

Data NewHsTypeX # | `AnnKeywordId` : None
Instance details Defined in GHC.Hs.Type Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> NewHsTypeX -> c NewHsTypeX Source # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c NewHsTypeX Source # toConstr :: NewHsTypeX -> Constr Source # dataTypeOf :: NewHsTypeX -> DataType Source # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c NewHsTypeX) Source # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c NewHsTypeX) Source # gmapT :: (forall b. Data b => b -> b) -> NewHsTypeX -> NewHsTypeX Source # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> NewHsTypeX -> r Source # gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> NewHsTypeX -> r Source # gmapQ :: (forall d. Data d => d -> u) -> NewHsTypeX -> [u] Source # gmapQi :: Int -> (forall d. Data d => d -> u) -> NewHsTypeX -> u Source # gmapM :: Monad m => (forall d. Data d => d -> m d) -> NewHsTypeX -> m NewHsTypeX Source # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> NewHsTypeX -> m NewHsTypeX Source # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> NewHsTypeX -> m NewHsTypeX Source #
Outputable NewHsTypeX # |
Instance details Defined in GHC.Hs.Type Methods ppr :: NewHsTypeX -> SDoc Source # pprPrec :: Rational -> NewHsTypeX -> 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 HsForAllTelescope pass Source #

The type variable binders in an `HsForAllTy`. See also `Note [Variable Specificity and Forall Visibility]` in GHC.Tc.Gen.HsType.

Constructors

HsForAllVis | A visible `forall` (e.g., `forall a -> {...}`). These do not have any notion of specificity, so we use `()` as a placeholder value.
Fields hsf_xvis :: XHsForAllVis pass hsf_vis_bndrs :: [LHsTyVarBndr () pass]
HsForAllInvis | An invisible `forall` (e.g., `forall a {b} c -> {...}`), where each binder has a `Specificity`.
Fields hsf_xinvis :: XHsForAllInvis pass hsf_invis_bndrs :: [LHsTyVarBndr Specificity pass]
XHsForAllTelescope !(XXHsForAllTelescope pass) |

#### Instances

Instances details

Data (HsForAllTelescope GhcTc) # |
Instance details Defined in GHC.Hs.Instances Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> HsForAllTelescope GhcTc -> c (HsForAllTelescope GhcTc) Source # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (HsForAllTelescope GhcTc) Source # toConstr :: HsForAllTelescope GhcTc -> Constr Source # dataTypeOf :: HsForAllTelescope GhcTc -> DataType Source # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c (HsForAllTelescope GhcTc)) Source # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (HsForAllTelescope GhcTc)) Source # gmapT :: (forall b. Data b => b -> b) -> HsForAllTelescope GhcTc -> HsForAllTelescope GhcTc Source # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> HsForAllTelescope GhcTc -> r Source # gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> HsForAllTelescope GhcTc -> r Source # gmapQ :: (forall d. Data d => d -> u) -> HsForAllTelescope GhcTc -> [u] Source # gmapQi :: Int -> (forall d. Data d => d -> u) -> HsForAllTelescope GhcTc -> u Source # gmapM :: Monad m => (forall d. Data d => d -> m d) -> HsForAllTelescope GhcTc -> m (HsForAllTelescope GhcTc) Source # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> HsForAllTelescope GhcTc -> m (HsForAllTelescope GhcTc) Source # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> HsForAllTelescope GhcTc -> m (HsForAllTelescope GhcTc) Source #
Data (HsForAllTelescope GhcRn) # |
Instance details Defined in GHC.Hs.Instances Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> HsForAllTelescope GhcRn -> c (HsForAllTelescope GhcRn) Source # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (HsForAllTelescope GhcRn) Source # toConstr :: HsForAllTelescope GhcRn -> Constr Source # dataTypeOf :: HsForAllTelescope GhcRn -> DataType Source # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c (HsForAllTelescope GhcRn)) Source # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (HsForAllTelescope GhcRn)) Source # gmapT :: (forall b. Data b => b -> b) -> HsForAllTelescope GhcRn -> HsForAllTelescope GhcRn Source # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> HsForAllTelescope GhcRn -> r Source # gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> HsForAllTelescope GhcRn -> r Source # gmapQ :: (forall d. Data d => d -> u) -> HsForAllTelescope GhcRn -> [u] Source # gmapQi :: Int -> (forall d. Data d => d -> u) -> HsForAllTelescope GhcRn -> u Source # gmapM :: Monad m => (forall d. Data d => d -> m d) -> HsForAllTelescope GhcRn -> m (HsForAllTelescope GhcRn) Source # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> HsForAllTelescope GhcRn -> m (HsForAllTelescope GhcRn) Source # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> HsForAllTelescope GhcRn -> m (HsForAllTelescope GhcRn) Source #
Data (HsForAllTelescope GhcPs) # |
Instance details Defined in GHC.Hs.Instances Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> HsForAllTelescope GhcPs -> c (HsForAllTelescope GhcPs) Source # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (HsForAllTelescope GhcPs) Source # toConstr :: HsForAllTelescope GhcPs -> Constr Source # dataTypeOf :: HsForAllTelescope GhcPs -> DataType Source # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c (HsForAllTelescope GhcPs)) Source # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (HsForAllTelescope GhcPs)) Source # gmapT :: (forall b. Data b => b -> b) -> HsForAllTelescope GhcPs -> HsForAllTelescope GhcPs Source # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> HsForAllTelescope GhcPs -> r Source # gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> HsForAllTelescope GhcPs -> r Source # gmapQ :: (forall d. Data d => d -> u) -> HsForAllTelescope GhcPs -> [u] Source # gmapQi :: Int -> (forall d. Data d => d -> u) -> HsForAllTelescope GhcPs -> u Source # gmapM :: Monad m => (forall d. Data d => d -> m d) -> HsForAllTelescope GhcPs -> m (HsForAllTelescope GhcPs) Source # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> HsForAllTelescope GhcPs -> m (HsForAllTelescope GhcPs) Source # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> HsForAllTelescope GhcPs -> m (HsForAllTelescope GhcPs) Source #
OutputableBndrId p => Outputable (HsForAllTelescope (GhcPass p)) # |
Instance details Defined in GHC.Hs.Type Methods ppr :: HsForAllTelescope (GhcPass p) -> SDoc Source # pprPrec :: Rational -> HsForAllTelescope (GhcPass p) -> SDoc Source #

data HsTyVarBndr flag pass Source #

Haskell Type Variable Binder The flag annotates the binder. It is `Specificity` in places where explicit specificity is allowed (e.g. x :: forall {a} b. ...) or `()` in other places.

Constructors

UserTyVar (XUserTyVar pass) flag (Located (IdP pass)) |
KindedTyVar (XKindedTyVar pass) flag (Located (IdP pass)) (LHsKind pass) | `AnnKeywordId` : `AnnOpen`, `AnnDcolon`, `AnnClose`
XTyVarBndr !(XXTyVarBndr pass) |

#### Instances

Instances details

Data flag => Data (HsTyVarBndr flag GhcTc) # |
Instance details Defined in GHC.Hs.Instances Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> HsTyVarBndr flag GhcTc -> c (HsTyVarBndr flag GhcTc) Source # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (HsTyVarBndr flag GhcTc) Source # toConstr :: HsTyVarBndr flag GhcTc -> Constr Source # dataTypeOf :: HsTyVarBndr flag GhcTc -> DataType Source # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c (HsTyVarBndr flag GhcTc)) Source # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (HsTyVarBndr flag GhcTc)) Source # gmapT :: (forall b. Data b => b -> b) -> HsTyVarBndr flag GhcTc -> HsTyVarBndr flag GhcTc Source # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> HsTyVarBndr flag GhcTc -> r Source # gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> HsTyVarBndr flag GhcTc -> r Source # gmapQ :: (forall d. Data d => d -> u) -> HsTyVarBndr flag GhcTc -> [u] Source # gmapQi :: Int -> (forall d. Data d => d -> u) -> HsTyVarBndr flag GhcTc -> u Source # gmapM :: Monad m => (forall d. Data d => d -> m d) -> HsTyVarBndr flag GhcTc -> m (HsTyVarBndr flag GhcTc) Source # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> HsTyVarBndr flag GhcTc -> m (HsTyVarBndr flag GhcTc) Source # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> HsTyVarBndr flag GhcTc -> m (HsTyVarBndr flag GhcTc) Source #
Data flag => Data (HsTyVarBndr flag GhcRn) # |
Instance details Defined in GHC.Hs.Instances Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> HsTyVarBndr flag GhcRn -> c (HsTyVarBndr flag GhcRn) Source # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (HsTyVarBndr flag GhcRn) Source # toConstr :: HsTyVarBndr flag GhcRn -> Constr Source # dataTypeOf :: HsTyVarBndr flag GhcRn -> DataType Source # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c (HsTyVarBndr flag GhcRn)) Source # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (HsTyVarBndr flag GhcRn)) Source # gmapT :: (forall b. Data b => b -> b) -> HsTyVarBndr flag GhcRn -> HsTyVarBndr flag GhcRn Source # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> HsTyVarBndr flag GhcRn -> r Source # gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> HsTyVarBndr flag GhcRn -> r Source # gmapQ :: (forall d. Data d => d -> u) -> HsTyVarBndr flag GhcRn -> [u] Source # gmapQi :: Int -> (forall d. Data d => d -> u) -> HsTyVarBndr flag GhcRn -> u Source # gmapM :: Monad m => (forall d. Data d => d -> m d) -> HsTyVarBndr flag GhcRn -> m (HsTyVarBndr flag GhcRn) Source # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> HsTyVarBndr flag GhcRn -> m (HsTyVarBndr flag GhcRn) Source # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> HsTyVarBndr flag GhcRn -> m (HsTyVarBndr flag GhcRn) Source #
Data flag => Data (HsTyVarBndr flag GhcPs) # |
Instance details Defined in GHC.Hs.Instances Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> HsTyVarBndr flag GhcPs -> c (HsTyVarBndr flag GhcPs) Source # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (HsTyVarBndr flag GhcPs) Source # toConstr :: HsTyVarBndr flag GhcPs -> Constr Source # dataTypeOf :: HsTyVarBndr flag GhcPs -> DataType Source # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c (HsTyVarBndr flag GhcPs)) Source # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (HsTyVarBndr flag GhcPs)) Source # gmapT :: (forall b. Data b => b -> b) -> HsTyVarBndr flag GhcPs -> HsTyVarBndr flag GhcPs Source # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> HsTyVarBndr flag GhcPs -> r Source # gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> HsTyVarBndr flag GhcPs -> r Source # gmapQ :: (forall d. Data d => d -> u) -> HsTyVarBndr flag GhcPs -> [u] Source # gmapQi :: Int -> (forall d. Data d => d -> u) -> HsTyVarBndr flag GhcPs -> u Source # gmapM :: Monad m => (forall d. Data d => d -> m d) -> HsTyVarBndr flag GhcPs -> m (HsTyVarBndr flag GhcPs) Source # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> HsTyVarBndr flag GhcPs -> m (HsTyVarBndr flag GhcPs) Source # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> HsTyVarBndr flag GhcPs -> m (HsTyVarBndr flag GhcPs) Source #
(OutputableBndrId p, OutputableBndrFlag flag) => Outputable (HsTyVarBndr flag (GhcPass p)) # |
Instance details Defined in GHC.Hs.Type Methods ppr :: HsTyVarBndr flag (GhcPass p) -> SDoc Source # pprPrec :: Rational -> HsTyVarBndr flag (GhcPass p) -> SDoc Source #
NamedThing (HsTyVarBndr flag GhcRn) # |
Instance details Defined in GHC.Hs.Type Methods getOccName :: HsTyVarBndr flag GhcRn -> OccName Source # getName :: HsTyVarBndr flag GhcRn -> Name Source #

type LHsTyVarBndr flag pass = Located (HsTyVarBndr flag pass) Source #

Located Haskell Type Variable Binder

data LHsQTyVars pass Source #

Located Haskell Quantified Type Variables

Constructors

HsQTvs |
Fields hsq_ext :: XHsQTvs pass hsq_explicit :: [LHsTyVarBndr () pass]
XLHsQTyVars !(XXLHsQTyVars pass) |

#### Instances

Instances details

Data (LHsQTyVars GhcTc) # |
Instance details Defined in GHC.Hs.Instances Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> LHsQTyVars GhcTc -> c (LHsQTyVars GhcTc) Source # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (LHsQTyVars GhcTc) Source # toConstr :: LHsQTyVars GhcTc -> Constr Source # dataTypeOf :: LHsQTyVars GhcTc -> DataType Source # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c (LHsQTyVars GhcTc)) Source # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (LHsQTyVars GhcTc)) Source # gmapT :: (forall b. Data b => b -> b) -> LHsQTyVars GhcTc -> LHsQTyVars GhcTc Source # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> LHsQTyVars GhcTc -> r Source # gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> LHsQTyVars GhcTc -> r Source # gmapQ :: (forall d. Data d => d -> u) -> LHsQTyVars GhcTc -> [u] Source # gmapQi :: Int -> (forall d. Data d => d -> u) -> LHsQTyVars GhcTc -> u Source # gmapM :: Monad m => (forall d. Data d => d -> m d) -> LHsQTyVars GhcTc -> m (LHsQTyVars GhcTc) Source # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> LHsQTyVars GhcTc -> m (LHsQTyVars GhcTc) Source # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> LHsQTyVars GhcTc -> m (LHsQTyVars GhcTc) Source #
Data (LHsQTyVars GhcRn) # |
Instance details Defined in GHC.Hs.Instances Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> LHsQTyVars GhcRn -> c (LHsQTyVars GhcRn) Source # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (LHsQTyVars GhcRn) Source # toConstr :: LHsQTyVars GhcRn -> Constr Source # dataTypeOf :: LHsQTyVars GhcRn -> DataType Source # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c (LHsQTyVars GhcRn)) Source # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (LHsQTyVars GhcRn)) Source # gmapT :: (forall b. Data b => b -> b) -> LHsQTyVars GhcRn -> LHsQTyVars GhcRn Source # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> LHsQTyVars GhcRn -> r Source # gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> LHsQTyVars GhcRn -> r Source # gmapQ :: (forall d. Data d => d -> u) -> LHsQTyVars GhcRn -> [u] Source # gmapQi :: Int -> (forall d. Data d => d -> u) -> LHsQTyVars GhcRn -> u Source # gmapM :: Monad m => (forall d. Data d => d -> m d) -> LHsQTyVars GhcRn -> m (LHsQTyVars GhcRn) Source # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> LHsQTyVars GhcRn -> m (LHsQTyVars GhcRn) Source # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> LHsQTyVars GhcRn -> m (LHsQTyVars GhcRn) Source #
Data (LHsQTyVars GhcPs) # |
Instance details Defined in GHC.Hs.Instances Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> LHsQTyVars GhcPs -> c (LHsQTyVars GhcPs) Source # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (LHsQTyVars GhcPs) Source # toConstr :: LHsQTyVars GhcPs -> Constr Source # dataTypeOf :: LHsQTyVars GhcPs -> DataType Source # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c (LHsQTyVars GhcPs)) Source # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (LHsQTyVars GhcPs)) Source # gmapT :: (forall b. Data b => b -> b) -> LHsQTyVars GhcPs -> LHsQTyVars GhcPs Source # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> LHsQTyVars GhcPs -> r Source # gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> LHsQTyVars GhcPs -> r Source # gmapQ :: (forall d. Data d => d -> u) -> LHsQTyVars GhcPs -> [u] Source # gmapQi :: Int -> (forall d. Data d => d -> u) -> LHsQTyVars GhcPs -> u Source # gmapM :: Monad m => (forall d. Data d => d -> m d) -> LHsQTyVars GhcPs -> m (LHsQTyVars GhcPs) Source # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> LHsQTyVars GhcPs -> m (LHsQTyVars GhcPs) Source # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> LHsQTyVars GhcPs -> m (LHsQTyVars GhcPs) Source #
OutputableBndrId p => Outputable (LHsQTyVars (GhcPass p)) # |
Instance details Defined in GHC.Hs.Type Methods ppr :: LHsQTyVars (GhcPass p) -> SDoc Source # pprPrec :: Rational -> LHsQTyVars (GhcPass p) -> SDoc Source #

data HsImplicitBndrs pass thing Source #

Haskell Implicit Binders

Constructors

HsIB |
Fields hsib_ext :: XHsIB pass thing hsib_body :: thing
XHsImplicitBndrs !(XXHsImplicitBndrs pass thing) |

#### Instances

Instances details

Data thing => Data (HsImplicitBndrs GhcTc thing) # |
Instance details Defined in GHC.Hs.Instances Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> HsImplicitBndrs GhcTc thing -> c (HsImplicitBndrs GhcTc thing) Source # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (HsImplicitBndrs GhcTc thing) Source # toConstr :: HsImplicitBndrs GhcTc thing -> Constr Source # dataTypeOf :: HsImplicitBndrs GhcTc thing -> DataType Source # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c (HsImplicitBndrs GhcTc thing)) Source # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (HsImplicitBndrs GhcTc thing)) Source # gmapT :: (forall b. Data b => b -> b) -> HsImplicitBndrs GhcTc thing -> HsImplicitBndrs GhcTc thing Source # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> HsImplicitBndrs GhcTc thing -> r Source # gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> HsImplicitBndrs GhcTc thing -> r Source # gmapQ :: (forall d. Data d => d -> u) -> HsImplicitBndrs GhcTc thing -> [u] Source # gmapQi :: Int -> (forall d. Data d => d -> u) -> HsImplicitBndrs GhcTc thing -> u Source # gmapM :: Monad m => (forall d. Data d => d -> m d) -> HsImplicitBndrs GhcTc thing -> m (HsImplicitBndrs GhcTc thing) Source # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> HsImplicitBndrs GhcTc thing -> m (HsImplicitBndrs GhcTc thing) Source # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> HsImplicitBndrs GhcTc thing -> m (HsImplicitBndrs GhcTc thing) Source #
Data thing => Data (HsImplicitBndrs GhcRn thing) # |
Instance details Defined in GHC.Hs.Instances Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> HsImplicitBndrs GhcRn thing -> c (HsImplicitBndrs GhcRn thing) Source # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (HsImplicitBndrs GhcRn thing) Source # toConstr :: HsImplicitBndrs GhcRn thing -> Constr Source # dataTypeOf :: HsImplicitBndrs GhcRn thing -> DataType Source # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c (HsImplicitBndrs GhcRn thing)) Source # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (HsImplicitBndrs GhcRn thing)) Source # gmapT :: (forall b. Data b => b -> b) -> HsImplicitBndrs GhcRn thing -> HsImplicitBndrs GhcRn thing Source # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> HsImplicitBndrs GhcRn thing -> r Source # gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> HsImplicitBndrs GhcRn thing -> r Source # gmapQ :: (forall d. Data d => d -> u) -> HsImplicitBndrs GhcRn thing -> [u] Source # gmapQi :: Int -> (forall d. Data d => d -> u) -> HsImplicitBndrs GhcRn thing -> u Source # gmapM :: Monad m => (forall d. Data d => d -> m d) -> HsImplicitBndrs GhcRn thing -> m (HsImplicitBndrs GhcRn thing) Source # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> HsImplicitBndrs GhcRn thing -> m (HsImplicitBndrs GhcRn thing) Source # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> HsImplicitBndrs GhcRn thing -> m (HsImplicitBndrs GhcRn thing) Source #
Data thing => Data (HsImplicitBndrs GhcPs thing) # |
Instance details Defined in GHC.Hs.Instances Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> HsImplicitBndrs GhcPs thing -> c (HsImplicitBndrs GhcPs thing) Source # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (HsImplicitBndrs GhcPs thing) Source # toConstr :: HsImplicitBndrs GhcPs thing -> Constr Source # dataTypeOf :: HsImplicitBndrs GhcPs thing -> DataType Source # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c (HsImplicitBndrs GhcPs thing)) Source # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (HsImplicitBndrs GhcPs thing)) Source # gmapT :: (forall b. Data b => b -> b) -> HsImplicitBndrs GhcPs thing -> HsImplicitBndrs GhcPs thing Source # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> HsImplicitBndrs GhcPs thing -> r Source # gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> HsImplicitBndrs GhcPs thing -> r Source # gmapQ :: (forall d. Data d => d -> u) -> HsImplicitBndrs GhcPs thing -> [u] Source # gmapQi :: Int -> (forall d. Data d => d -> u) -> HsImplicitBndrs GhcPs thing -> u Source # gmapM :: Monad m => (forall d. Data d => d -> m d) -> HsImplicitBndrs GhcPs thing -> m (HsImplicitBndrs GhcPs thing) Source # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> HsImplicitBndrs GhcPs thing -> m (HsImplicitBndrs GhcPs thing) Source # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> HsImplicitBndrs GhcPs thing -> m (HsImplicitBndrs GhcPs thing) Source #
Outputable thing => Outputable (HsImplicitBndrs (GhcPass p) thing) # |
Instance details Defined in GHC.Hs.Type Methods ppr :: HsImplicitBndrs (GhcPass p) thing -> SDoc Source # pprPrec :: Rational -> HsImplicitBndrs (GhcPass p) thing -> SDoc Source #

data HsWildCardBndrs pass thing Source #

Haskell Wildcard Binders

Constructors

HsWC |
Fields hswc_ext :: XHsWC pass thing hswc_body :: thing
XHsWildCardBndrs !(XXHsWildCardBndrs pass thing) |

#### Instances

Instances details

Data thing => Data (HsWildCardBndrs GhcTc thing) # |
Instance details Defined in GHC.Hs.Instances Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> HsWildCardBndrs GhcTc thing -> c (HsWildCardBndrs GhcTc thing) Source # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (HsWildCardBndrs GhcTc thing) Source # toConstr :: HsWildCardBndrs GhcTc thing -> Constr Source # dataTypeOf :: HsWildCardBndrs GhcTc thing -> DataType Source # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c (HsWildCardBndrs GhcTc thing)) Source # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (HsWildCardBndrs GhcTc thing)) Source # gmapT :: (forall b. Data b => b -> b) -> HsWildCardBndrs GhcTc thing -> HsWildCardBndrs GhcTc thing Source # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> HsWildCardBndrs GhcTc thing -> r Source # gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> HsWildCardBndrs GhcTc thing -> r Source # gmapQ :: (forall d. Data d => d -> u) -> HsWildCardBndrs GhcTc thing -> [u] Source # gmapQi :: Int -> (forall d. Data d => d -> u) -> HsWildCardBndrs GhcTc thing -> u Source # gmapM :: Monad m => (forall d. Data d => d -> m d) -> HsWildCardBndrs GhcTc thing -> m (HsWildCardBndrs GhcTc thing) Source # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> HsWildCardBndrs GhcTc thing -> m (HsWildCardBndrs GhcTc thing) Source # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> HsWildCardBndrs GhcTc thing -> m (HsWildCardBndrs GhcTc thing) Source #
Data thing => Data (HsWildCardBndrs GhcRn thing) # |
Instance details Defined in GHC.Hs.Instances Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> HsWildCardBndrs GhcRn thing -> c (HsWildCardBndrs GhcRn thing) Source # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (HsWildCardBndrs GhcRn thing) Source # toConstr :: HsWildCardBndrs GhcRn thing -> Constr Source # dataTypeOf :: HsWildCardBndrs GhcRn thing -> DataType Source # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c (HsWildCardBndrs GhcRn thing)) Source # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (HsWildCardBndrs GhcRn thing)) Source # gmapT :: (forall b. Data b => b -> b) -> HsWildCardBndrs GhcRn thing -> HsWildCardBndrs GhcRn thing Source # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> HsWildCardBndrs GhcRn thing -> r Source # gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> HsWildCardBndrs GhcRn thing -> r Source # gmapQ :: (forall d. Data d => d -> u) -> HsWildCardBndrs GhcRn thing -> [u] Source # gmapQi :: Int -> (forall d. Data d => d -> u) -> HsWildCardBndrs GhcRn thing -> u Source # gmapM :: Monad m => (forall d. Data d => d -> m d) -> HsWildCardBndrs GhcRn thing -> m (HsWildCardBndrs GhcRn thing) Source # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> HsWildCardBndrs GhcRn thing -> m (HsWildCardBndrs GhcRn thing) Source # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> HsWildCardBndrs GhcRn thing -> m (HsWildCardBndrs GhcRn thing) Source #
Data thing => Data (HsWildCardBndrs GhcPs thing) # |
Instance details Defined in GHC.Hs.Instances Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> HsWildCardBndrs GhcPs thing -> c (HsWildCardBndrs GhcPs thing) Source # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (HsWildCardBndrs GhcPs thing) Source # toConstr :: HsWildCardBndrs GhcPs thing -> Constr Source # dataTypeOf :: HsWildCardBndrs GhcPs thing -> DataType Source # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c (HsWildCardBndrs GhcPs thing)) Source # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (HsWildCardBndrs GhcPs thing)) Source # gmapT :: (forall b. Data b => b -> b) -> HsWildCardBndrs GhcPs thing -> HsWildCardBndrs GhcPs thing Source # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> HsWildCardBndrs GhcPs thing -> r Source # gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> HsWildCardBndrs GhcPs thing -> r Source # gmapQ :: (forall d. Data d => d -> u) -> HsWildCardBndrs GhcPs thing -> [u] Source # gmapQi :: Int -> (forall d. Data d => d -> u) -> HsWildCardBndrs GhcPs thing -> u Source # gmapM :: Monad m => (forall d. Data d => d -> m d) -> HsWildCardBndrs GhcPs thing -> m (HsWildCardBndrs GhcPs thing) Source # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> HsWildCardBndrs GhcPs thing -> m (HsWildCardBndrs GhcPs thing) Source # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> HsWildCardBndrs GhcPs thing -> m (HsWildCardBndrs GhcPs thing) Source #
Outputable thing => Outputable (HsWildCardBndrs (GhcPass p) thing) # |
Instance details Defined in GHC.Hs.Type Methods ppr :: HsWildCardBndrs (GhcPass p) thing -> SDoc Source # pprPrec :: Rational -> HsWildCardBndrs (GhcPass p) thing -> SDoc Source #

data HsPatSigType pass Source #

Types that can appear in pattern signatures, as well as the signatures for term-level binders in RULES. See `Note [Pattern signature binders and scoping]`.

This is very similar to `HsSigWcType`, but with slightly different semantics: see `Note [HsType binders]`. See also `Note [The wildcard story for types]`.

Constructors

HsPS |
Fields hsps_ext :: XHsPS pass After renamer: `HsPSRn` hsps_body :: LHsType pass Main payload (the type itself)
XHsPatSigType !(XXHsPatSigType pass) |

#### Instances

Instances details

Data (HsPatSigType GhcTc) # |
Instance details Defined in GHC.Hs.Instances Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> HsPatSigType GhcTc -> c (HsPatSigType GhcTc) Source # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (HsPatSigType GhcTc) Source # toConstr :: HsPatSigType GhcTc -> Constr Source # dataTypeOf :: HsPatSigType GhcTc -> DataType Source # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c (HsPatSigType GhcTc)) Source # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (HsPatSigType GhcTc)) Source # gmapT :: (forall b. Data b => b -> b) -> HsPatSigType GhcTc -> HsPatSigType GhcTc Source # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> HsPatSigType GhcTc -> r Source # gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> HsPatSigType GhcTc -> r Source # gmapQ :: (forall d. Data d => d -> u) -> HsPatSigType GhcTc -> [u] Source # gmapQi :: Int -> (forall d. Data d => d -> u) -> HsPatSigType GhcTc -> u Source # gmapM :: Monad m => (forall d. Data d => d -> m d) -> HsPatSigType GhcTc -> m (HsPatSigType GhcTc) Source # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> HsPatSigType GhcTc -> m (HsPatSigType GhcTc) Source # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> HsPatSigType GhcTc -> m (HsPatSigType GhcTc) Source #
Data (HsPatSigType GhcRn) # |
Instance details Defined in GHC.Hs.Instances Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> HsPatSigType GhcRn -> c (HsPatSigType GhcRn) Source # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (HsPatSigType GhcRn) Source # toConstr :: HsPatSigType GhcRn -> Constr Source # dataTypeOf :: HsPatSigType GhcRn -> DataType Source # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c (HsPatSigType GhcRn)) Source # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (HsPatSigType GhcRn)) Source # gmapT :: (forall b. Data b => b -> b) -> HsPatSigType GhcRn -> HsPatSigType GhcRn Source # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> HsPatSigType GhcRn -> r Source # gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> HsPatSigType GhcRn -> r Source # gmapQ :: (forall d. Data d => d -> u) -> HsPatSigType GhcRn -> [u] Source # gmapQi :: Int -> (forall d. Data d => d -> u) -> HsPatSigType GhcRn -> u Source # gmapM :: Monad m => (forall d. Data d => d -> m d) -> HsPatSigType GhcRn -> m (HsPatSigType GhcRn) Source # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> HsPatSigType GhcRn -> m (HsPatSigType GhcRn) Source # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> HsPatSigType GhcRn -> m (HsPatSigType GhcRn) Source #
Data (HsPatSigType GhcPs) # |
Instance details Defined in GHC.Hs.Instances Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> HsPatSigType GhcPs -> c (HsPatSigType GhcPs) Source # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (HsPatSigType GhcPs) Source # toConstr :: HsPatSigType GhcPs -> Constr Source # dataTypeOf :: HsPatSigType GhcPs -> DataType Source # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c (HsPatSigType GhcPs)) Source # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (HsPatSigType GhcPs)) Source # gmapT :: (forall b. Data b => b -> b) -> HsPatSigType GhcPs -> HsPatSigType GhcPs Source # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> HsPatSigType GhcPs -> r Source # gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> HsPatSigType GhcPs -> r Source # gmapQ :: (forall d. Data d => d -> u) -> HsPatSigType GhcPs -> [u] Source # gmapQi :: Int -> (forall d. Data d => d -> u) -> HsPatSigType GhcPs -> u Source # gmapM :: Monad m => (forall d. Data d => d -> m d) -> HsPatSigType GhcPs -> m (HsPatSigType GhcPs) Source # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> HsPatSigType GhcPs -> m (HsPatSigType GhcPs) Source # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> HsPatSigType GhcPs -> m (HsPatSigType GhcPs) Source #
OutputableBndrId p => Outputable (HsPatSigType (GhcPass p)) # |
Instance details Defined in GHC.Hs.Type Methods ppr :: HsPatSigType (GhcPass p) -> SDoc Source # pprPrec :: Rational -> HsPatSigType (GhcPass p) -> SDoc Source #

data HsPSRn Source #

The extension field for `HsPatSigType`, which is only used in the renamer onwards. See `Note [Pattern signature binders and scoping]`.

Constructors

HsPSRn |
Fields hsps_nwcs :: [Name] Wildcard names hsps_imp_tvs :: [Name] Implicitly bound variable names

#### Instances

Instances details

Data HsPSRn # |
Instance details Defined in GHC.Hs.Type Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> HsPSRn -> c HsPSRn Source # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c HsPSRn Source # toConstr :: HsPSRn -> Constr Source # dataTypeOf :: HsPSRn -> DataType Source # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c HsPSRn) Source # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c HsPSRn) Source # gmapT :: (forall b. Data b => b -> b) -> HsPSRn -> HsPSRn Source # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> HsPSRn -> r Source # gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> HsPSRn -> r Source # gmapQ :: (forall d. Data d => d -> u) -> HsPSRn -> [u] Source # gmapQi :: Int -> (forall d. Data d => d -> u) -> HsPSRn -> u Source # gmapM :: Monad m => (forall d. Data d => d -> m d) -> HsPSRn -> m HsPSRn Source # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> HsPSRn -> m HsPSRn Source # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> HsPSRn -> m HsPSRn 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

Constructors

HsUnboxedTuple |
HsBoxedTuple |
HsConstraintTuple |
HsBoxedOrConstraintTuple |

#### Instances

Instances details

Data HsTupleSort # |
Instance details Defined in GHC.Hs.Type 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 :: forall r r'. (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 #

type HsContext pass = [LHsType pass] Source #

Haskell Context

type LHsContext pass Source #

Arguments

= Located (HsContext pass) | `AnnKeywordId` : `AnnUnit` For details on above see note [Api annotations] in GHC.Parser.Annotation

Located Haskell Context

noLHsContext :: LHsContext pass Source #

data HsTyLit Source #

Haskell Type Literal

Constructors

HsNumTy SourceText Integer |
HsStrTy SourceText FastString |

#### Instances

Instances details

Data HsTyLit # |
Instance details Defined in GHC.Hs.Type 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 :: forall r r'. (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 # |
Instance details Defined in GHC.Hs.Type Methods ppr :: HsTyLit -> SDoc Source # pprPrec :: Rational -> HsTyLit -> SDoc Source #

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

Instances details

Eq HsIPName # |
Instance details Defined in GHC.Hs.Type Methods (==) :: HsIPName -> HsIPName -> Bool # (/=) :: HsIPName -> HsIPName -> Bool #
Data HsIPName # |
Instance details Defined in GHC.Hs.Type 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 :: forall r r'. (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 # |
Instance details Defined in GHC.Hs.Type Methods pprBndr :: BindingSite -> HsIPName -> SDoc Source # pprPrefixOcc :: HsIPName -> SDoc Source # pprInfixOcc :: HsIPName -> SDoc Source # bndrIsJoin_maybe :: HsIPName -> Maybe Int Source #
Outputable HsIPName # |
Instance details Defined in GHC.Hs.Type Methods ppr :: HsIPName -> SDoc Source # pprPrec :: Rational -> HsIPName -> SDoc Source #

hsIPNameFS :: HsIPName -> FastString Source #

data HsArg tm ty Source #

Constructors

HsValArg tm |
HsTypeArg SrcSpan ty |
HsArgPar SrcSpan |

#### Instances

Instances details

Data (LHsTypeArg GhcTc) # |
Instance details Defined in GHC.Hs.Instances Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> LHsTypeArg GhcTc -> c (LHsTypeArg GhcTc) Source # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (LHsTypeArg GhcTc) Source # toConstr :: LHsTypeArg GhcTc -> Constr Source # dataTypeOf :: LHsTypeArg GhcTc -> DataType Source # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c (LHsTypeArg GhcTc)) Source # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (LHsTypeArg GhcTc)) Source # gmapT :: (forall b. Data b => b -> b) -> LHsTypeArg GhcTc -> LHsTypeArg GhcTc Source # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> LHsTypeArg GhcTc -> r Source # gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> LHsTypeArg GhcTc -> r Source # gmapQ :: (forall d. Data d => d -> u) -> LHsTypeArg GhcTc -> [u] Source # gmapQi :: Int -> (forall d. Data d => d -> u) -> LHsTypeArg GhcTc -> u Source # gmapM :: Monad m => (forall d. Data d => d -> m d) -> LHsTypeArg GhcTc -> m (LHsTypeArg GhcTc) Source # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> LHsTypeArg GhcTc -> m (LHsTypeArg GhcTc) Source # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> LHsTypeArg GhcTc -> m (LHsTypeArg GhcTc) Source #
Data (LHsTypeArg GhcRn) # |
Instance details Defined in GHC.Hs.Instances Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> LHsTypeArg GhcRn -> c (LHsTypeArg GhcRn) Source # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (LHsTypeArg GhcRn) Source # toConstr :: LHsTypeArg GhcRn -> Constr Source # dataTypeOf :: LHsTypeArg GhcRn -> DataType Source # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c (LHsTypeArg GhcRn)) Source # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (LHsTypeArg GhcRn)) Source # gmapT :: (forall b. Data b => b -> b) -> LHsTypeArg GhcRn -> LHsTypeArg GhcRn Source # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> LHsTypeArg GhcRn -> r Source # gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> LHsTypeArg GhcRn -> r Source # gmapQ :: (forall d. Data d => d -> u) -> LHsTypeArg GhcRn -> [u] Source # gmapQi :: Int -> (forall d. Data d => d -> u) -> LHsTypeArg GhcRn -> u Source # gmapM :: Monad m => (forall d. Data d => d -> m d) -> LHsTypeArg GhcRn -> m (LHsTypeArg GhcRn) Source # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> LHsTypeArg GhcRn -> m (LHsTypeArg GhcRn) Source # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> LHsTypeArg GhcRn -> m (LHsTypeArg GhcRn) Source #
Data (LHsTypeArg GhcPs) # |
Instance details Defined in GHC.Hs.Instances Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> LHsTypeArg GhcPs -> c (LHsTypeArg GhcPs) Source # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (LHsTypeArg GhcPs) Source # toConstr :: LHsTypeArg GhcPs -> Constr Source # dataTypeOf :: LHsTypeArg GhcPs -> DataType Source # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c (LHsTypeArg GhcPs)) Source # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (LHsTypeArg GhcPs)) Source # gmapT :: (forall b. Data b => b -> b) -> LHsTypeArg GhcPs -> LHsTypeArg GhcPs Source # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> LHsTypeArg GhcPs -> r Source # gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> LHsTypeArg GhcPs -> r Source # gmapQ :: (forall d. Data d => d -> u) -> LHsTypeArg GhcPs -> [u] Source # gmapQi :: Int -> (forall d. Data d => d -> u) -> LHsTypeArg GhcPs -> u Source # gmapM :: Monad m => (forall d. Data d => d -> m d) -> LHsTypeArg GhcPs -> m (LHsTypeArg GhcPs) Source # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> LHsTypeArg GhcPs -> m (LHsTypeArg GhcPs) Source # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> LHsTypeArg GhcPs -> m (LHsTypeArg GhcPs) Source #
(Outputable tm, Outputable ty) => Outputable (HsArg tm ty) # |
Instance details Defined in GHC.Hs.Type Methods ppr :: HsArg tm ty -> SDoc Source # pprPrec :: Rational -> HsArg tm ty -> SDoc Source #

numVisibleArgs :: [HsArg tm ty] -> Arity Source #

type LHsTypeArg p = HsArg (LHsType p) (LHsKind p) Source #

lhsTypeArgSrcSpan :: LHsTypeArg pass -> SrcSpan Source #

Compute the `SrcSpan` associated with an `LHsTypeArg`.

class OutputableBndrFlag flag Source #

Minimal complete definition

pprTyVarBndr

#### Instances

Instances details

OutputableBndrFlag () # |
Instance details Defined in GHC.Hs.Type Methods pprTyVarBndr :: forall (p :: Pass). OutputableBndrId p => HsTyVarBndr () (GhcPass p) -> SDoc
OutputableBndrFlag Specificity # |
Instance details Defined in GHC.Hs.Type Methods pprTyVarBndr :: forall (p :: Pass). OutputableBndrId p => HsTyVarBndr Specificity (GhcPass p) -> SDoc

type LBangType pass = Located (BangType pass) Source #

Located Bang Type

type BangType pass = HsType pass Source #

Bang Type

In the parser, strictness and packedness annotations bind more tightly than docstrings. This means that when consuming a `BangType` (and looking for `HsBangTy`) we must be ready to peer behind a potential layer of `HsDocTy`. See #15206 for motivation and `getBangType` for an example.

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

Constructors

HsSrcBang SourceText SrcUnpackedness SrcStrictness |

#### Instances

Instances details

Data HsSrcBang # |
Instance details Defined in GHC.Core.DataCon 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 :: forall r r'. (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 # |
Instance details Defined in GHC.Core.DataCon Methods ppr :: HsSrcBang -> SDoc Source # pprPrec :: Rational -> HsSrcBang -> SDoc Source #

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

Instances details

Data HsImplBang # |
Instance details Defined in GHC.Core.DataCon 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 :: forall r r'. (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 # |
Instance details Defined in GHC.Core.DataCon Methods ppr :: HsImplBang -> SDoc Source # pprPrec :: Rational -> HsImplBang -> SDoc Source #

data SrcStrictness Source #

Source Strictness

What strictness annotation the user wrote

Constructors

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

#### Instances

Instances details

Eq SrcStrictness # |
Instance details Defined in GHC.Core.DataCon Methods (==) :: SrcStrictness -> SrcStrictness -> Bool # (/=) :: SrcStrictness -> SrcStrictness -> Bool #
Data SrcStrictness # |
Instance details Defined in GHC.Core.DataCon 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 :: forall r r'. (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 # |
Instance details Defined in GHC.Core.DataCon Methods ppr :: SrcStrictness -> SDoc Source # pprPrec :: Rational -> SrcStrictness -> SDoc Source #
Binary SrcStrictness # |
Instance details Defined in GHC.Core.DataCon Methods put_ :: BinHandle -> SrcStrictness -> IO () Source # put :: BinHandle -> SrcStrictness -> IO (Bin SrcStrictness) Source # get :: BinHandle -> IO SrcStrictness Source #

data SrcUnpackedness Source #

Source Unpackedness

What unpackedness the user requested

Constructors

SrcUnpack | {-# UNPACK #-} specified
SrcNoUnpack | {-# NOUNPACK #-} specified
NoSrcUnpack | no unpack pragma

#### Instances

Instances details

Eq SrcUnpackedness # |
Instance details Defined in GHC.Core.DataCon Methods (==) :: SrcUnpackedness -> SrcUnpackedness -> Bool # (/=) :: SrcUnpackedness -> SrcUnpackedness -> Bool #
Data SrcUnpackedness # |
Instance details Defined in GHC.Core.DataCon 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 :: forall r r'. (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 # |
Instance details Defined in GHC.Core.DataCon Methods ppr :: SrcUnpackedness -> SDoc Source # pprPrec :: Rational -> SrcUnpackedness -> SDoc Source #
Binary SrcUnpackedness # |
Instance details Defined in GHC.Core.DataCon Methods put_ :: BinHandle -> SrcUnpackedness -> IO () Source # put :: BinHandle -> SrcUnpackedness -> IO (Bin SrcUnpackedness) Source # get :: BinHandle -> IO SrcUnpackedness Source #

getBangType :: LHsType a -> LHsType a Source #

getBangStrictness :: LHsType a -> HsSrcBang Source #

data ConDeclField pass Source #

Constructor Declaration Field

Constructors

ConDeclField |
Fields cd_fld_ext :: XConDeclField pass cd_fld_names :: [LFieldOcc pass] See Note [ConDeclField passs] cd_fld_type :: LBangType pass cd_fld_doc :: Maybe LHsDocString `AnnKeywordId` : `AnnDcolon`
XConDeclField !(XXConDeclField pass) |

#### Instances

Instances details

Data (ConDeclField GhcTc) # |
Instance details Defined in GHC.Hs.Instances Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> ConDeclField GhcTc -> c (ConDeclField GhcTc) Source # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (ConDeclField GhcTc) Source # toConstr :: ConDeclField GhcTc -> Constr Source # dataTypeOf :: ConDeclField GhcTc -> DataType Source # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c (ConDeclField GhcTc)) Source # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (ConDeclField GhcTc)) Source # gmapT :: (forall b. Data b => b -> b) -> ConDeclField GhcTc -> ConDeclField GhcTc Source # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> ConDeclField GhcTc -> r Source # gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> ConDeclField GhcTc -> r Source # gmapQ :: (forall d. Data d => d -> u) -> ConDeclField GhcTc -> [u] Source # gmapQi :: Int -> (forall d. Data d => d -> u) -> ConDeclField GhcTc -> u Source # gmapM :: Monad m => (forall d. Data d => d -> m d) -> ConDeclField GhcTc -> m (ConDeclField GhcTc) Source # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> ConDeclField GhcTc -> m (ConDeclField GhcTc) Source # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> ConDeclField GhcTc -> m (ConDeclField GhcTc) Source #
Data (ConDeclField GhcRn) # |
Instance details Defined in GHC.Hs.Instances Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> ConDeclField GhcRn -> c (ConDeclField GhcRn) Source # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (ConDeclField GhcRn) Source # toConstr :: ConDeclField GhcRn -> Constr Source # dataTypeOf :: ConDeclField GhcRn -> DataType Source # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c (ConDeclField GhcRn)) Source # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (ConDeclField GhcRn)) Source # gmapT :: (forall b. Data b => b -> b) -> ConDeclField GhcRn -> ConDeclField GhcRn Source # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> ConDeclField GhcRn -> r Source # gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> ConDeclField GhcRn -> r Source # gmapQ :: (forall d. Data d => d -> u) -> ConDeclField GhcRn -> [u] Source # gmapQi :: Int -> (forall d. Data d => d -> u) -> ConDeclField GhcRn -> u Source # gmapM :: Monad m => (forall d. Data d => d -> m d) -> ConDeclField GhcRn -> m (ConDeclField GhcRn) Source # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> ConDeclField GhcRn -> m (ConDeclField GhcRn) Source # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> ConDeclField GhcRn -> m (ConDeclField GhcRn) Source #
Data (ConDeclField GhcPs) # |
Instance details Defined in GHC.Hs.Instances Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> ConDeclField GhcPs -> c (ConDeclField GhcPs) Source # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (ConDeclField GhcPs) Source # toConstr :: ConDeclField GhcPs -> Constr Source # dataTypeOf :: ConDeclField GhcPs -> DataType Source # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c (ConDeclField GhcPs)) Source # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (ConDeclField GhcPs)) Source # gmapT :: (forall b. Data b => b -> b) -> ConDeclField GhcPs -> ConDeclField GhcPs Source # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> ConDeclField GhcPs -> r Source # gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> ConDeclField GhcPs -> r Source # gmapQ :: (forall d. Data d => d -> u) -> ConDeclField GhcPs -> [u] Source # gmapQi :: Int -> (forall d. Data d => d -> u) -> ConDeclField GhcPs -> u Source # gmapM :: Monad m => (forall d. Data d => d -> m d) -> ConDeclField GhcPs -> m (ConDeclField GhcPs) Source # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> ConDeclField GhcPs -> m (ConDeclField GhcPs) Source # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> ConDeclField GhcPs -> m (ConDeclField GhcPs) Source #
OutputableBndrId p => Outputable (ConDeclField (GhcPass p)) # |
Instance details Defined in GHC.Hs.Type Methods ppr :: ConDeclField (GhcPass p) -> SDoc Source # pprPrec :: Rational -> ConDeclField (GhcPass p) -> SDoc Source #

type LConDeclField pass Source #

Arguments

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

Located Constructor Declaration Field

pprConDeclFields :: OutputableBndrId p => [LConDeclField (GhcPass p)] -> SDoc Source #

data HsConDetails arg rec Source #

Haskell Constructor Details

Constructors

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

#### Instances

Instances details

(Data arg, Data rec) => Data (HsConDetails arg rec) # |
Instance details Defined in GHC.Hs.Type 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 :: forall r r'. (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) # |
Instance details Defined in GHC.Hs.Type 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 extFieldOcc :: XCFieldOcc pass rdrNameFieldOcc :: Located RdrName See Note [Located RdrNames] in GHC.Hs.Expr
XFieldOcc !(XXFieldOcc pass) |

#### Instances

Instances details

Eq (XCFieldOcc (GhcPass p)) => Eq (FieldOcc (GhcPass p)) # |
Instance details Defined in GHC.Hs.Type Methods (==) :: FieldOcc (GhcPass p) -> FieldOcc (GhcPass p) -> Bool # (/=) :: FieldOcc (GhcPass p) -> FieldOcc (GhcPass p) -> Bool #
Data (FieldOcc GhcTc) # |
Instance details Defined in GHC.Hs.Instances Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> FieldOcc GhcTc -> c (FieldOcc GhcTc) Source # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (FieldOcc GhcTc) Source # toConstr :: FieldOcc GhcTc -> Constr Source # dataTypeOf :: FieldOcc GhcTc -> DataType Source # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c (FieldOcc GhcTc)) Source # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (FieldOcc GhcTc)) Source # gmapT :: (forall b. Data b => b -> b) -> FieldOcc GhcTc -> FieldOcc GhcTc Source # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> FieldOcc GhcTc -> r Source # gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> FieldOcc GhcTc -> r Source # gmapQ :: (forall d. Data d => d -> u) -> FieldOcc GhcTc -> [u] Source # gmapQi :: Int -> (forall d. Data d => d -> u) -> FieldOcc GhcTc -> u Source # gmapM :: Monad m => (forall d. Data d => d -> m d) -> FieldOcc GhcTc -> m (FieldOcc GhcTc) Source # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> FieldOcc GhcTc -> m (FieldOcc GhcTc) Source # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> FieldOcc GhcTc -> m (FieldOcc GhcTc) Source #
Data (FieldOcc GhcRn) # |
Instance details Defined in GHC.Hs.Instances Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> FieldOcc GhcRn -> c (FieldOcc GhcRn) Source # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (FieldOcc GhcRn) Source # toConstr :: FieldOcc GhcRn -> Constr Source # dataTypeOf :: FieldOcc GhcRn -> DataType Source # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c (FieldOcc GhcRn)) Source # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (FieldOcc GhcRn)) Source # gmapT :: (forall b. Data b => b -> b) -> FieldOcc GhcRn -> FieldOcc GhcRn Source # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> FieldOcc GhcRn -> r Source # gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> FieldOcc GhcRn -> r Source # gmapQ :: (forall d. Data d => d -> u) -> FieldOcc GhcRn -> [u] Source # gmapQi :: Int -> (forall d. Data d => d -> u) -> FieldOcc GhcRn -> u Source # gmapM :: Monad m => (forall d. Data d => d -> m d) -> FieldOcc GhcRn -> m (FieldOcc GhcRn) Source # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> FieldOcc GhcRn -> m (FieldOcc GhcRn) Source # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> FieldOcc GhcRn -> m (FieldOcc GhcRn) Source #
Data (FieldOcc GhcPs) # |
Instance details Defined in GHC.Hs.Instances Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> FieldOcc GhcPs -> c (FieldOcc GhcPs) Source # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (FieldOcc GhcPs) Source # toConstr :: FieldOcc GhcPs -> Constr Source # dataTypeOf :: FieldOcc GhcPs -> DataType Source # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c (FieldOcc GhcPs)) Source # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (FieldOcc GhcPs)) Source # gmapT :: (forall b. Data b => b -> b) -> FieldOcc GhcPs -> FieldOcc GhcPs Source # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> FieldOcc GhcPs -> r Source # gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> FieldOcc GhcPs -> r Source # gmapQ :: (forall d. Data d => d -> u) -> FieldOcc GhcPs -> [u] Source # gmapQi :: Int -> (forall d. Data d => d -> u) -> FieldOcc GhcPs -> u Source # gmapM :: Monad m => (forall d. Data d => d -> m d) -> FieldOcc GhcPs -> m (FieldOcc GhcPs) Source # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> FieldOcc GhcPs -> m (FieldOcc GhcPs) Source # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> FieldOcc GhcPs -> m (FieldOcc GhcPs) Source #
Outputable (FieldOcc pass) # |
Instance details Defined in GHC.Hs.Type Methods ppr :: FieldOcc pass -> SDoc Source # pprPrec :: Rational -> FieldOcc pass -> SDoc Source #

type LFieldOcc pass = Located (FieldOcc pass) Source #

Located Field Occurrence

mkFieldOcc :: Located RdrName -> FieldOcc GhcPs Source #

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 GHC.Hs.Pat and Note [Disambiguating record fields] in GHC.Tc.Gen.Expr. See Note [Located RdrNames] in GHC.Hs.Expr

Constructors

Unambiguous (XUnambiguous pass) (Located RdrName) |
Ambiguous (XAmbiguous pass) (Located RdrName) |
XAmbiguousFieldOcc !(XXAmbiguousFieldOcc pass) |

#### Instances

Instances details

Data (AmbiguousFieldOcc GhcTc) # |
Instance details Defined in GHC.Hs.Instances Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> AmbiguousFieldOcc GhcTc -> c (AmbiguousFieldOcc GhcTc) Source # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (AmbiguousFieldOcc GhcTc) Source # toConstr :: AmbiguousFieldOcc GhcTc -> Constr Source # dataTypeOf :: AmbiguousFieldOcc GhcTc -> DataType Source # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c (AmbiguousFieldOcc GhcTc)) Source # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (AmbiguousFieldOcc GhcTc)) Source # gmapT :: (forall b. Data b => b -> b) -> AmbiguousFieldOcc GhcTc -> AmbiguousFieldOcc GhcTc Source # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> AmbiguousFieldOcc GhcTc -> r Source # gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> AmbiguousFieldOcc GhcTc -> r Source # gmapQ :: (forall d. Data d => d -> u) -> AmbiguousFieldOcc GhcTc -> [u] Source # gmapQi :: Int -> (forall d. Data d => d -> u) -> AmbiguousFieldOcc GhcTc -> u Source # gmapM :: Monad m => (forall d. Data d => d -> m d) -> AmbiguousFieldOcc GhcTc -> m (AmbiguousFieldOcc GhcTc) Source # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> AmbiguousFieldOcc GhcTc -> m (AmbiguousFieldOcc GhcTc) Source # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> AmbiguousFieldOcc GhcTc -> m (AmbiguousFieldOcc GhcTc) Source #
Data (AmbiguousFieldOcc GhcRn) # |
Instance details Defined in GHC.Hs.Instances Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> AmbiguousFieldOcc GhcRn -> c (AmbiguousFieldOcc GhcRn) Source # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (AmbiguousFieldOcc GhcRn) Source # toConstr :: AmbiguousFieldOcc GhcRn -> Constr Source # dataTypeOf :: AmbiguousFieldOcc GhcRn -> DataType Source # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c (AmbiguousFieldOcc GhcRn)) Source # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (AmbiguousFieldOcc GhcRn)) Source # gmapT :: (forall b. Data b => b -> b) -> AmbiguousFieldOcc GhcRn -> AmbiguousFieldOcc GhcRn Source # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> AmbiguousFieldOcc GhcRn -> r Source # gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> AmbiguousFieldOcc GhcRn -> r Source # gmapQ :: (forall d. Data d => d -> u) -> AmbiguousFieldOcc GhcRn -> [u] Source # gmapQi :: Int -> (forall d. Data d => d -> u) -> AmbiguousFieldOcc GhcRn -> u Source # gmapM :: Monad m => (forall d. Data d => d -> m d) -> AmbiguousFieldOcc GhcRn -> m (AmbiguousFieldOcc GhcRn) Source # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> AmbiguousFieldOcc GhcRn -> m (AmbiguousFieldOcc GhcRn) Source # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> AmbiguousFieldOcc GhcRn -> m (AmbiguousFieldOcc GhcRn) Source #
Data (AmbiguousFieldOcc GhcPs) # |
Instance details Defined in GHC.Hs.Instances Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> AmbiguousFieldOcc GhcPs -> c (AmbiguousFieldOcc GhcPs) Source # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (AmbiguousFieldOcc GhcPs) Source # toConstr :: AmbiguousFieldOcc GhcPs -> Constr Source # dataTypeOf :: AmbiguousFieldOcc GhcPs -> DataType Source # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c (AmbiguousFieldOcc GhcPs)) Source # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (AmbiguousFieldOcc GhcPs)) Source # gmapT :: (forall b. Data b => b -> b) -> AmbiguousFieldOcc GhcPs -> AmbiguousFieldOcc GhcPs Source # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> AmbiguousFieldOcc GhcPs -> r Source # gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> AmbiguousFieldOcc GhcPs -> r Source # gmapQ :: (forall d. Data d => d -> u) -> AmbiguousFieldOcc GhcPs -> [u] Source # gmapQi :: Int -> (forall d. Data d => d -> u) -> AmbiguousFieldOcc GhcPs -> u Source # gmapM :: Monad m => (forall d. Data d => d -> m d) -> AmbiguousFieldOcc GhcPs -> m (AmbiguousFieldOcc GhcPs) Source # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> AmbiguousFieldOcc GhcPs -> m (AmbiguousFieldOcc GhcPs) Source # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> AmbiguousFieldOcc GhcPs -> m (AmbiguousFieldOcc GhcPs) Source #
OutputableBndr (AmbiguousFieldOcc (GhcPass p)) # |
Instance details Defined in GHC.Hs.Type Methods pprBndr :: BindingSite -> AmbiguousFieldOcc (GhcPass p) -> SDoc Source # pprPrefixOcc :: AmbiguousFieldOcc (GhcPass p) -> SDoc Source # pprInfixOcc :: AmbiguousFieldOcc (GhcPass p) -> SDoc Source # bndrIsJoin_maybe :: AmbiguousFieldOcc (GhcPass p) -> Maybe Int Source #
Outputable (AmbiguousFieldOcc (GhcPass p)) # |
Instance details Defined in GHC.Hs.Type Methods ppr :: AmbiguousFieldOcc (GhcPass p) -> SDoc Source # pprPrec :: Rational -> AmbiguousFieldOcc (GhcPass p) -> SDoc Source #

mkAmbiguousFieldOcc :: Located RdrName -> AmbiguousFieldOcc GhcPs Source #

rdrNameAmbiguousFieldOcc :: AmbiguousFieldOcc (GhcPass p) -> RdrName Source #

selectorAmbiguousFieldOcc :: AmbiguousFieldOcc GhcTc -> Id Source #

unambiguousFieldOcc :: AmbiguousFieldOcc GhcTc -> FieldOcc GhcTc Source #

ambiguousFieldOcc :: FieldOcc GhcTc -> AmbiguousFieldOcc GhcTc Source #

mkAnonWildCardTy :: HsType GhcPs Source #

pprAnonWildCard :: SDoc Source #

mkHsImplicitBndrs :: thing -> HsImplicitBndrs GhcPs thing Source #

mkHsWildCardBndrs :: thing -> HsWildCardBndrs GhcPs thing Source #

mkHsPatSigType :: LHsType GhcPs -> HsPatSigType GhcPs Source #

hsImplicitBody :: HsImplicitBndrs (GhcPass p) thing -> thing Source #

mkEmptyImplicitBndrs :: thing -> HsImplicitBndrs GhcRn thing Source #

mkEmptyWildCardBndrs :: thing -> HsWildCardBndrs GhcRn thing Source #

mkHsForAllVisTele :: [LHsTyVarBndr () (GhcPass p)] -> HsForAllTelescope (GhcPass p) Source #

mkHsForAllInvisTele :: [LHsTyVarBndr Specificity (GhcPass p)] -> HsForAllTelescope (GhcPass p) Source #

mkHsQTvs :: [LHsTyVarBndr () GhcPs] -> LHsQTyVars GhcPs Source #

hsQTvExplicit :: LHsQTyVars pass -> [LHsTyVarBndr () pass] Source #

emptyLHsQTvs :: LHsQTyVars GhcRn Source #

isHsKindedTyVar :: HsTyVarBndr flag 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?

isLHsForAllTy :: LHsType p -> Bool Source #

hsScopedTvs :: LHsSigType GhcRn -> [Name] Source #

hsWcScopedTvs :: LHsSigWcType GhcRn -> [Name] Source #

dropWildCards :: LHsSigWcType pass -> LHsSigType pass Source #

hsTyVarName :: HsTyVarBndr flag (GhcPass p) -> IdP (GhcPass p) Source #

hsAllLTyVarNames :: LHsQTyVars GhcRn -> [Name] Source #

hsLTyVarLocNames :: LHsQTyVars (GhcPass p) -> [Located (IdP (GhcPass p))] Source #

hsLTyVarName :: LHsTyVarBndr flag (GhcPass p) -> IdP (GhcPass p) Source #

hsLTyVarNames :: [LHsTyVarBndr flag (GhcPass p)] -> [IdP (GhcPass p)] Source #

hsLTyVarLocName :: LHsTyVarBndr flag (GhcPass p) -> Located (IdP (GhcPass p)) Source #

hsExplicitLTyVarNames :: LHsQTyVars (GhcPass p) -> [IdP (GhcPass p)] Source #

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

Decompose a type class instance type (of the form `forall tvs. context => instance_head`) into its constituent parts. Note that the `[Name]`s returned correspond to either:

- The implicitly bound type variables (if the type lacks an outermost `forall`), or
- The explicitly bound type variables (if the type has an outermost `forall`).

This function is careful not to look through parentheses. See `Note [No nested foralls or contexts in instance types]` for why this is important.

getLHsInstDeclHead :: LHsSigType (GhcPass p) -> LHsType (GhcPass p) Source #

Decompose a type class instance type (of the form `forall tvs. context => instance_head`) into the `instance_head`.

getLHsInstDeclClass_maybe :: LHsSigType (GhcPass p) -> Maybe (Located (IdP (GhcPass p))) Source #

Decompose a type class instance type (of the form `forall tvs. context => instance_head`) into the `instance_head` and retrieve the underlying class type constructor (if it exists).

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

Decompose a pattern synonym type signature into its constituent parts.

Note that this function looks through parentheses, so it will work on types such as `(forall a. ...)`. The downside to this is that it is not generally possible to take the returned types and reconstruct the original type (parentheses and all) from them.

splitLHsForAllTyInvis :: LHsType pass -> ([LHsTyVarBndr Specificity pass], LHsType pass) Source #

Decompose a type of the form `forall tvs. body` into its constituent parts. Only splits type variable binders that were quantified invisibly (e.g., `forall a.`, with a dot).

This function is used to split apart certain types, such as instance declaration types, which disallow visible `forall`s. For instance, if GHC split apart the `forall` in `instance forall a -> Show (Blah a)`, then that declaration would mistakenly be accepted!

Note that this function looks through parentheses, so it will work on types such as `(forall a. ...)`. The downside to this is that it is not generally possible to take the returned types and reconstruct the original type (parentheses and all) from them. Unlike `splitLHsSigmaTyInvis`, this function does not look through parentheses, hence the suffix `_KP` (short for "Keep Parentheses").

splitLHsForAllTyInvis_KP :: LHsType pass -> (Maybe [LHsTyVarBndr Specificity pass], LHsType pass) Source #

Decompose a type of the form `forall tvs. body` into its constituent parts. Only splits type variable binders that were quantified invisibly (e.g., `forall a.`, with a dot).

This function is used to split apart certain types, such as instance declaration types, which disallow visible `forall`s. For instance, if GHC split apart the `forall` in `instance forall a -> Show (Blah a)`, then that declaration would mistakenly be accepted!

Unlike `splitLHsForAllTyInvis`, this function does not look through parentheses, hence the suffix `_KP` (short for "Keep Parentheses").

splitLHsQualTy :: LHsType pass -> (LHsContext pass, LHsType pass) Source #

Decompose a type of the form `context => body` into its constituent parts.

Note that this function looks through parentheses, so it will work on types such as `(context => ...)`. The downside to this is that it is not generally possible to take the returned types and reconstruct the original type (parentheses and all) from them.

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

Decompose a sigma type (of the form `forall tvs. context => body`) into its constituent parts. Only splits type variable binders that were quantified invisibly (e.g., `forall a.`, with a dot).

This function is used to split apart certain types, such as instance declaration types, which disallow visible `forall`s. For instance, if GHC split apart the `forall` in `instance forall a -> Show (Blah a)`, then that declaration would mistakenly be accepted!

Note that this function looks through parentheses, so it will work on types such as `(forall a. ...)`. The downside to this is that it is not generally possible to take the returned types and reconstruct the original type (parentheses and all) from them.

splitLHsGadtTy :: LHsType pass -> (Maybe [LHsTyVarBndr Specificity pass], Maybe (LHsContext pass), LHsType pass) Source #

Decompose a GADT type into its constituent parts. Returns `(mb_tvbs, mb_ctxt, body)`, where:

- `mb_tvbs` are `Just` the leading `forall`s, if they are provided. Otherwise, they are `Nothing`.
- `mb_ctxt` is `Just` the context, if it is provided. Otherwise, it is `Nothing`.
- `body` is the body of the type after the optional `forall`s and context.

This function is careful not to look through parentheses. See `Note [GADT abstract syntax] (Wrinkle: No nested foralls or contexts)` GHC.Hs.Decls for why this is important.

splitHsFunType :: LHsType (GhcPass p) -> ([HsScaled (GhcPass p) (LHsType (GhcPass p))], LHsType (GhcPass p), [AddAnn]) Source #

hsTyGetAppHead_maybe :: LHsType (GhcPass p) -> Maybe (Located (IdP (GhcPass p))) Source #

Retrieve the name of the "head" of a nested type application. This is somewhat like `GHC.Tc.Gen.HsType.splitHsAppTys`, but a little more thorough. The purpose of this function is to examine instance heads, so it doesn't handle *all* cases (like lists, tuples, `(~)`, etc.).

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

mkHsAppTy :: LHsType (GhcPass p) -> LHsType (GhcPass p) -> LHsType (GhcPass p) Source #

mkHsAppTys :: LHsType (GhcPass p) -> [LHsType (GhcPass p)] -> LHsType (GhcPass p) Source #

mkHsAppKindTy :: XAppKindTy (GhcPass p) -> LHsType (GhcPass p) -> LHsType (GhcPass p) -> LHsType (GhcPass p) Source #

ignoreParens :: LHsType pass -> LHsType pass Source #

hsSigType :: LHsSigType (GhcPass p) -> LHsType (GhcPass p) Source #

hsSigWcType :: LHsSigWcType pass -> LHsType pass Source #

hsPatSigType :: HsPatSigType pass -> LHsType pass Source #

hsTyKindSig :: LHsType pass -> Maybe (LHsKind pass) Source #

Get the kind signature of a type, ignoring parentheses:

hsTyKindSig `Maybe ` = Nothing hsTyKindSig `Maybe :: Type -> Type ` = Just `Type -> Type` hsTyKindSig `Maybe :: ((Type -> Type))` = Just `Type -> Type`

This is used to extract the result kind of type synonyms with a CUSK:

type S = (F :: res_kind) ^^^^^^^^

hsConDetailsArgs :: HsConDetails (LHsType a) (Located [LConDeclField a]) -> [LHsType a] Source #

setHsTyVarBndrFlag :: flag -> HsTyVarBndr flag' (GhcPass pass) -> HsTyVarBndr flag (GhcPass pass) Source #

Set the attached flag

hsTyVarBndrFlag :: HsTyVarBndr flag (GhcPass pass) -> flag Source #

Return the attached flag

pprHsType :: OutputableBndrId p => HsType (GhcPass p) -> SDoc Source #

pprHsForAll :: forall p. OutputableBndrId p => HsForAllTelescope (GhcPass p) -> LHsContext (GhcPass p) -> SDoc Source #

Prints a forall; When passed an empty list, prints `forall .`/`forall ->` only when `-dppr-debug` is enabled.

pprHsExplicitForAll :: OutputableBndrId p => Maybe [LHsTyVarBndr () (GhcPass p)] -> SDoc Source #

Version of `pprHsForAll` or `pprHsForAllExtra` that will always print `forall.` when passed `Just []`. Prints nothing if passed `Nothing`

pprLHsContext :: OutputableBndrId p => LHsContext (GhcPass p) -> SDoc Source #

hsTypeNeedsParens :: PprPrec -> HsType (GhcPass p) -> Bool Source #

``hsTypeNeedsParens` p t` returns `True` if the type `t` needs parentheses under precedence `p`.

parenthesizeHsType :: PprPrec -> LHsType (GhcPass p) -> LHsType (GhcPass p) Source #

``parenthesizeHsType` p ty` checks if ``hsTypeNeedsParens` p ty` is true, and if so, surrounds `ty` with an `HsParTy`. Otherwise, it simply returns `ty`.

parenthesizeHsContext :: PprPrec -> LHsContext (GhcPass p) -> LHsContext (GhcPass p) Source #

``parenthesizeHsContext` p ctxt` checks if `ctxt` is a single constraint `c` such that ``hsTypeNeedsParens` p c` is true, and if so, surrounds `c` with an `HsParTy` to form a parenthesized `ctxt`. Otherwise, it simply returns `ctxt` unchanged.