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

Safe Haskell | Ignore
Language | GHC2021

GHC.ByteCode.Types

Description

Bytecode assembler types

Synopsis

- data CompiledByteCode = CompiledByteCode {
  - bc_bcos :: FlatBag UnlinkedBCO
  - bc_itbls :: ItblEnv
  - bc_ffis :: [FFIInfo]
  - bc_strs :: AddrEnv
  - bc_breaks :: Maybe ModBreaks
  - bc_spt_entries :: ![SptEntry]
  }
- seqCompiledByteCode :: CompiledByteCode -> ()
- data BCOByteArray (a :: k) = BCOByteArray {
  - getBCOByteArray :: !ByteArray#
  }
- mkBCOByteArray :: UArray Int a -> BCOByteArray a
- newtype FFIInfo = FFIInfo (RemotePtr C_ffi_cif)
- newtype RegBitmap = RegBitmap {
  - unRegBitmap :: Word32
  }
- data NativeCallType
  - = NativePrimCall
  - | NativeTupleReturn
- data NativeCallInfo = NativeCallInfo {
  - nativeCallType :: !NativeCallType
  - nativeCallSize :: !WordOff
  - nativeCallRegs :: !GlobalRegSet
  - nativeCallStackSpillSize :: !WordOff
  }
- voidTupleReturnInfo :: NativeCallInfo
- voidPrimCallInfo :: NativeCallInfo
- newtype ByteOff = ByteOff Int
- newtype WordOff = WordOff Int
- newtype HalfWord = HalfWord Word
- data UnlinkedBCO = UnlinkedBCO {
  - unlinkedBCOName :: !Name
  - unlinkedBCOArity :: !Int
  - unlinkedBCOInstrs :: !(BCOByteArray Word16)
  - unlinkedBCOBitmap :: !(BCOByteArray Word)
  - unlinkedBCOLits :: !(FlatBag BCONPtr)
  - unlinkedBCOPtrs :: !(FlatBag BCOPtr)
  }
- data BCOPtr
  - = BCOPtrName !Name
  - | BCOPtrPrimOp !PrimOp
  - | BCOPtrBCO !UnlinkedBCO
  - | BCOPtrBreakArray (ForeignRef BreakArray)
- data BCONPtr
  - = BCONPtrWord !Word
  - | BCONPtrLbl !FastString
  - | BCONPtrItbl !Name
  - | BCONPtrAddr !Name
  - | BCONPtrStr !ByteString
- type ItblEnv = NameEnv (Name, ItblPtr)
- newtype ItblPtr = ItblPtr (RemotePtr StgInfoTable)
- type AddrEnv = NameEnv (Name, AddrPtr)
- newtype AddrPtr = AddrPtr (RemotePtr ())
- data CgBreakInfo = CgBreakInfo {
  - cgb_tyvars :: ![IfaceTvBndr]
  - cgb_vars :: ![Maybe (IfaceIdBndr, Word)]
  - cgb_resty :: !IfaceType
  }
- data ModBreaks = ModBreaks {
  - modBreaks_flags :: ForeignRef BreakArray
  - modBreaks_locs :: !(Array BreakIndex SrcSpan)
  - modBreaks_vars :: !(Array BreakIndex [OccName])
  - modBreaks_decls :: !(Array BreakIndex [String])
  - modBreaks_ccs :: !(Array BreakIndex (RemotePtr CostCentre))
  - modBreaks_breakInfo :: IntMap CgBreakInfo
  - modBreaks_module :: RemotePtr ModuleName
  }
- type BreakIndex = Int
- emptyModBreaks :: ModBreaks
- data CCostCentre
- data FlatBag a
- sizeFlatBag :: FlatBag a -> Word
- fromSizedSeq :: SizedSeq a -> FlatBag a
- elemsFlatBag :: FlatBag a -> [a]

# Documentation

data CompiledByteCode Source #

Constructors

CompiledByteCode |

Fields

- bc_bcos :: FlatBag UnlinkedBCO

  Bunch of interpretable bindings

- bc_itbls :: ItblEnv

  Mapping from DataCons to their info tables

- bc_ffis :: [FFIInfo]

  ffi blocks we allocated

- bc_strs :: AddrEnv

  top-level strings (heap allocated)

- bc_breaks :: Maybe ModBreaks

  breakpoint info (Nothing if breakpoints are disabled)

- bc_spt_entries :: ![SptEntry]

  Static pointer table entries which should be loaded along with the BCOs. See Note [Grand plan for static forms] in GHC.Iface.Tidy.StaticPtrTable.

#### Instances

Instances details

Outputable CompiledByteCode Source # |
Instance details Defined in GHC.ByteCode.Types Methods ppr :: CompiledByteCode -> SDoc Source #

seqCompiledByteCode :: CompiledByteCode -> () Source #

data BCOByteArray (a :: k) Source #

Wrapper for a `ByteArray#`. The phantom type tells what elements are stored in the `ByteArray#`. Creating a `ByteArray#` can be achieved using `UArray'`s API, where the underlying `ByteArray#` can be unpacked.

Constructors

BCOByteArray |

Fields

- getBCOByteArray :: !ByteArray#

#### Instances

Instances details

(Binary a, Storable a, IArray UArray a) => Binary (BCOByteArray a) Source # |
Instance details Defined in GHCi.ResolvedBCO Methods put :: BCOByteArray a -> Put Source # get :: Get (BCOByteArray a) Source # putList :: [BCOByteArray a] -> Put Source #
Show (BCOByteArray Word16) Source # |
Instance details Defined in GHCi.ResolvedBCO Methods showsPrec :: Int -> BCOByteArray Word16 -> ShowS Source # show :: BCOByteArray Word16 -> String Source # showList :: [BCOByteArray Word16] -> ShowS Source #
Show (BCOByteArray Word) Source # |
Instance details Defined in GHCi.ResolvedBCO Methods showsPrec :: Int -> BCOByteArray Word -> ShowS Source # show :: BCOByteArray Word -> String Source # showList :: [BCOByteArray Word] -> ShowS Source #

mkBCOByteArray :: UArray Int a -> BCOByteArray a Source #

newtype FFIInfo Source #

Constructors

FFIInfo (RemotePtr C_ffi_cif) |

#### Instances

Instances details

NFData FFIInfo Source # |
Instance details Defined in GHC.ByteCode.Types Methods rnf :: FFIInfo -> () Source #
Show FFIInfo Source # |
Instance details Defined in GHC.ByteCode.Types Methods showsPrec :: Int -> FFIInfo -> ShowS Source # show :: FFIInfo -> String Source # showList :: [FFIInfo] -> ShowS Source #

newtype RegBitmap Source #

Constructors

RegBitmap |

Fields

- unRegBitmap :: Word32

#### Instances

Instances details

Bits RegBitmap Source # |

Instance details

Defined in GHC.ByteCode.Types

Methods

(.&.) :: RegBitmap -> RegBitmap -> RegBitmap Source #

(.|.) :: RegBitmap -> RegBitmap -> RegBitmap Source #

xor :: RegBitmap -> RegBitmap -> RegBitmap Source #

complement :: RegBitmap -> RegBitmap Source #

shift :: RegBitmap -> Int -> RegBitmap Source #

rotate :: RegBitmap -> Int -> RegBitmap Source #

zeroBits :: RegBitmap Source #

bit :: Int -> RegBitmap Source #

setBit :: RegBitmap -> Int -> RegBitmap Source #

clearBit :: RegBitmap -> Int -> RegBitmap Source #

complementBit :: RegBitmap -> Int -> RegBitmap Source #

testBit :: RegBitmap -> Int -> Bool Source #

bitSizeMaybe :: RegBitmap -> Maybe Int Source #

bitSize :: RegBitmap -> Int Source #

isSigned :: RegBitmap -> Bool Source #

shiftL :: RegBitmap -> Int -> RegBitmap Source #

unsafeShiftL :: RegBitmap -> Int -> RegBitmap Source #

shiftR :: RegBitmap -> Int -> RegBitmap Source #

unsafeShiftR :: RegBitmap -> Int -> RegBitmap Source #

rotateL :: RegBitmap -> Int -> RegBitmap Source #

rotateR :: RegBitmap -> Int -> RegBitmap Source #

popCount :: RegBitmap -> Int Source #

FiniteBits RegBitmap Source # |
Instance details Defined in GHC.ByteCode.Types Methods finiteBitSize :: RegBitmap -> Int Source # countLeadingZeros :: RegBitmap -> Int Source # countTrailingZeros :: RegBitmap -> Int Source #
Enum RegBitmap Source # |

Instance details

Defined in GHC.ByteCode.Types

Methods

succ :: RegBitmap -> RegBitmap Source #

pred :: RegBitmap -> RegBitmap Source #

toEnum :: Int -> RegBitmap Source #

fromEnum :: RegBitmap -> Int Source #

enumFrom :: RegBitmap -> [RegBitmap] Source #

enumFromThen :: RegBitmap -> RegBitmap -> [RegBitmap] Source #

enumFromTo :: RegBitmap -> RegBitmap -> [RegBitmap] Source #

enumFromThenTo :: RegBitmap -> RegBitmap -> RegBitmap -> [RegBitmap] Source #

Num RegBitmap Source # |
Instance details Defined in GHC.ByteCode.Types Methods (+) :: RegBitmap -> RegBitmap -> RegBitmap Source # (-) :: RegBitmap -> RegBitmap -> RegBitmap Source # (*) :: RegBitmap -> RegBitmap -> RegBitmap Source # negate :: RegBitmap -> RegBitmap Source # abs :: RegBitmap -> RegBitmap Source # signum :: RegBitmap -> RegBitmap Source # fromInteger :: Integer -> RegBitmap Source #
Integral RegBitmap Source # |

Instance details

Defined in GHC.ByteCode.Types

Methods

quot :: RegBitmap -> RegBitmap -> RegBitmap Source #

rem :: RegBitmap -> RegBitmap -> RegBitmap Source #

div :: RegBitmap -> RegBitmap -> RegBitmap Source #

mod :: RegBitmap -> RegBitmap -> RegBitmap Source #

quotRem :: RegBitmap -> RegBitmap -> (RegBitmap, RegBitmap) Source #

divMod :: RegBitmap -> RegBitmap -> (RegBitmap, RegBitmap) Source #

toInteger :: RegBitmap -> Integer Source #

Real RegBitmap Source # |
Instance details Defined in GHC.ByteCode.Types Methods toRational :: RegBitmap -> Rational Source #
Show RegBitmap Source # |
Instance details Defined in GHC.ByteCode.Types Methods showsPrec :: Int -> RegBitmap -> ShowS Source # show :: RegBitmap -> String Source # showList :: [RegBitmap] -> ShowS Source #
Outputable RegBitmap Source # |
Instance details Defined in GHC.ByteCode.Types Methods ppr :: RegBitmap -> SDoc Source #
Eq RegBitmap Source # |
Instance details Defined in GHC.ByteCode.Types Methods (==) :: RegBitmap -> RegBitmap -> Bool Source # (/=) :: RegBitmap -> RegBitmap -> Bool Source #
Ord RegBitmap Source # |

Instance details

Defined in GHC.ByteCode.Types

Methods

compare :: RegBitmap -> RegBitmap -> Ordering Source #

(<) :: RegBitmap -> RegBitmap -> Bool Source #

(<=) :: RegBitmap -> RegBitmap -> Bool Source #

(>) :: RegBitmap -> RegBitmap -> Bool Source #

(>=) :: RegBitmap -> RegBitmap -> Bool Source #

max :: RegBitmap -> RegBitmap -> RegBitmap Source #

min :: RegBitmap -> RegBitmap -> RegBitmap Source #

data NativeCallType Source #

Constructors

NativePrimCall |
NativeTupleReturn |

#### Instances

Instances details

Eq NativeCallType Source # |
Instance details Defined in GHC.ByteCode.Types Methods (==) :: NativeCallType -> NativeCallType -> Bool Source # (/=) :: NativeCallType -> NativeCallType -> Bool Source #

data NativeCallInfo Source #

Constructors

NativeCallInfo |

Fields

- nativeCallType :: !NativeCallType
- nativeCallSize :: !WordOff
- nativeCallRegs :: !GlobalRegSet
- nativeCallStackSpillSize :: !WordOff

#### Instances

Instances details

Outputable NativeCallInfo Source # |
Instance details Defined in GHC.ByteCode.Types Methods ppr :: NativeCallInfo -> SDoc Source #

voidTupleReturnInfo :: NativeCallInfo Source #

voidPrimCallInfo :: NativeCallInfo Source #

newtype ByteOff Source #

Constructors

ByteOff Int |

#### Instances

Instances details

Enum ByteOff Source # |

Instance details

Defined in GHC.ByteCode.Types

Methods

succ :: ByteOff -> ByteOff Source #

pred :: ByteOff -> ByteOff Source #

toEnum :: Int -> ByteOff Source #

fromEnum :: ByteOff -> Int Source #

enumFrom :: ByteOff -> [ByteOff] Source #

enumFromThen :: ByteOff -> ByteOff -> [ByteOff] Source #

enumFromTo :: ByteOff -> ByteOff -> [ByteOff] Source #

enumFromThenTo :: ByteOff -> ByteOff -> ByteOff -> [ByteOff] Source #

Num ByteOff Source # |
Instance details Defined in GHC.ByteCode.Types Methods (+) :: ByteOff -> ByteOff -> ByteOff Source # (-) :: ByteOff -> ByteOff -> ByteOff Source # (*) :: ByteOff -> ByteOff -> ByteOff Source # negate :: ByteOff -> ByteOff Source # abs :: ByteOff -> ByteOff Source # signum :: ByteOff -> ByteOff Source # fromInteger :: Integer -> ByteOff Source #
Integral ByteOff Source # |

Instance details

Defined in GHC.ByteCode.Types

Methods

quot :: ByteOff -> ByteOff -> ByteOff Source #

rem :: ByteOff -> ByteOff -> ByteOff Source #

div :: ByteOff -> ByteOff -> ByteOff Source #

mod :: ByteOff -> ByteOff -> ByteOff Source #

quotRem :: ByteOff -> ByteOff -> (ByteOff, ByteOff) Source #

divMod :: ByteOff -> ByteOff -> (ByteOff, ByteOff) Source #

toInteger :: ByteOff -> Integer Source #

Real ByteOff Source # |
Instance details Defined in GHC.ByteCode.Types Methods toRational :: ByteOff -> Rational Source #
Show ByteOff Source # |
Instance details Defined in GHC.ByteCode.Types Methods showsPrec :: Int -> ByteOff -> ShowS Source # show :: ByteOff -> String Source # showList :: [ByteOff] -> ShowS Source #
Outputable ByteOff Source # |
Instance details Defined in GHC.ByteCode.Types Methods ppr :: ByteOff -> SDoc Source #
Eq ByteOff Source # |
Instance details Defined in GHC.ByteCode.Types Methods (==) :: ByteOff -> ByteOff -> Bool Source # (/=) :: ByteOff -> ByteOff -> Bool Source #
Ord ByteOff Source # |
Instance details Defined in GHC.ByteCode.Types Methods compare :: ByteOff -> ByteOff -> Ordering Source # (<) :: ByteOff -> ByteOff -> Bool Source # (<=) :: ByteOff -> ByteOff -> Bool Source # (>) :: ByteOff -> ByteOff -> Bool Source # (>=) :: ByteOff -> ByteOff -> Bool Source # max :: ByteOff -> ByteOff -> ByteOff Source # min :: ByteOff -> ByteOff -> ByteOff Source #

newtype WordOff Source #

Constructors

WordOff Int |

#### Instances

Instances details

Enum WordOff Source # |

Instance details

Defined in GHC.ByteCode.Types

Methods

succ :: WordOff -> WordOff Source #

pred :: WordOff -> WordOff Source #

toEnum :: Int -> WordOff Source #

fromEnum :: WordOff -> Int Source #

enumFrom :: WordOff -> [WordOff] Source #

enumFromThen :: WordOff -> WordOff -> [WordOff] Source #

enumFromTo :: WordOff -> WordOff -> [WordOff] Source #

enumFromThenTo :: WordOff -> WordOff -> WordOff -> [WordOff] Source #

Num WordOff Source # |
Instance details Defined in GHC.ByteCode.Types Methods (+) :: WordOff -> WordOff -> WordOff Source # (-) :: WordOff -> WordOff -> WordOff Source # (*) :: WordOff -> WordOff -> WordOff Source # negate :: WordOff -> WordOff Source # abs :: WordOff -> WordOff Source # signum :: WordOff -> WordOff Source # fromInteger :: Integer -> WordOff Source #
Integral WordOff Source # |

Instance details

Defined in GHC.ByteCode.Types

Methods

quot :: WordOff -> WordOff -> WordOff Source #

rem :: WordOff -> WordOff -> WordOff Source #

div :: WordOff -> WordOff -> WordOff Source #

mod :: WordOff -> WordOff -> WordOff Source #

quotRem :: WordOff -> WordOff -> (WordOff, WordOff) Source #

divMod :: WordOff -> WordOff -> (WordOff, WordOff) Source #

toInteger :: WordOff -> Integer Source #

Real WordOff Source # |
Instance details Defined in GHC.ByteCode.Types Methods toRational :: WordOff -> Rational Source #
Show WordOff Source # |
Instance details Defined in GHC.ByteCode.Types Methods showsPrec :: Int -> WordOff -> ShowS Source # show :: WordOff -> String Source # showList :: [WordOff] -> ShowS Source #
Outputable WordOff Source # |
Instance details Defined in GHC.ByteCode.Types Methods ppr :: WordOff -> SDoc Source #
Eq WordOff Source # |
Instance details Defined in GHC.ByteCode.Types Methods (==) :: WordOff -> WordOff -> Bool Source # (/=) :: WordOff -> WordOff -> Bool Source #
Ord WordOff Source # |
Instance details Defined in GHC.ByteCode.Types Methods compare :: WordOff -> WordOff -> Ordering Source # (<) :: WordOff -> WordOff -> Bool Source # (<=) :: WordOff -> WordOff -> Bool Source # (>) :: WordOff -> WordOff -> Bool Source # (>=) :: WordOff -> WordOff -> Bool Source # max :: WordOff -> WordOff -> WordOff Source # min :: WordOff -> WordOff -> WordOff Source #

newtype HalfWord Source #

Constructors

HalfWord Word |

#### Instances

Instances details

Enum HalfWord Source # |

Instance details

Defined in GHC.ByteCode.Types

Methods

succ :: HalfWord -> HalfWord Source #

pred :: HalfWord -> HalfWord Source #

toEnum :: Int -> HalfWord Source #

fromEnum :: HalfWord -> Int Source #

enumFrom :: HalfWord -> [HalfWord] Source #

enumFromThen :: HalfWord -> HalfWord -> [HalfWord] Source #

enumFromTo :: HalfWord -> HalfWord -> [HalfWord] Source #

enumFromThenTo :: HalfWord -> HalfWord -> HalfWord -> [HalfWord] Source #

Num HalfWord Source # |
Instance details Defined in GHC.ByteCode.Types Methods (+) :: HalfWord -> HalfWord -> HalfWord Source # (-) :: HalfWord -> HalfWord -> HalfWord Source # (*) :: HalfWord -> HalfWord -> HalfWord Source # negate :: HalfWord -> HalfWord Source # abs :: HalfWord -> HalfWord Source # signum :: HalfWord -> HalfWord Source # fromInteger :: Integer -> HalfWord Source #
Integral HalfWord Source # |

Instance details

Defined in GHC.ByteCode.Types

Methods

quot :: HalfWord -> HalfWord -> HalfWord Source #

rem :: HalfWord -> HalfWord -> HalfWord Source #

div :: HalfWord -> HalfWord -> HalfWord Source #

mod :: HalfWord -> HalfWord -> HalfWord Source #

quotRem :: HalfWord -> HalfWord -> (HalfWord, HalfWord) Source #

divMod :: HalfWord -> HalfWord -> (HalfWord, HalfWord) Source #

toInteger :: HalfWord -> Integer Source #

Real HalfWord Source # |
Instance details Defined in GHC.ByteCode.Types Methods toRational :: HalfWord -> Rational Source #
Show HalfWord Source # |
Instance details Defined in GHC.ByteCode.Types Methods showsPrec :: Int -> HalfWord -> ShowS Source # show :: HalfWord -> String Source # showList :: [HalfWord] -> ShowS Source #
Outputable HalfWord Source # |
Instance details Defined in GHC.ByteCode.Types Methods ppr :: HalfWord -> SDoc Source #
Eq HalfWord Source # |
Instance details Defined in GHC.ByteCode.Types Methods (==) :: HalfWord -> HalfWord -> Bool Source # (/=) :: HalfWord -> HalfWord -> Bool Source #
Ord HalfWord Source # |
Instance details Defined in GHC.ByteCode.Types Methods compare :: HalfWord -> HalfWord -> Ordering Source # (<) :: HalfWord -> HalfWord -> Bool Source # (<=) :: HalfWord -> HalfWord -> Bool Source # (>) :: HalfWord -> HalfWord -> Bool Source # (>=) :: HalfWord -> HalfWord -> Bool Source # max :: HalfWord -> HalfWord -> HalfWord Source # min :: HalfWord -> HalfWord -> HalfWord Source #

data UnlinkedBCO Source #

Constructors

UnlinkedBCO |

Fields

- unlinkedBCOName :: !Name
- unlinkedBCOArity :: !Int
- unlinkedBCOInstrs :: !(BCOByteArray Word16)
- unlinkedBCOBitmap :: !(BCOByteArray Word)
- unlinkedBCOLits :: !(FlatBag BCONPtr)
- unlinkedBCOPtrs :: !(FlatBag BCOPtr)

#### Instances

Instances details

NFData UnlinkedBCO Source # |
Instance details Defined in GHC.ByteCode.Types Methods rnf :: UnlinkedBCO -> () Source #
Outputable UnlinkedBCO Source # |
Instance details Defined in GHC.ByteCode.Types Methods ppr :: UnlinkedBCO -> SDoc Source #

data BCOPtr Source #

Constructors

BCOPtrName !Name |
BCOPtrPrimOp !PrimOp |
BCOPtrBCO !UnlinkedBCO |
BCOPtrBreakArray (ForeignRef BreakArray) | a pointer to a breakpoint's module's BreakArray in GHCi's memory

#### Instances

Instances details

NFData BCOPtr Source # |
Instance details Defined in GHC.ByteCode.Types Methods rnf :: BCOPtr -> () Source #

data BCONPtr Source #

Constructors

BCONPtrWord !Word |
BCONPtrLbl !FastString |
BCONPtrItbl !Name |
BCONPtrAddr !Name | A reference to a top-level string literal; see Note [Generating code for top-level string literal bindings] in GHC.StgToByteCode.
BCONPtrStr !ByteString | Only used internally in the assembler in an intermediate representation; should never appear in a fully-assembled UnlinkedBCO. Also see Note [Allocating string literals] in GHC.ByteCode.Asm.

#### Instances

Instances details

NFData BCONPtr Source # |
Instance details Defined in GHC.ByteCode.Types Methods rnf :: BCONPtr -> () Source #

type ItblEnv = NameEnv (Name, ItblPtr) Source #

newtype ItblPtr Source #

Constructors

ItblPtr (RemotePtr StgInfoTable) |

#### Instances

Instances details

NFData ItblPtr Source # |
Instance details Defined in GHC.ByteCode.Types Methods rnf :: ItblPtr -> () Source #
Show ItblPtr Source # |
Instance details Defined in GHC.ByteCode.Types Methods showsPrec :: Int -> ItblPtr -> ShowS Source # show :: ItblPtr -> String Source # showList :: [ItblPtr] -> ShowS Source #

type AddrEnv = NameEnv (Name, AddrPtr) Source #

newtype AddrPtr Source #

Constructors

AddrPtr (RemotePtr ()) |

#### Instances

Instances details

NFData AddrPtr Source # |
Instance details Defined in GHC.ByteCode.Types Methods rnf :: AddrPtr -> () Source #

data CgBreakInfo Source #

Information about a breakpoint that we know at code-generation time In order to be used, this needs to be hydrated relative to the current HscEnv by `hydrateCgBreakInfo`. Everything here can be fully forced and that's critical for preventing space leaks (see #22530)

Constructors

CgBreakInfo |

Fields

- cgb_tyvars :: ![IfaceTvBndr]

  Type variables in scope at the breakpoint

- cgb_vars :: ![Maybe (IfaceIdBndr, Word)]
- cgb_resty :: !IfaceType

#### Instances

Instances details

Outputable CgBreakInfo Source # |
Instance details Defined in GHC.ByteCode.Types Methods ppr :: CgBreakInfo -> SDoc Source #

data ModBreaks Source #

All the information about the breakpoints for a module

Constructors

ModBreaks |

Fields

- modBreaks_flags :: ForeignRef BreakArray

  The array of flags, one per breakpoint, indicating which breakpoints are enabled.

- modBreaks_locs :: !(Array BreakIndex SrcSpan)

  An array giving the source span of each breakpoint.

- modBreaks_vars :: !(Array BreakIndex [OccName])

  An array giving the names of the free variables at each breakpoint.

- modBreaks_decls :: !(Array BreakIndex [String])

  An array giving the names of the declarations enclosing each breakpoint. See Note [Field modBreaks_decls]

- modBreaks_ccs :: !(Array BreakIndex (RemotePtr CostCentre))

  Array pointing to cost centre for each breakpoint

- modBreaks_breakInfo :: IntMap CgBreakInfo

  info about each breakpoint from the bytecode generator

- modBreaks_module :: RemotePtr ModuleName

type BreakIndex = Int Source #

Breakpoint index

emptyModBreaks :: ModBreaks Source #

Construct an empty ModBreaks

data CCostCentre Source #

C CostCentre type

data FlatBag a Source #

Store elements in a flattened representation.

A `FlatBag` is a data structure that stores an ordered list of elements in a flat structure, avoiding the overhead of a linked list. Use this data structure, if the code requires the following properties:

- Elements are stored in a long-lived object, and benefit from a flattened representation.
- The `FlatBag` will be traversed but not extended or filtered.
- The number of elements should be known.
- Sharing of the empty case improves memory behaviour.

A `FlagBag` aims to have as little overhead as possible to store its elements. To achieve that, it distinguishes between the empty case, singleton, tuple and general case. Thus, we only pay for the additional three words of an `Array` if we have at least three elements.

#### Instances

Instances details

Functor FlatBag Source # |
Instance details Defined in GHC.Data.FlatBag Methods fmap :: (a -> b) -> FlatBag a -> FlatBag b Source # (<$) :: a -> FlatBag b -> FlatBag a Source #
Foldable FlatBag Source # |

Instance details

Defined in GHC.Data.FlatBag

Methods

fold :: Monoid m => FlatBag m -> m Source #

foldMap :: Monoid m => (a -> m) -> FlatBag a -> m Source #

foldMap' :: Monoid m => (a -> m) -> FlatBag a -> m Source #

foldr :: (a -> b -> b) -> b -> FlatBag a -> b Source #

foldr' :: (a -> b -> b) -> b -> FlatBag a -> b Source #

foldl :: (b -> a -> b) -> b -> FlatBag a -> b Source #

foldl' :: (b -> a -> b) -> b -> FlatBag a -> b Source #

foldr1 :: (a -> a -> a) -> FlatBag a -> a Source #

foldl1 :: (a -> a -> a) -> FlatBag a -> a Source #

toList :: FlatBag a -> [a] Source #

null :: FlatBag a -> Bool Source #

length :: FlatBag a -> Int Source #

elem :: Eq a => a -> FlatBag a -> Bool Source #

maximum :: Ord a => FlatBag a -> a Source #

minimum :: Ord a => FlatBag a -> a Source #

sum :: Num a => FlatBag a -> a Source #

product :: Num a => FlatBag a -> a Source #

Traversable FlatBag Source # |
Instance details Defined in GHC.Data.FlatBag Methods traverse :: Applicative f => (a -> f b) -> FlatBag a -> f (FlatBag b) Source # sequenceA :: Applicative f => FlatBag (f a) -> f (FlatBag a) Source # mapM :: Monad m => (a -> m b) -> FlatBag a -> m (FlatBag b) Source # sequence :: Monad m => FlatBag (m a) -> m (FlatBag a) Source #
NFData a => NFData (FlatBag a) Source # |
Instance details Defined in GHC.Data.FlatBag Methods rnf :: FlatBag a -> () Source #

sizeFlatBag :: FlatBag a -> Word Source #

Calculate the size of

fromSizedSeq :: SizedSeq a -> FlatBag a Source #

Convert a `SizedSeq` into its flattened representation. A 'FlatBag a' is more memory efficient than '[a]', if no further modification is necessary.

elemsFlatBag :: FlatBag a -> [a] Source #

Get all elements that are stored in the `FlatBag`.