ghc-9.14.0.20251128: The GHC API
Safe HaskellNone
LanguageGHC2021

GHC.StgToJS.Monad

Contents

Description

JS codegen state monad

Synopsis

Documentation

emitGlobal :: JStgStat -> G () #

emit a global (for the current module) toplevel statement

addDependency :: OtherSymb -> G () #

add a dependency on a particular symbol to the current group

emitToplevel :: JStgStat -> G () #

emit a top-level statement for the current binding group

emitStatic :: FastString -> StaticVal -> Maybe Ident -> G () #

emit static data for the binding group

emitClosureInfo :: ClosureInfo -> G () #

add closure info in our binding group. all heap objects must have closure info

globalOccs :: JStgStat -> G (UniqFM Id GlobalOcc) #

Return occurrences of every global id used in the given JStgStat. Sort by increasing occurrence count.

data GlobalOcc #

Constructors

GlobalOcc 

Fields

Instances

Instances details
Outputable GlobalOcc # 
Instance details

Defined in GHC.StgToJS.Monad

Methods

ppr :: GlobalOcc -> SDoc #

Group

resetGroup :: G () #

start with a new binding group