HORIZON HASKELLDocslts/ghc-9.14.xb2f3bfd2026-10-11Search names, modules, packages, or :: a typeCtrl K

GHC 9.14.1 · lts/ghc-9.14.x · b2f3bfd · 2026-10-11

Moduleghc-lib-parser-9.14.1.20251220GHC2021

GHC.ByteCode.Types

Bytecode assembler types

  • 24 types
  • 8 values
datadata CompiledByteCode
#

Constructors

  • CompiledByteCode
    • bc_bcos :: FlatBag UnlinkedBCO

      Bunch of interpretable bindings

    • bc_itbls :: [(Name, ConInfoTable)]

      Mapping from DataCons to their info tables

    • bc_strs :: [(Name, ByteString)]

      top-level strings (heap allocated)

    • bc_breaks :: Maybe InternalModBreaks

      All breakpoint information (no information if breakpoints are disabled).

      This information is used when loading a bytecode object: we will construct the arrays to be used at runtime to trigger breakpoints at load time from it (in allocateBreakArrays and allocateCCS in GHC.ByteCode.Loader).

    • 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.

Instances1Outputable
datadata BCOByteArray (a :: k)
#

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.

Instances3Show, Binary
newtypenewtype RegBitmap
#
Instances10Enum, Eq, Integral, Num, Ord, Real, …
  • Enum RegBitmapDefined in ghc-lib-parser-9.14.1.20251220 · GHC.ByteCode.Types
  • Eq RegBitmapDefined in ghc-lib-parser-9.14.1.20251220 · GHC.ByteCode.Types
  • Integral RegBitmapDefined in ghc-lib-parser-9.14.1.20251220 · GHC.ByteCode.Types
  • Num RegBitmapDefined in ghc-lib-parser-9.14.1.20251220 · GHC.ByteCode.Types
  • Ord RegBitmapDefined in ghc-lib-parser-9.14.1.20251220 · GHC.ByteCode.Types
  • Real RegBitmapDefined in ghc-lib-parser-9.14.1.20251220 · GHC.ByteCode.Types
  • Show RegBitmapDefined in ghc-lib-parser-9.14.1.20251220 · GHC.ByteCode.Types
  • Bits RegBitmapDefined in ghc-lib-parser-9.14.1.20251220 · GHC.ByteCode.Types
  • FiniteBits RegBitmapDefined in ghc-lib-parser-9.14.1.20251220 · GHC.ByteCode.Types
  • Outputable RegBitmapDefined in ghc-lib-parser-9.14.1.20251220 · GHC.ByteCode.Types
newtypenewtype ByteOff
#

Constructors

Instances8Enum, Eq, Integral, Num, Ord, Real, …
  • Enum ByteOffDefined in ghc-lib-parser-9.14.1.20251220 · GHC.ByteCode.Types
  • Eq ByteOffDefined in ghc-lib-parser-9.14.1.20251220 · GHC.ByteCode.Types
  • Integral ByteOffDefined in ghc-lib-parser-9.14.1.20251220 · GHC.ByteCode.Types
  • Num ByteOffDefined in ghc-lib-parser-9.14.1.20251220 · GHC.ByteCode.Types
  • Ord ByteOffDefined in ghc-lib-parser-9.14.1.20251220 · GHC.ByteCode.Types
  • Real ByteOffDefined in ghc-lib-parser-9.14.1.20251220 · GHC.ByteCode.Types
  • Show ByteOffDefined in ghc-lib-parser-9.14.1.20251220 · GHC.ByteCode.Types
  • Outputable ByteOffDefined in ghc-lib-parser-9.14.1.20251220 · GHC.ByteCode.Types
newtypenewtype WordOff
#

Constructors

Instances8Enum, Eq, Integral, Num, Ord, Real, …
  • Enum WordOffDefined in ghc-lib-parser-9.14.1.20251220 · GHC.ByteCode.Types
  • Eq WordOffDefined in ghc-lib-parser-9.14.1.20251220 · GHC.ByteCode.Types
  • Integral WordOffDefined in ghc-lib-parser-9.14.1.20251220 · GHC.ByteCode.Types
  • Num WordOffDefined in ghc-lib-parser-9.14.1.20251220 · GHC.ByteCode.Types
  • Ord WordOffDefined in ghc-lib-parser-9.14.1.20251220 · GHC.ByteCode.Types
  • Real WordOffDefined in ghc-lib-parser-9.14.1.20251220 · GHC.ByteCode.Types
  • Show WordOffDefined in ghc-lib-parser-9.14.1.20251220 · GHC.ByteCode.Types
  • Outputable WordOffDefined in ghc-lib-parser-9.14.1.20251220 · GHC.ByteCode.Types
newtypenewtype HalfWord
#

Constructors

Instances8Enum, Eq, Integral, Num, Ord, Real, …
  • Enum HalfWordDefined in ghc-lib-parser-9.14.1.20251220 · GHC.ByteCode.Types
  • Eq HalfWordDefined in ghc-lib-parser-9.14.1.20251220 · GHC.ByteCode.Types
  • Integral HalfWordDefined in ghc-lib-parser-9.14.1.20251220 · GHC.ByteCode.Types
  • Num HalfWordDefined in ghc-lib-parser-9.14.1.20251220 · GHC.ByteCode.Types
  • Ord HalfWordDefined in ghc-lib-parser-9.14.1.20251220 · GHC.ByteCode.Types
  • Real HalfWordDefined in ghc-lib-parser-9.14.1.20251220 · GHC.ByteCode.Types
  • Show HalfWordDefined in ghc-lib-parser-9.14.1.20251220 · GHC.ByteCode.Types
  • Outputable HalfWordDefined in ghc-lib-parser-9.14.1.20251220 · GHC.ByteCode.Types
datadata BCONPtr
#

Constructors

Instances1NFData
  • NFData BCONPtrDefined in ghc-lib-parser-9.14.1.20251220 · GHC.ByteCode.Types
datadata FlatBag a
#

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.

Instances4Functor, Foldable, Traversable, NFData
valuefromSmallArray :: SmallArray a -> FlatBag a
#

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

Mod Breaks

3 declarations
datadata ModBreaks
#

All the information about the source-relevant breakpoints for a module

This information is constructed once during desugaring (with mkModBreaks) from breakpoint ticks and fixed/unchanged from there on forward. It could be exported as an abstract datatype because it should never be updated after construction, only queried.

The arrays can be indexed using the int in the corresponding BreakpointId (i.e. the BreakpointId whose Module matches the Module corresponding to these ModBreaks) with the accessors modBreaks_locs, modBreaks_vars, and modBreaks_decls.

Constructors

datadata BreakpointId
#

Breakpoint identifier.

Indexes into the structures in the ModBreaks created during desugaring (after inserting the breakpoint ticks in the expressions). See Note [Breakpoint identifiers]

Constructors

Instances5Eq, Data, Ord, NFData, Outputable
typetype BreakTickIndex = Int
#

Breakpoint tick index newtype BreakTickIndex = BreakTickIndex Int deriving (Eq, Ord, Data, Ix, NFData, Outputable)

Internal Mod Breaks

3 declarations
datadata InternalModBreaks
#

Internal mod breaks store the runtime-relevant information of breakpoints.

Importantly, it maps InternalBreakpointIds to CgBreakInfo.

InternalModBreaks are constructed during bytecode generation and stored in CompiledByteCode afterwards.

Constructors

datadata CgBreakInfo
#

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
    • cgb_tyvars :: ![IfaceTvBndr]

      Type variables in scope at the breakpoint

    • cgb_vars :: ![Maybe (IfaceIdBndr, Word)]
    • cgb_resty :: !IfaceType
    • cgb_tick_id :: !Either InternalBreakLoc BreakpointId

      This field records the original breakpoint tick identifier for this internal breakpoint info. It is used to convert a breakpoint *occurrence* index (InternalBreakpointId) into a *definition* index (BreakpointId).

      The modules of breakpoint occurrence and breakpoint definition are not necessarily the same: See Note [Breakpoint identifiers].

      If there is no original tick identifier (that is, the breakpoint was created during code generation), we re-use the BreakpointId of something else. It would also be reasonable to have an Either something BreakpointId for cgb_tick_id, but currently we can always re-use a source-level BreakpointId. In the case of step-out, see Note [Debugger: Stepout internal break locs]

Instances1Outputable

Internal breakpoint identifier

datadata InternalBreakpointId
#

Internal breakpoint identifier

Indexes into the structures in the InternalModBreaks produced during ByteCode generation. See Note [Breakpoint identifiers]

Constructors

Instances4Eq, Ord, NFData, Outputable