HORIZON HASKELLDocslts/ghc-10.0.xaa25b892026-10-10Search names, modules, packages, or :: a typeCtrl K

GHC 10.0.0.20260917 · lts/ghc-10.0.x · aa25b89 · 2026-10-10

Moduleghc-10.0.0.20260917GHC2024

GHC.ByteCode.Types

Bytecode assembler types

  • 24 types
  • 9 values
datadata CompiledByteCode
#

Constructors

Instances2Outputable, Binary
datadata BCOByteArray a
#

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.

Instances5Show, Binary
newtypenewtype RegBitmap
#
Instances10Enum, Eq, Integral, Num, Ord, Real, …

Maximum nativeCallStackSpillSize for which we use a small stg_ctoi_tN frame (no old_spill slot, no TSO access) instead of the generic stg_ctoi_t frame.

newtypenewtype ByteOff
#

Constructors

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

Constructors

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

Constructors

Instances8Enum, Eq, Integral, Num, Ord, Real, …
  • Enum HalfWordDefined in ghc-10.0.0.20260917 · GHC.ByteCode.Types
  • Eq HalfWordDefined in ghc-10.0.0.20260917 · GHC.ByteCode.Types
  • Integral HalfWordDefined in ghc-10.0.0.20260917 · GHC.ByteCode.Types
  • Num HalfWordDefined in ghc-10.0.0.20260917 · GHC.ByteCode.Types
  • Ord HalfWordDefined in ghc-10.0.0.20260917 · GHC.ByteCode.Types
  • Real HalfWordDefined in ghc-10.0.0.20260917 · GHC.ByteCode.Types
  • Show HalfWordDefined in ghc-10.0.0.20260917 · GHC.ByteCode.Types
  • Outputable HalfWordDefined in ghc-10.0.0.20260917 · GHC.ByteCode.Types
datadata UnlinkedBCO
#

Constructors

Instances3NFData, Outputable, Binary
datadata BCONPtr
#

Constructors

Instances3NFData, Outputable, Binary
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.

Instances5Functor, Foldable, Traversable, NFData, Binary
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

Instances2NFData, Binary
  • NFData ModBreaksDefined in ghc-10.0.0.20260917 · GHC.HsToCore.Breakpoints.Types
  • Binary ModBreaksDefined in ghc-10.0.0.20260917 · GHC.HsToCore.Breakpoints.Types
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

Instances6Eq, Data, Ord, NFData, Outputable, Binary
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

Instances1Binary
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]

Instances2Outputable, Binary

Internal breakpoint identifier

datadata InternalBreakpointId
#

Internal breakpoint identifier

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

Constructors

Instances5Eq, Ord, NFData, Outputable, Binary