ghc-9.6.3: The GHC API
Copyright(c) The University of Glasgow 2001
LicenseBSD-style (see the file LICENSE)
MaintainerJeffrey Young <jeffrey.young@iohk.io> Luite Stegeman <luite.stegeman@iohk.io> Sylvain Henry <sylvain.henry@iohk.io> Josh Meredith <josh.meredith@iohk.io>
Stabilityexperimental Code generation of Expressions
Safe HaskellSafe-Inferred
LanguageHaskell2010

GHC.StgToJS.Expr

Description

 
Synopsis

Documentation

genExpr :: HasDebugCallStack => ExprCtx -> CgStgExpr -> G (JStat, ExprResult) Source #

Evaluate an expression in the given expression context (continuation)

genEntryType :: HasDebugCallStack => [Id] -> G CIType Source #

Generate the entry function types for identifiers. Note that this only returns either CIThunk or CIFun. Everything else (PAP Blackhole etc.) is filtered as not a RuntimeRepKinded type.

loadLiveFun :: [Id] -> G JStat Source #

Given a set of Ids, bind each Id to the appropriate data fields in N registers. This assumes these data fields have already been populated in the registers. For the empty, singleton, and binary case use register 1, for any more use as many registers as necessary.

genBody :: HasDebugCallStack => ExprCtx -> Id -> StgReg -> [Id] -> CgStgExpr -> G JStat Source #

Generate the body of an object