ghc-9.6.5: 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 data constructors
Safe HaskellSafe-Inferred
LanguageHaskell2010

GHC.StgToJS.DataCon

Description

 
Synopsis

Documentation

genCon :: ExprCtx -> DataCon -> [JExpr] -> G JStat Source #

Generate a data constructor. Special handling for unboxed tuples

allocCon :: Ident -> DataCon -> CostCentreStack -> [JExpr] -> G JStat Source #

Allocate a data constructor. Allocate in this context means bind the data constructor to to

allocUnboxedCon :: DataCon -> [JExpr] -> JExpr Source #

Allocate an unboxed data constructor. If we have a bool we calculate the right value. If not then we expect a singleton list and unbox by converting ''C x' to x. NB. This function may panic.

allocDynamicE Source #

Arguments

:: Bool

csInlineAlloc from StgToJSConfig

-> JExpr 
-> [JExpr] 
-> Maybe JExpr 
-> JExpr 

Allocate an entry function. See hs for the object layout.

allocDynamic :: StgToJSConfig -> Bool -> Ident -> JExpr -> [JExpr] -> Maybe JExpr -> JStat Source #

Allocate a dynamic object