ghc-lib-parser-9.12.2.20250421: The GHC API, decoupled from GHC versions

Safe Haskell | Ignore
Language | GHC2021

GHC.Types.FieldLabel

Contents

- Orphan instances

Synopsis

- type FieldLabelEnv = DFastStringEnv FieldLabel
- data FieldLabel = FieldLabel {
  - flHasDuplicateRecordFields :: DuplicateRecordFields
  - flHasFieldSelector :: FieldSelectors
  - flSelector :: Name
  }
- flLabel :: FieldLabel -> FieldLabelString
- data DuplicateRecordFields
  - = DuplicateRecordFields
  - | NoDuplicateRecordFields
- data FieldSelectors
  - = FieldSelectors
  - | NoFieldSelectors
- flIsOverloaded :: FieldLabel -> Bool

# Documentation

type FieldLabelEnv = DFastStringEnv FieldLabel Source #

A map from labels to all the auxiliary information

data FieldLabel Source #

Fields in an algebraic record type; see Note [FieldLabel].

Constructors

FieldLabel |

Fields

- flHasDuplicateRecordFields :: DuplicateRecordFields

  Was `DuplicateRecordFields` on in the defining module for this datatype?

- flHasFieldSelector :: FieldSelectors

  Was `FieldSelectors` enabled in the defining module for this datatype? See Note [NoFieldSelectors] in GHC.Rename.Env

- flSelector :: Name

  The `Name` of the selector function, which uniquely identifies the field label.

#### Instances

Instances details

NFData FieldLabel Source # |
Instance details Defined in GHC.Types.Name Methods rnf :: FieldLabel -> () Source #
Data FieldLabel Source # |

Instance details

Defined in GHC.Types.FieldLabel

Methods

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

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

toConstr :: FieldLabel -> Constr Source #

dataTypeOf :: FieldLabel -> DataType Source #

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

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

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

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

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

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

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

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

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

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

HasOccName FieldLabel Source # |
Instance details Defined in GHC.Types.FieldLabel Methods occName :: FieldLabel -> OccName Source #
Binary Name => Binary FieldLabel Source # | We need the `Binary Name` constraint here even though there is an instance defined in GHC.Types.Name, because the we have a SOURCE import, so the instance is not in scope. And the instance cannot be added to Name.hs-boot because GHC.Utils.Binary itself depends on GHC.Types.Name.
Instance details Defined in GHC.Types.FieldLabel Methods put_ :: WriteBinHandle -> FieldLabel -> IO () Source # put :: WriteBinHandle -> FieldLabel -> IO (Bin FieldLabel) Source # get :: ReadBinHandle -> IO FieldLabel Source #
Outputable FieldLabel Source # |
Instance details Defined in GHC.Types.FieldLabel Methods ppr :: FieldLabel -> SDoc Source #
Eq FieldLabel Source # |
Instance details Defined in GHC.Types.FieldLabel Methods (==) :: FieldLabel -> FieldLabel -> Bool Source # (/=) :: FieldLabel -> FieldLabel -> Bool Source #

flLabel :: FieldLabel -> FieldLabelString Source #

User-visible label of a field.

data DuplicateRecordFields Source #

Flag to indicate whether the DuplicateRecordFields extension is enabled.

Constructors

DuplicateRecordFields | Fields may be duplicated in a single module
NoDuplicateRecordFields | Fields must be unique within a module (the default)

#### Instances

Instances details

NFData DuplicateRecordFields Source # |
Instance details Defined in GHC.Types.FieldLabel Methods rnf :: DuplicateRecordFields -> () Source #
Data DuplicateRecordFields Source # |

Instance details

Defined in GHC.Types.FieldLabel

Methods

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

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

toConstr :: DuplicateRecordFields -> Constr Source #

dataTypeOf :: DuplicateRecordFields -> DataType Source #

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

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

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

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

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

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

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

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

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

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

Show DuplicateRecordFields Source # |
Instance details Defined in GHC.Types.FieldLabel Methods showsPrec :: Int -> DuplicateRecordFields -> ShowS Source # show :: DuplicateRecordFields -> String Source # showList :: [DuplicateRecordFields] -> ShowS Source #
Binary DuplicateRecordFields Source # |
Instance details Defined in GHC.Types.FieldLabel Methods put_ :: WriteBinHandle -> DuplicateRecordFields -> IO () Source # put :: WriteBinHandle -> DuplicateRecordFields -> IO (Bin DuplicateRecordFields) Source # get :: ReadBinHandle -> IO DuplicateRecordFields Source #
Outputable DuplicateRecordFields Source # |
Instance details Defined in GHC.Types.FieldLabel Methods ppr :: DuplicateRecordFields -> SDoc Source #
Eq DuplicateRecordFields Source # |
Instance details Defined in GHC.Types.FieldLabel Methods (==) :: DuplicateRecordFields -> DuplicateRecordFields -> Bool Source # (/=) :: DuplicateRecordFields -> DuplicateRecordFields -> Bool Source #

data FieldSelectors Source #

Flag to indicate whether the FieldSelectors extension is enabled.

Constructors

FieldSelectors | Selector functions are available (the default)
NoFieldSelectors | Selector functions are not available

#### Instances

Instances details

NFData FieldSelectors Source # |
Instance details Defined in GHC.Types.FieldLabel Methods rnf :: FieldSelectors -> () Source #
Data FieldSelectors Source # |

Instance details

Defined in GHC.Types.FieldLabel

Methods

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

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

toConstr :: FieldSelectors -> Constr Source #

dataTypeOf :: FieldSelectors -> DataType Source #

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

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

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

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

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

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

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

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

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

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

Show FieldSelectors Source # |
Instance details Defined in GHC.Types.FieldLabel Methods showsPrec :: Int -> FieldSelectors -> ShowS Source # show :: FieldSelectors -> String Source # showList :: [FieldSelectors] -> ShowS Source #
Binary FieldSelectors Source # |
Instance details Defined in GHC.Types.FieldLabel Methods put_ :: WriteBinHandle -> FieldSelectors -> IO () Source # put :: WriteBinHandle -> FieldSelectors -> IO (Bin FieldSelectors) Source # get :: ReadBinHandle -> IO FieldSelectors Source #
Outputable FieldSelectors Source # |
Instance details Defined in GHC.Types.FieldLabel Methods ppr :: FieldSelectors -> SDoc Source #
Eq FieldSelectors Source # |
Instance details Defined in GHC.Types.FieldLabel Methods (==) :: FieldSelectors -> FieldSelectors -> Bool Source # (/=) :: FieldSelectors -> FieldSelectors -> Bool Source #

flIsOverloaded :: FieldLabel -> Bool Source #

# Orphan instances

Uniquable FieldLabelString Source # |
Instance details Methods getUnique :: FieldLabelString -> Unique Source #
Outputable FieldLabelString Source # |
Instance details Methods ppr :: FieldLabelString -> SDoc Source #