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

Safe Haskell | Ignore
Language | GHC2021

GHCi.ResolvedBCO

Synopsis

- data ResolvedBCO = ResolvedBCO {
  - resolvedBCOIsLE :: Bool
  - resolvedBCOArity :: !Int
  - resolvedBCOInstrs :: BCOByteArray Word16
  - resolvedBCOBitmap :: BCOByteArray Word
  - resolvedBCOLits :: BCOByteArray Word
  - resolvedBCOPtrs :: SizedSeq ResolvedBCOPtr
  }
- data ResolvedBCOPtr
  - = ResolvedBCORef !Int
  - | ResolvedBCOPtr !(RemoteRef HValue)
  - | ResolvedBCOStaticPtr !(RemotePtr ())
  - | ResolvedBCOPtrBCO ResolvedBCO
  - | ResolvedBCOPtrBreakArray !(RemoteRef BreakArray)
- isLittleEndian :: Bool
- data BCOByteArray (a :: k) = BCOByteArray {
  - getBCOByteArray :: !ByteArray#
  }
- mkBCOByteArray :: UArray Int a -> BCOByteArray a

# Documentation

data ResolvedBCO Source #

A `ResolvedBCO` is one in which all the `Name` references have been resolved to actual addresses or `RemoteHValues`.

Constructors

ResolvedBCO |

Fields

- resolvedBCOIsLE :: Bool
- resolvedBCOArity :: !Int
- resolvedBCOInstrs :: BCOByteArray Word16
- resolvedBCOBitmap :: BCOByteArray Word
- resolvedBCOLits :: BCOByteArray Word
- resolvedBCOPtrs :: SizedSeq ResolvedBCOPtr

#### Instances

Instances details

Binary ResolvedBCO Source # | The Binary instance for ResolvedBCOs. Note, that we do encode the endianness, however there is no support for mixed endianness setups. This is primarily to ensure that ghc and iserv share the same endianness.
Instance details Defined in GHCi.ResolvedBCO Methods put :: ResolvedBCO -> Put Source # get :: Get ResolvedBCO Source # putList :: [ResolvedBCO] -> Put Source #
Generic ResolvedBCO Source # |

Instance details

Defined in GHCi.ResolvedBCO

Associated Types

type Rep ResolvedBCO |

Instance details

Defined in GHCi.ResolvedBCO

type Rep ResolvedBCO = D1 ('MetaData "ResolvedBCO" "GHCi.ResolvedBCO" "ghc-lib-parser-9.12.2.20250421-CLarrBnVGcX5rqdmHKZO6f" 'False) (C1 ('MetaCons "ResolvedBCO" 'PrefixI 'True) ((S1 ('MetaSel ('Just "resolvedBCOIsLE") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Bool) :*: (S1 ('MetaSel ('Just "resolvedBCOArity") 'SourceUnpack 'SourceStrict 'DecidedStrict) (Rec0 Int) :*: S1 ('MetaSel ('Just "resolvedBCOInstrs") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (BCOByteArray Word16)))) :*: (S1 ('MetaSel ('Just "resolvedBCOBitmap") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (BCOByteArray Word)) :*: (S1 ('MetaSel ('Just "resolvedBCOLits") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (BCOByteArray Word)) :*: S1 ('MetaSel ('Just "resolvedBCOPtrs") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (SizedSeq ResolvedBCOPtr))))))

Methods

from :: ResolvedBCO -> Rep ResolvedBCO x Source #

to :: Rep ResolvedBCO x -> ResolvedBCO Source #

Show ResolvedBCO Source # |
Instance details Defined in GHCi.ResolvedBCO Methods showsPrec :: Int -> ResolvedBCO -> ShowS Source # show :: ResolvedBCO -> String Source # showList :: [ResolvedBCO] -> ShowS Source #
type Rep ResolvedBCO Source # |

Instance details

Defined in GHCi.ResolvedBCO

type Rep ResolvedBCO = D1 ('MetaData "ResolvedBCO" "GHCi.ResolvedBCO" "ghc-lib-parser-9.12.2.20250421-CLarrBnVGcX5rqdmHKZO6f" 'False) (C1 ('MetaCons "ResolvedBCO" 'PrefixI 'True) ((S1 ('MetaSel ('Just "resolvedBCOIsLE") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Bool) :*: (S1 ('MetaSel ('Just "resolvedBCOArity") 'SourceUnpack 'SourceStrict 'DecidedStrict) (Rec0 Int) :*: S1 ('MetaSel ('Just "resolvedBCOInstrs") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (BCOByteArray Word16)))) :*: (S1 ('MetaSel ('Just "resolvedBCOBitmap") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (BCOByteArray Word)) :*: (S1 ('MetaSel ('Just "resolvedBCOLits") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (BCOByteArray Word)) :*: S1 ('MetaSel ('Just "resolvedBCOPtrs") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (SizedSeq ResolvedBCOPtr))))))

data ResolvedBCOPtr Source #

Constructors

ResolvedBCORef !Int | reference to the Nth BCO in the current set
ResolvedBCOPtr !(RemoteRef HValue) | reference to a previously created BCO
ResolvedBCOStaticPtr !(RemotePtr ()) | reference to a static ptr
ResolvedBCOPtrBCO ResolvedBCO | a nested BCO
ResolvedBCOPtrBreakArray !(RemoteRef BreakArray) | Resolves to the MutableArray# inside the BreakArray

#### Instances

Instances details

Binary ResolvedBCOPtr Source # |
Instance details Defined in GHCi.ResolvedBCO Methods put :: ResolvedBCOPtr -> Put Source # get :: Get ResolvedBCOPtr Source # putList :: [ResolvedBCOPtr] -> Put Source #
Generic ResolvedBCOPtr Source # |

Instance details

Defined in GHCi.ResolvedBCO

Associated Types

type Rep ResolvedBCOPtr |

Instance details

Defined in GHCi.ResolvedBCO

type Rep ResolvedBCOPtr = D1 ('MetaData "ResolvedBCOPtr" "GHCi.ResolvedBCO" "ghc-lib-parser-9.12.2.20250421-CLarrBnVGcX5rqdmHKZO6f" 'False) ((C1 ('MetaCons "ResolvedBCORef" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'SourceUnpack 'SourceStrict 'DecidedStrict) (Rec0 Int)) :+: C1 ('MetaCons "ResolvedBCOPtr" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'SourceUnpack 'SourceStrict 'DecidedStrict) (Rec0 (RemoteRef HValue)))) :+: (C1 ('MetaCons "ResolvedBCOStaticPtr" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'SourceUnpack 'SourceStrict 'DecidedStrict) (Rec0 (RemotePtr ()))) :+: (C1 ('MetaCons "ResolvedBCOPtrBCO" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 ResolvedBCO)) :+: C1 ('MetaCons "ResolvedBCOPtrBreakArray" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'SourceUnpack 'SourceStrict 'DecidedStrict) (Rec0 (RemoteRef BreakArray))))))

Methods

from :: ResolvedBCOPtr -> Rep ResolvedBCOPtr x Source #

to :: Rep ResolvedBCOPtr x -> ResolvedBCOPtr Source #

Show ResolvedBCOPtr Source # |
Instance details Defined in GHCi.ResolvedBCO Methods showsPrec :: Int -> ResolvedBCOPtr -> ShowS Source # show :: ResolvedBCOPtr -> String Source # showList :: [ResolvedBCOPtr] -> ShowS Source #
type Rep ResolvedBCOPtr Source # |

Instance details

Defined in GHCi.ResolvedBCO

type Rep ResolvedBCOPtr = D1 ('MetaData "ResolvedBCOPtr" "GHCi.ResolvedBCO" "ghc-lib-parser-9.12.2.20250421-CLarrBnVGcX5rqdmHKZO6f" 'False) ((C1 ('MetaCons "ResolvedBCORef" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'SourceUnpack 'SourceStrict 'DecidedStrict) (Rec0 Int)) :+: C1 ('MetaCons "ResolvedBCOPtr" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'SourceUnpack 'SourceStrict 'DecidedStrict) (Rec0 (RemoteRef HValue)))) :+: (C1 ('MetaCons "ResolvedBCOStaticPtr" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'SourceUnpack 'SourceStrict 'DecidedStrict) (Rec0 (RemotePtr ()))) :+: (C1 ('MetaCons "ResolvedBCOPtrBCO" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 ResolvedBCO)) :+: C1 ('MetaCons "ResolvedBCOPtrBreakArray" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'SourceUnpack 'SourceStrict 'DecidedStrict) (Rec0 (RemoteRef BreakArray))))))

isLittleEndian :: Bool 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 #