HORIZON HASKELLDocslts/ghc-9.10.x248f8f02026-10-05Search names, modules, packages, or :: a typeCtrl K

GHC 9.10.3 · lts/ghc-9.10.x · 248f8f0 · 2026-10-05

Moduleghc-9.10.3GHC2021

GHC.StgToJS.Object

Serialization/deserialization of binary .o files for the JavaScript backend

  • 12 types
  • 17 values
  • Packageghc-9.10.3
  • Exports29
  • LanguageGHC2021
  • LicenceBSD-3-Clause
  • SourceObject.hs
datadata ObjectKind
#

Different kinds of object (.o) supported by the JS backend

Constructors

  • ObjJs

    JavaScript source embedded in a .o

  • ObjHs

    JS backend object for Haskell code

  • ObjCc

    Wasm module object as produced by emcc

Instances3Eq, Ord, Show

JS object

7 declarations
datadata JSOptions
#

Options obtained from pragmas in JS files

Constructors

Instances4Eq, Ord, Semigroup, Binary

HS object

19 declarations
valueputObject
  1. :: BinHandle
  2. -> ModuleName

    module

  3. -> BlockInfo

    block infos

  4. -> [ObjBlock]

    linkable units and their symbols

  5. -> IO ()
#

Given a handle to a Binary payload, add the module, mod_name, its dependencies, deps, and its linkable units to the payload.

valueisGlobalBlock :: BlockId -> Bool
#

we use the convention that the first block (0) is a module-global block that's always included when something from the module is loaded. everything in a module implicitly depends on the global block. The global block itself can't have dependencies

datadata BlockInfo
#

Information about blocks (linkable units)

Constructors

Instances2Outputable, Binary

Orphan instances

21 instances