Language.Haskell.Syntax.Basic

ghc-9.10.0.20240328: The GHC API

Safe Haskell | None
Language | GHC2021

Language.Haskell.Syntax.Basic

Synopsis

- data Boxity
  - = Boxed
  - | Unboxed
- isBoxed :: Boxity -> Bool
- type SumWidth = Int
- type ConTag = Int
- newtype FieldLabelString = FieldLabelString {
  - field_label :: FastString
  }
- data Role
  - = Nominal
  - | Representational
  - | Phantom
- data SrcStrictness
  - = SrcLazy
  - | SrcStrict
  - | NoSrcStrict
- data SrcUnpackedness
  - = SrcUnpack
  - | SrcNoUnpack
  - | NoSrcUnpack

# Documentation

data Boxity Source #

Constructors

Boxed |
Unboxed |

#### Instances

Instances details

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

isBoxed :: Boxity -> Bool Source #

type SumWidth = Int Source #

The width of an unboxed sum

type ConTag = Int Source #

A *one-index* constructor tag

Type of the tags associated with each constructor possibility or superclass selector

newtype FieldLabelString Source #

Field labels are just represented as strings; they are not necessarily unique (even within a module)

Constructors

FieldLabelString |
Fields field_label :: FastString

#### Instances

Instances details

NFData FieldLabelString Source # |
Instance details Defined in Language.Haskell.Syntax.Basic Methods rnf :: FieldLabelString -> () Source #
Uniquable FieldLabelString Source # |
Instance details Defined in GHC.Types.FieldLabel Methods getUnique :: FieldLabelString -> Unique Source #
Outputable FieldLabelString Source # |
Instance details Defined in GHC.Types.FieldLabel Methods ppr :: FieldLabelString -> SDoc Source #
Data FieldLabelString Source # |
Instance details Defined in Language.Haskell.Syntax.Basic Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> FieldLabelString -> c FieldLabelString # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c FieldLabelString # toConstr :: FieldLabelString -> Constr # dataTypeOf :: FieldLabelString -> DataType # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c FieldLabelString) # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c FieldLabelString) # gmapT :: (forall b. Data b => b -> b) -> FieldLabelString -> FieldLabelString # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> FieldLabelString -> r # gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> FieldLabelString -> r # gmapQ :: (forall d. Data d => d -> u) -> FieldLabelString -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> FieldLabelString -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> FieldLabelString -> m FieldLabelString # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> FieldLabelString -> m FieldLabelString # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> FieldLabelString -> m FieldLabelString #
Eq FieldLabelString Source # |
Instance details Defined in Language.Haskell.Syntax.Basic Methods (==) :: FieldLabelString -> FieldLabelString -> Bool # (/=) :: FieldLabelString -> FieldLabelString -> Bool #
type Anno FieldLabelString Source # |
Instance details Defined in GHC.Hs.Expr type Anno FieldLabelString = SrcSpanAnnN

data Role Source #

See Note [Roles] in GHC.Core.Coercion

Order of constructors matters: the Ord instance coincides with the *super*typing relation on roles.

Constructors

Nominal |
Representational |
Phantom |

#### Instances

Instances details

Binary Role Source # |
Instance details Defined in GHC.Core.Coercion.Axiom Methods put_ :: BinHandle -> Role -> IO () Source # put :: BinHandle -> Role -> IO (Bin Role) Source # get :: BinHandle -> IO Role Source #
Outputable Role Source # |
Instance details Defined in GHC.Core.Coercion.Axiom Methods ppr :: Role -> SDoc Source #
Data Role Source # |
Instance details Defined in Language.Haskell.Syntax.Basic Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> Role -> c Role # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c Role # toConstr :: Role -> Constr # dataTypeOf :: Role -> DataType # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c Role) # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c Role) # gmapT :: (forall b. Data b => b -> b) -> Role -> Role # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Role -> r # gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Role -> r # gmapQ :: (forall d. Data d => d -> u) -> Role -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> Role -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> Role -> m Role # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> Role -> m Role # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> Role -> m Role #
Eq Role Source # |
Instance details Defined in Language.Haskell.Syntax.Basic Methods (==) :: Role -> Role -> Bool # (/=) :: Role -> Role -> Bool #
Ord Role Source # |
Instance details Defined in Language.Haskell.Syntax.Basic Methods compare :: Role -> Role -> Ordering # (<) :: Role -> Role -> Bool # (<=) :: Role -> Role -> Bool # (>) :: Role -> Role -> Bool # (>=) :: Role -> Role -> Bool # max :: Role -> Role -> Role # min :: Role -> Role -> Role #
type Anno (Maybe Role) Source # |
Instance details Defined in GHC.Hs.Decls type Anno (Maybe Role) = EpAnnCO
type Anno (Maybe Role) Source # |
Instance details Defined in GHC.Hs.Decls type Anno (Maybe Role) = EpAnnCO

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

Binary SrcStrictness Source # |
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 #
Outputable SrcStrictness Source # |
Instance details Defined in GHC.Core.DataCon Methods ppr :: SrcStrictness -> SDoc Source #
Data SrcStrictness Source # |
Instance details Defined in Language.Haskell.Syntax.Basic Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> SrcStrictness -> c SrcStrictness # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c SrcStrictness # toConstr :: SrcStrictness -> Constr # dataTypeOf :: SrcStrictness -> DataType # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c SrcStrictness) # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c SrcStrictness) # gmapT :: (forall b. Data b => b -> b) -> SrcStrictness -> SrcStrictness # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> SrcStrictness -> r # gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> SrcStrictness -> r # gmapQ :: (forall d. Data d => d -> u) -> SrcStrictness -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> SrcStrictness -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> SrcStrictness -> m SrcStrictness # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> SrcStrictness -> m SrcStrictness # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> SrcStrictness -> m SrcStrictness #
Eq SrcStrictness Source # |
Instance details Defined in Language.Haskell.Syntax.Basic Methods (==) :: SrcStrictness -> SrcStrictness -> Bool # (/=) :: SrcStrictness -> SrcStrictness -> Bool #

data SrcUnpackedness Source #

Source Unpackedness

What unpackedness the user requested

Constructors

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

#### Instances

Instances details

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