HsTypes

ghc-8.0.1: The GHC API

Safe Haskell | None
Language | Haskell2010

HsTypes

Synopsis

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

# Documentation

data HsType name Source #

Constructors

HsForAllTy | `AnnKeywordId` : `AnnForall`, `AnnDot`,`AnnDarrow` For details on above see note [Api annotations] in ApiAnnotation
Fields hst_bndrs :: [LHsTyVarBndr name] hst_body :: LHsType name
HsQualTy |
Fields hst_ctxt :: LHsContext name hst_body :: LHsType name
HsTyVar (Located name) | `AnnKeywordId` : None
HsAppsTy [LHsAppType name] | `AnnKeywordId` : None
HsAppTy (LHsType name) (LHsType name) | `AnnKeywordId` : None
HsFunTy (LHsType name) (LHsType name) | `AnnKeywordId` : `AnnRarrow`,
HsListTy (LHsType name) | `AnnKeywordId` : `AnnOpen` `'['`, `AnnClose` `']'`
HsPArrTy (LHsType name) | `AnnKeywordId` : `AnnOpen` `'[:'`, `AnnClose` `':]'`
HsTupleTy HsTupleSort [LHsType name] | `AnnKeywordId` : `AnnOpen` `'(' or '(#'`, `AnnClose` `')' or '#)'`
HsOpTy (LHsType name) (Located name) (LHsType name) | `AnnKeywordId` : None
HsParTy (LHsType name) | `AnnKeywordId` : `AnnOpen` `'('`, `AnnClose` `')'`
HsIParamTy HsIPName (LHsType name) |
    (?x :: ty)
`AnnKeywordId` : `AnnDcolon`
HsEqTy (LHsType name) (LHsType name) |
    ty1 ~ ty2
`AnnKeywordId` : `AnnTilde`
HsKindSig (LHsType name) (LHsKind name) |
    (ty :: kind)
`AnnKeywordId` : `AnnOpen` `'('`, `AnnDcolon`,`AnnClose` `')'`
HsSpliceTy (HsSplice name) (PostTc name Kind) | `AnnKeywordId` : `AnnOpen` `'$('`, `AnnClose` `')'`
HsDocTy (LHsType name) LHsDocString | `AnnKeywordId` : None
HsBangTy HsSrcBang (LHsType name) | `AnnKeywordId` : `AnnOpen` `'{-# UNPACK' or '{-# NOUNPACK'`, `AnnClose` `'#-}'` `AnnBang` `'!'`
HsRecTy [LConDeclField name] | `AnnKeywordId` : `AnnOpen` `'{'`, `AnnClose` `'}'`
HsCoreTy Type | `AnnKeywordId` : None
HsExplicitListTy (PostTc name Kind) [LHsType name] | `AnnKeywordId` : `AnnOpen` `"'["`, `AnnClose` `']'`
HsExplicitTupleTy [PostTc name Kind] [LHsType name] | `AnnKeywordId` : `AnnOpen` `"'("`, `AnnClose` `')'`
HsTyLit HsTyLit | `AnnKeywordId` : None
HsWildCardTy (HsWildCardInfo name) | `AnnKeywordId` : None

Instances

DataId name => Data (HsType name) # |
Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> HsType name -> c (HsType name) Source # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (HsType name) Source # toConstr :: HsType name -> Constr Source # dataTypeOf :: HsType name -> DataType Source # dataCast1 :: Typeable (* -> *) t => (forall d. Data d => c (t d)) -> Maybe (c (HsType name)) Source # dataCast2 :: Typeable (* -> * -> *) t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (HsType name)) Source # gmapT :: (forall b. Data b => b -> b) -> HsType name -> HsType name Source # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> HsType name -> r Source # gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> HsType name -> r Source # gmapQ :: (forall d. Data d => d -> u) -> HsType name -> [u] Source # gmapQi :: Int -> (forall d. Data d => d -> u) -> HsType name -> u Source # gmapM :: Monad m => (forall d. Data d => d -> m d) -> HsType name -> m (HsType name) Source # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> HsType name -> m (HsType name) Source # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> HsType name -> m (HsType name) Source #
OutputableBndr name => Outputable (HsType name) # |
Methods ppr :: HsType name -> SDoc Source # pprPrec :: Rational -> HsType name -> SDoc Source #

type LHsType name Source #

Arguments

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

type HsKind name = HsType name Source #

type LHsKind name Source #

Arguments

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

data HsTyVarBndr name Source #

Constructors

UserTyVar (Located name) |
KindedTyVar (Located name) (LHsKind name) | `AnnKeywordId` : `AnnOpen`, `AnnDcolon`, `AnnClose`

Instances

DataId name => Data (HsTyVarBndr name) # |
Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> HsTyVarBndr name -> c (HsTyVarBndr name) Source # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (HsTyVarBndr name) Source # toConstr :: HsTyVarBndr name -> Constr Source # dataTypeOf :: HsTyVarBndr name -> DataType Source # dataCast1 :: Typeable (* -> *) t => (forall d. Data d => c (t d)) -> Maybe (c (HsTyVarBndr name)) Source # dataCast2 :: Typeable (* -> * -> *) t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (HsTyVarBndr name)) Source # gmapT :: (forall b. Data b => b -> b) -> HsTyVarBndr name -> HsTyVarBndr name Source # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> HsTyVarBndr name -> r Source # gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> HsTyVarBndr name -> r Source # gmapQ :: (forall d. Data d => d -> u) -> HsTyVarBndr name -> [u] Source # gmapQi :: Int -> (forall d. Data d => d -> u) -> HsTyVarBndr name -> u Source # gmapM :: Monad m => (forall d. Data d => d -> m d) -> HsTyVarBndr name -> m (HsTyVarBndr name) Source # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> HsTyVarBndr name -> m (HsTyVarBndr name) Source # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> HsTyVarBndr name -> m (HsTyVarBndr name) Source #
OutputableBndr name => Outputable (HsTyVarBndr name) # |
Methods ppr :: HsTyVarBndr name -> SDoc Source # pprPrec :: Rational -> HsTyVarBndr name -> SDoc Source #

type LHsTyVarBndr name = Located (HsTyVarBndr name) Source #

data LHsQTyVars name Source #

Constructors

HsQTvs |
Fields hsq_implicit :: PostRn name [Name] hsq_explicit :: [LHsTyVarBndr name] hsq_dependent :: PostRn name NameSet

Instances

DataId name => Data (LHsQTyVars name) # |
Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> LHsQTyVars name -> c (LHsQTyVars name) Source # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (LHsQTyVars name) Source # toConstr :: LHsQTyVars name -> Constr Source # dataTypeOf :: LHsQTyVars name -> DataType Source # dataCast1 :: Typeable (* -> *) t => (forall d. Data d => c (t d)) -> Maybe (c (LHsQTyVars name)) Source # dataCast2 :: Typeable (* -> * -> *) t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (LHsQTyVars name)) Source # gmapT :: (forall b. Data b => b -> b) -> LHsQTyVars name -> LHsQTyVars name Source # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> LHsQTyVars name -> r Source # gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> LHsQTyVars name -> r Source # gmapQ :: (forall d. Data d => d -> u) -> LHsQTyVars name -> [u] Source # gmapQi :: Int -> (forall d. Data d => d -> u) -> LHsQTyVars name -> u Source # gmapM :: Monad m => (forall d. Data d => d -> m d) -> LHsQTyVars name -> m (LHsQTyVars name) Source # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> LHsQTyVars name -> m (LHsQTyVars name) Source # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> LHsQTyVars name -> m (LHsQTyVars name) Source #
OutputableBndr name => Outputable (LHsQTyVars name) # |
Methods ppr :: LHsQTyVars name -> SDoc Source # pprPrec :: Rational -> LHsQTyVars name -> SDoc Source #

data HsImplicitBndrs name thing Source #

Constructors

HsIB |
Fields hsib_vars :: PostRn name [Name] hsib_body :: thing

Instances

(Data name, Data thing, Data (PostRn name [Name])) => Data (HsImplicitBndrs name thing) # |
Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> HsImplicitBndrs name thing -> c (HsImplicitBndrs name thing) Source # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (HsImplicitBndrs name thing) Source # toConstr :: HsImplicitBndrs name thing -> Constr Source # dataTypeOf :: HsImplicitBndrs name thing -> DataType Source # dataCast1 :: Typeable (* -> *) t => (forall d. Data d => c (t d)) -> Maybe (c (HsImplicitBndrs name thing)) Source # dataCast2 :: Typeable (* -> * -> *) t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (HsImplicitBndrs name thing)) Source # gmapT :: (forall b. Data b => b -> b) -> HsImplicitBndrs name thing -> HsImplicitBndrs name thing Source # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> HsImplicitBndrs name thing -> r Source # gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> HsImplicitBndrs name thing -> r Source # gmapQ :: (forall d. Data d => d -> u) -> HsImplicitBndrs name thing -> [u] Source # gmapQi :: Int -> (forall d. Data d => d -> u) -> HsImplicitBndrs name thing -> u Source # gmapM :: Monad m => (forall d. Data d => d -> m d) -> HsImplicitBndrs name thing -> m (HsImplicitBndrs name thing) Source # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> HsImplicitBndrs name thing -> m (HsImplicitBndrs name thing) Source # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> HsImplicitBndrs name thing -> m (HsImplicitBndrs name thing) Source #
Outputable thing => Outputable (HsImplicitBndrs name thing) # |
Methods ppr :: HsImplicitBndrs name thing -> SDoc Source # pprPrec :: Rational -> HsImplicitBndrs name thing -> SDoc Source #

data HsWildCardBndrs name thing Source #

Constructors

HsWC |
Fields hswc_wcs :: PostRn name [Name] hswc_ctx :: Maybe SrcSpan hswc_body :: thing

Instances

(Data name, Data thing, Data (PostRn name [Name])) => Data (HsWildCardBndrs name thing) # |
Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> HsWildCardBndrs name thing -> c (HsWildCardBndrs name thing) Source # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (HsWildCardBndrs name thing) Source # toConstr :: HsWildCardBndrs name thing -> Constr Source # dataTypeOf :: HsWildCardBndrs name thing -> DataType Source # dataCast1 :: Typeable (* -> *) t => (forall d. Data d => c (t d)) -> Maybe (c (HsWildCardBndrs name thing)) Source # dataCast2 :: Typeable (* -> * -> *) t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (HsWildCardBndrs name thing)) Source # gmapT :: (forall b. Data b => b -> b) -> HsWildCardBndrs name thing -> HsWildCardBndrs name thing Source # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> HsWildCardBndrs name thing -> r Source # gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> HsWildCardBndrs name thing -> r Source # gmapQ :: (forall d. Data d => d -> u) -> HsWildCardBndrs name thing -> [u] Source # gmapQi :: Int -> (forall d. Data d => d -> u) -> HsWildCardBndrs name thing -> u Source # gmapM :: Monad m => (forall d. Data d => d -> m d) -> HsWildCardBndrs name thing -> m (HsWildCardBndrs name thing) Source # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> HsWildCardBndrs name thing -> m (HsWildCardBndrs name thing) Source # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> HsWildCardBndrs name thing -> m (HsWildCardBndrs name thing) Source #
Outputable thing => Outputable (HsWildCardBndrs name thing) # |
Methods ppr :: HsWildCardBndrs name thing -> SDoc Source # pprPrec :: Rational -> HsWildCardBndrs name thing -> SDoc Source #

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

type LHsSigWcType name = HsImplicitBndrs name (LHsWcType name) Source #

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

data HsTupleSort Source #

Constructors

HsUnboxedTuple |
HsBoxedTuple |
HsConstraintTuple |
HsBoxedOrConstraintTuple |

Instances

Data HsTupleSort # |
Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> HsTupleSort -> c HsTupleSort Source # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c HsTupleSort Source # toConstr :: HsTupleSort -> Constr Source # dataTypeOf :: HsTupleSort -> DataType Source # dataCast1 :: Typeable (* -> *) t => (forall d. Data d => c (t d)) -> Maybe (c HsTupleSort) Source # dataCast2 :: Typeable (* -> * -> *) t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c HsTupleSort) Source # gmapT :: (forall b. Data b => b -> b) -> HsTupleSort -> HsTupleSort Source # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> HsTupleSort -> r Source # gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> HsTupleSort -> r Source # gmapQ :: (forall d. Data d => d -> u) -> HsTupleSort -> [u] Source # gmapQi :: Int -> (forall d. Data d => d -> u) -> HsTupleSort -> u Source # gmapM :: Monad m => (forall d. Data d => d -> m d) -> HsTupleSort -> m HsTupleSort Source # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> HsTupleSort -> m HsTupleSort Source # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> HsTupleSort -> m HsTupleSort Source #

type HsContext name = [LHsType name] Source #

type LHsContext name Source #

Arguments

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

data HsTyLit Source #

Constructors

HsNumTy SourceText Integer |
HsStrTy SourceText FastString |

Instances

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

Eq HsIPName # |
Methods (==) :: HsIPName -> HsIPName -> Bool # (/=) :: HsIPName -> HsIPName -> Bool #
Data HsIPName # |
Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> HsIPName -> c HsIPName Source # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c HsIPName Source # toConstr :: HsIPName -> Constr Source # dataTypeOf :: HsIPName -> DataType Source # dataCast1 :: Typeable (* -> *) t => (forall d. Data d => c (t d)) -> Maybe (c HsIPName) Source # dataCast2 :: Typeable (* -> * -> *) t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c HsIPName) Source # gmapT :: (forall b. Data b => b -> b) -> HsIPName -> HsIPName Source # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> HsIPName -> r Source # gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> HsIPName -> r Source # gmapQ :: (forall d. Data d => d -> u) -> HsIPName -> [u] Source # gmapQi :: Int -> (forall d. Data d => d -> u) -> HsIPName -> u Source # gmapM :: Monad m => (forall d. Data d => d -> m d) -> HsIPName -> m HsIPName Source # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> HsIPName -> m HsIPName Source # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> HsIPName -> m HsIPName Source #
OutputableBndr HsIPName # |
Methods pprBndr :: BindingSite -> HsIPName -> SDoc Source # pprPrefixOcc :: HsIPName -> SDoc Source # pprInfixOcc :: HsIPName -> SDoc Source #
Outputable HsIPName # |
Methods ppr :: HsIPName -> SDoc Source # pprPrec :: Rational -> HsIPName -> SDoc Source #

hsIPNameFS :: HsIPName -> FastString Source #

data HsAppType name Source #

Constructors

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

Instances

DataId name => Data (HsAppType name) # |
Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> HsAppType name -> c (HsAppType name) Source # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (HsAppType name) Source # toConstr :: HsAppType name -> Constr Source # dataTypeOf :: HsAppType name -> DataType Source # dataCast1 :: Typeable (* -> *) t => (forall d. Data d => c (t d)) -> Maybe (c (HsAppType name)) Source # dataCast2 :: Typeable (* -> * -> *) t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (HsAppType name)) Source # gmapT :: (forall b. Data b => b -> b) -> HsAppType name -> HsAppType name Source # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> HsAppType name -> r Source # gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> HsAppType name -> r Source # gmapQ :: (forall d. Data d => d -> u) -> HsAppType name -> [u] Source # gmapQi :: Int -> (forall d. Data d => d -> u) -> HsAppType name -> u Source # gmapM :: Monad m => (forall d. Data d => d -> m d) -> HsAppType name -> m (HsAppType name) Source # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> HsAppType name -> m (HsAppType name) Source # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> HsAppType name -> m (HsAppType name) Source #
OutputableBndr name => Outputable (HsAppType name) # |
Methods ppr :: HsAppType name -> SDoc Source # pprPrec :: Rational -> HsAppType name -> SDoc Source #

type LHsAppType name Source #

Arguments

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

type LBangType name = Located (BangType name) Source #

type BangType name = HsType name Source #

data HsSrcBang Source #

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 (Maybe SourceText) SrcUnpackedness SrcStrictness |

Instances

Data HsSrcBang # |
Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> HsSrcBang -> c HsSrcBang Source # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c HsSrcBang Source # toConstr :: HsSrcBang -> Constr Source # dataTypeOf :: HsSrcBang -> DataType Source # dataCast1 :: Typeable (* -> *) t => (forall d. Data d => c (t d)) -> Maybe (c HsSrcBang) Source # dataCast2 :: Typeable (* -> * -> *) t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c HsSrcBang) Source # gmapT :: (forall b. Data b => b -> b) -> HsSrcBang -> HsSrcBang Source # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> HsSrcBang -> r Source # gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> HsSrcBang -> r Source # gmapQ :: (forall d. Data d => d -> u) -> HsSrcBang -> [u] Source # gmapQi :: Int -> (forall d. Data d => d -> u) -> HsSrcBang -> u Source # gmapM :: Monad m => (forall d. Data d => d -> m d) -> HsSrcBang -> m HsSrcBang Source # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> HsSrcBang -> m HsSrcBang Source # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> HsSrcBang -> m HsSrcBang Source #
Outputable HsSrcBang # |
Methods ppr :: HsSrcBang -> SDoc Source # pprPrec :: Rational -> HsSrcBang -> SDoc Source #

data HsImplBang Source #

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

Constructors

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

Instances

Data HsImplBang # |
Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> HsImplBang -> c HsImplBang Source # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c HsImplBang Source # toConstr :: HsImplBang -> Constr Source # dataTypeOf :: HsImplBang -> DataType Source # dataCast1 :: Typeable (* -> *) t => (forall d. Data d => c (t d)) -> Maybe (c HsImplBang) Source # dataCast2 :: Typeable (* -> * -> *) t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c HsImplBang) Source # gmapT :: (forall b. Data b => b -> b) -> HsImplBang -> HsImplBang Source # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> HsImplBang -> r Source # gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> HsImplBang -> r Source # gmapQ :: (forall d. Data d => d -> u) -> HsImplBang -> [u] Source # gmapQi :: Int -> (forall d. Data d => d -> u) -> HsImplBang -> u Source # gmapM :: Monad m => (forall d. Data d => d -> m d) -> HsImplBang -> m HsImplBang Source # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> HsImplBang -> m HsImplBang Source # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> HsImplBang -> m HsImplBang Source #
Outputable HsImplBang # |
Methods ppr :: HsImplBang -> SDoc Source # pprPrec :: Rational -> HsImplBang -> SDoc Source #

data SrcStrictness Source #

What strictness annotation the user wrote

Constructors

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

Instances

Eq SrcStrictness # |
Methods (==) :: SrcStrictness -> SrcStrictness -> Bool # (/=) :: SrcStrictness -> SrcStrictness -> Bool #
Data SrcStrictness # |
Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> SrcStrictness -> c SrcStrictness Source # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c SrcStrictness Source # toConstr :: SrcStrictness -> Constr Source # dataTypeOf :: SrcStrictness -> DataType Source # dataCast1 :: Typeable (* -> *) t => (forall d. Data d => c (t d)) -> Maybe (c SrcStrictness) Source # dataCast2 :: Typeable (* -> * -> *) t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c SrcStrictness) Source # gmapT :: (forall b. Data b => b -> b) -> SrcStrictness -> SrcStrictness Source # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> SrcStrictness -> r Source # gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> SrcStrictness -> r Source # gmapQ :: (forall d. Data d => d -> u) -> SrcStrictness -> [u] Source # gmapQi :: Int -> (forall d. Data d => d -> u) -> SrcStrictness -> u Source # gmapM :: Monad m => (forall d. Data d => d -> m d) -> SrcStrictness -> m SrcStrictness Source # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> SrcStrictness -> m SrcStrictness Source # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> SrcStrictness -> m SrcStrictness Source #
Outputable SrcStrictness # |
Methods ppr :: SrcStrictness -> SDoc Source # pprPrec :: Rational -> SrcStrictness -> SDoc Source #
Binary SrcStrictness # |
Methods put_ :: BinHandle -> SrcStrictness -> IO () Source # put :: BinHandle -> SrcStrictness -> IO (Bin SrcStrictness) Source # get :: BinHandle -> IO SrcStrictness Source #

data SrcUnpackedness Source #

What unpackedness the user requested

Constructors

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

Instances

Eq SrcUnpackedness # |
Methods (==) :: SrcUnpackedness -> SrcUnpackedness -> Bool # (/=) :: SrcUnpackedness -> SrcUnpackedness -> Bool #
Data SrcUnpackedness # |
Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> SrcUnpackedness -> c SrcUnpackedness Source # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c SrcUnpackedness Source # toConstr :: SrcUnpackedness -> Constr Source # dataTypeOf :: SrcUnpackedness -> DataType Source # dataCast1 :: Typeable (* -> *) t => (forall d. Data d => c (t d)) -> Maybe (c SrcUnpackedness) Source # dataCast2 :: Typeable (* -> * -> *) t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c SrcUnpackedness) Source # gmapT :: (forall b. Data b => b -> b) -> SrcUnpackedness -> SrcUnpackedness Source # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> SrcUnpackedness -> r Source # gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> SrcUnpackedness -> r Source # gmapQ :: (forall d. Data d => d -> u) -> SrcUnpackedness -> [u] Source # gmapQi :: Int -> (forall d. Data d => d -> u) -> SrcUnpackedness -> u Source # gmapM :: Monad m => (forall d. Data d => d -> m d) -> SrcUnpackedness -> m SrcUnpackedness Source # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> SrcUnpackedness -> m SrcUnpackedness Source # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> SrcUnpackedness -> m SrcUnpackedness Source #
Outputable SrcUnpackedness # |
Methods ppr :: SrcUnpackedness -> SDoc Source # pprPrec :: Rational -> SrcUnpackedness -> SDoc Source #
Binary SrcUnpackedness # |
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 name Source #

Constructors

ConDeclField | `AnnKeywordId` : `AnnDcolon`
Fields cd_fld_names :: [LFieldOcc name] See Note [ConDeclField names] cd_fld_type :: LBangType name cd_fld_doc :: Maybe LHsDocString

Instances

DataId name => Data (ConDeclField name) # |
Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> ConDeclField name -> c (ConDeclField name) Source # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (ConDeclField name) Source # toConstr :: ConDeclField name -> Constr Source # dataTypeOf :: ConDeclField name -> DataType Source # dataCast1 :: Typeable (* -> *) t => (forall d. Data d => c (t d)) -> Maybe (c (ConDeclField name)) Source # dataCast2 :: Typeable (* -> * -> *) t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (ConDeclField name)) Source # gmapT :: (forall b. Data b => b -> b) -> ConDeclField name -> ConDeclField name Source # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> ConDeclField name -> r Source # gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> ConDeclField name -> r Source # gmapQ :: (forall d. Data d => d -> u) -> ConDeclField name -> [u] Source # gmapQi :: Int -> (forall d. Data d => d -> u) -> ConDeclField name -> u Source # gmapM :: Monad m => (forall d. Data d => d -> m d) -> ConDeclField name -> m (ConDeclField name) Source # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> ConDeclField name -> m (ConDeclField name) Source # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> ConDeclField name -> m (ConDeclField name) Source #
OutputableBndr name => Outputable (ConDeclField name) # |
Methods ppr :: ConDeclField name -> SDoc Source # pprPrec :: Rational -> ConDeclField name -> SDoc Source #

type LConDeclField name Source #

Arguments

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

pprConDeclFields :: OutputableBndr name => [LConDeclField name] -> SDoc Source #

updateGadtResult Source #

Arguments

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

data HsConDetails arg rec Source #

Constructors

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

Instances

(Data arg, Data rec) => Data (HsConDetails arg rec) # |
Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> HsConDetails arg rec -> c (HsConDetails arg rec) Source # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (HsConDetails arg rec) Source # toConstr :: HsConDetails arg rec -> Constr Source # dataTypeOf :: HsConDetails arg rec -> DataType Source # dataCast1 :: Typeable (* -> *) t => (forall d. Data d => c (t d)) -> Maybe (c (HsConDetails arg rec)) Source # dataCast2 :: Typeable (* -> * -> *) t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (HsConDetails arg rec)) Source # gmapT :: (forall b. Data b => b -> b) -> HsConDetails arg rec -> HsConDetails arg rec Source # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> HsConDetails arg rec -> r Source # gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> HsConDetails arg rec -> r Source # gmapQ :: (forall d. Data d => d -> u) -> HsConDetails arg rec -> [u] Source # gmapQi :: Int -> (forall d. Data d => d -> u) -> HsConDetails arg rec -> u Source # gmapM :: Monad m => (forall d. Data d => d -> m d) -> HsConDetails arg rec -> m (HsConDetails arg rec) Source # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> HsConDetails arg rec -> m (HsConDetails arg rec) Source # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> HsConDetails arg rec -> m (HsConDetails arg rec) Source #
(Outputable arg, Outputable rec) => Outputable (HsConDetails arg rec) # |
Methods ppr :: HsConDetails arg rec -> SDoc Source # pprPrec :: Rational -> HsConDetails arg rec -> SDoc Source #

data FieldOcc name Source #

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

Constructors

FieldOcc |
Fields rdrNameFieldOcc :: Located RdrName See Note [Located RdrNames] in HsExpr selectorFieldOcc :: PostRn name name

Instances

Eq (PostRn name name) => Eq (FieldOcc name) # |
Methods (==) :: FieldOcc name -> FieldOcc name -> Bool # (/=) :: FieldOcc name -> FieldOcc name -> Bool #
(Data name, Data (PostRn name name)) => Data (FieldOcc name) # |
Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> FieldOcc name -> c (FieldOcc name) Source # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (FieldOcc name) Source # toConstr :: FieldOcc name -> Constr Source # dataTypeOf :: FieldOcc name -> DataType Source # dataCast1 :: Typeable (* -> *) t => (forall d. Data d => c (t d)) -> Maybe (c (FieldOcc name)) Source # dataCast2 :: Typeable (* -> * -> *) t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (FieldOcc name)) Source # gmapT :: (forall b. Data b => b -> b) -> FieldOcc name -> FieldOcc name Source # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> FieldOcc name -> r Source # gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> FieldOcc name -> r Source # gmapQ :: (forall d. Data d => d -> u) -> FieldOcc name -> [u] Source # gmapQi :: Int -> (forall d. Data d => d -> u) -> FieldOcc name -> u Source # gmapM :: Monad m => (forall d. Data d => d -> m d) -> FieldOcc name -> m (FieldOcc name) Source # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> FieldOcc name -> m (FieldOcc name) Source # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> FieldOcc name -> m (FieldOcc name) Source #
Ord (PostRn name name) => Ord (FieldOcc name) # |
Methods compare :: FieldOcc name -> FieldOcc name -> Ordering # (<) :: FieldOcc name -> FieldOcc name -> Bool # (<=) :: FieldOcc name -> FieldOcc name -> Bool # (>) :: FieldOcc name -> FieldOcc name -> Bool # (>=) :: FieldOcc name -> FieldOcc name -> Bool # max :: FieldOcc name -> FieldOcc name -> FieldOcc name # min :: FieldOcc name -> FieldOcc name -> FieldOcc name #
Outputable (FieldOcc name) # |
Methods ppr :: FieldOcc name -> SDoc Source # pprPrec :: Rational -> FieldOcc name -> SDoc Source #

type LFieldOcc name = Located (FieldOcc name) Source #

mkFieldOcc :: Located RdrName -> FieldOcc RdrName Source #

data AmbiguousFieldOcc name Source #

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

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

Constructors

Unambiguous (Located RdrName) (PostRn name name) |
Ambiguous (Located RdrName) (PostTc name name) |

Instances

(Data name, Data (PostRn name name), Data (PostTc name name)) => Data (AmbiguousFieldOcc name) # |
Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> AmbiguousFieldOcc name -> c (AmbiguousFieldOcc name) Source # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (AmbiguousFieldOcc name) Source # toConstr :: AmbiguousFieldOcc name -> Constr Source # dataTypeOf :: AmbiguousFieldOcc name -> DataType Source # dataCast1 :: Typeable (* -> *) t => (forall d. Data d => c (t d)) -> Maybe (c (AmbiguousFieldOcc name)) Source # dataCast2 :: Typeable (* -> * -> *) t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (AmbiguousFieldOcc name)) Source # gmapT :: (forall b. Data b => b -> b) -> AmbiguousFieldOcc name -> AmbiguousFieldOcc name Source # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> AmbiguousFieldOcc name -> r Source # gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> AmbiguousFieldOcc name -> r Source # gmapQ :: (forall d. Data d => d -> u) -> AmbiguousFieldOcc name -> [u] Source # gmapQi :: Int -> (forall d. Data d => d -> u) -> AmbiguousFieldOcc name -> u Source # gmapM :: Monad m => (forall d. Data d => d -> m d) -> AmbiguousFieldOcc name -> m (AmbiguousFieldOcc name) Source # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> AmbiguousFieldOcc name -> m (AmbiguousFieldOcc name) Source # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> AmbiguousFieldOcc name -> m (AmbiguousFieldOcc name) Source #
OutputableBndr (AmbiguousFieldOcc name) # |
Methods pprBndr :: BindingSite -> AmbiguousFieldOcc name -> SDoc Source # pprPrefixOcc :: AmbiguousFieldOcc name -> SDoc Source # pprInfixOcc :: AmbiguousFieldOcc name -> SDoc Source #
Outputable (AmbiguousFieldOcc name) # |
Methods ppr :: AmbiguousFieldOcc name -> SDoc Source # pprPrec :: Rational -> AmbiguousFieldOcc name -> SDoc Source #

mkAmbiguousFieldOcc :: Located RdrName -> AmbiguousFieldOcc RdrName Source #

rdrNameAmbiguousFieldOcc :: AmbiguousFieldOcc name -> RdrName Source #

selectorAmbiguousFieldOcc :: AmbiguousFieldOcc Id -> Id Source #

unambiguousFieldOcc :: AmbiguousFieldOcc Id -> FieldOcc Id Source #

ambiguousFieldOcc :: FieldOcc name -> AmbiguousFieldOcc name Source #

newtype HsWildCardInfo name Source #

Constructors

AnonWildCard (PostRn name (Located Name)) |

Instances

DataId name => Data (HsWildCardInfo name) # |
Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> HsWildCardInfo name -> c (HsWildCardInfo name) Source # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (HsWildCardInfo name) Source # toConstr :: HsWildCardInfo name -> Constr Source # dataTypeOf :: HsWildCardInfo name -> DataType Source # dataCast1 :: Typeable (* -> *) t => (forall d. Data d => c (t d)) -> Maybe (c (HsWildCardInfo name)) Source # dataCast2 :: Typeable (* -> * -> *) t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (HsWildCardInfo name)) Source # gmapT :: (forall b. Data b => b -> b) -> HsWildCardInfo name -> HsWildCardInfo name Source # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> HsWildCardInfo name -> r Source # gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> HsWildCardInfo name -> r Source # gmapQ :: (forall d. Data d => d -> u) -> HsWildCardInfo name -> [u] Source # gmapQi :: Int -> (forall d. Data d => d -> u) -> HsWildCardInfo name -> u Source # gmapM :: Monad m => (forall d. Data d => d -> m d) -> HsWildCardInfo name -> m (HsWildCardInfo name) Source # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> HsWildCardInfo name -> m (HsWildCardInfo name) Source # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> HsWildCardInfo name -> m (HsWildCardInfo name) Source #
Outputable (HsWildCardInfo name) # |
Methods ppr :: HsWildCardInfo name -> SDoc Source # pprPrec :: Rational -> HsWildCardInfo name -> SDoc Source #

mkAnonWildCardTy :: HsType RdrName Source #

wildCardName :: HsWildCardInfo Name -> Name Source #

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

mkHsImplicitBndrs :: thing -> HsImplicitBndrs RdrName thing Source #

mkHsWildCardBndrs :: thing -> HsWildCardBndrs RdrName thing Source #

hsImplicitBody :: HsImplicitBndrs name thing -> thing Source #

mkEmptyImplicitBndrs :: thing -> HsImplicitBndrs Name thing Source #

mkEmptyWildCardBndrs :: thing -> HsWildCardBndrs Name thing Source #

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

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

emptyLHsQTvs :: LHsQTyVars Name Source #

isEmptyLHsQTvs :: LHsQTyVars Name -> Bool Source #

isHsKindedTyVar :: HsTyVarBndr name -> Bool Source #

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

hsTvbAllKinded :: LHsQTyVars name -> Bool Source #

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

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

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

dropWildCards :: LHsSigWcType name -> LHsSigType name Source #

hsTyVarName :: HsTyVarBndr name -> name Source #

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

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

hsLTyVarName :: LHsTyVarBndr name -> name Source #

hsLTyVarLocName :: LHsTyVarBndr name -> Located name Source #

hsExplicitLTyVarNames :: LHsQTyVars name -> [name] Source #

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

getLHsInstDeclHead :: LHsSigType name -> LHsType name Source #

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

ignoreParens :: LHsType name -> LHsType name Source #

hsSigType :: LHsSigType name -> LHsType name Source #

hsSigWcType :: LHsSigWcType name -> LHsType name Source #

hsLTyVarBndrToType :: LHsTyVarBndr name -> LHsType name Source #

Convert a LHsTyVarBndr to an equivalent LHsType.

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

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

pprParendHsType :: OutputableBndr name => HsType name -> SDoc Source #

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

pprHsForAllTvs :: OutputableBndr name => [LHsTyVarBndr name] -> SDoc Source #

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

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

pprHsContext :: OutputableBndr name => HsContext name -> SDoc Source #

pprHsContextNoArrow :: OutputableBndr name => HsContext name -> SDoc Source #

pprHsContextMaybe :: OutputableBndr name => HsContext name -> Maybe SDoc Source #