ghc-9.8.3: The GHC API
Safe HaskellNone
LanguageHaskell2010

GHC.StgToJS.Monad

Contents

Description

JS codegen state monad

Synopsis

Documentation

emitGlobal :: JStat -> G () Source #

emit a global (for the current module) toplevel statement

addDependency :: OtherSymb -> G () Source #

add a dependency on a particular symbol to the current group

emitToplevel :: JStat -> G () Source #

emit a top-level statement for the current binding group

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

emit static data for the binding group

emitClosureInfo :: ClosureInfo -> G () Source #

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

globalOccs :: JStat -> G [GlobalOcc] Source #

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

data GlobalOcc Source #

Constructors

GlobalOcc 

Group

resetGroup :: G () Source #

start with a new binding group