ghc-9.6.3: The GHC API

Safe Haskell | Safe-Inferred
Language | Haskell2010

GHC.StgToJS.Closure

Synopsis

- closureInfoStat :: Bool -> ClosureInfo -> JStat
- closure :: ClosureInfo -> JStat -> JStat
- conClosure :: Ident -> FastString -> CILayout -> Int -> JStat
- data Closure = Closure {
  - clEntry :: JExpr
  - clField1 :: JExpr
  - clField2 :: JExpr
  - clMeta :: JExpr
  - clCC :: Maybe JExpr
  }
- newClosure :: Closure -> JExpr
- assignClosure :: JExpr -> Closure -> JStat
- data CopyCC
  - = CopyCC
  - | DontCopyCC
- copyClosure :: CopyCC -> JExpr -> JExpr -> JStat

# Documentation

closureInfoStat :: Bool -> ClosureInfo -> JStat Source #

closure Source #

Arguments

:: ClosureInfo | object being info'd see `ciVar` in `ClosureInfo`
-> JStat | rhs
-> JStat |

conClosure :: Ident -> FastString -> CILayout -> Int -> JStat Source #

data Closure Source #

Used to pass arguments to newClosure with some safety

Constructors

Closure |

Fields

- clEntry :: JExpr
- clField1 :: JExpr
- clField2 :: JExpr
- clMeta :: JExpr
- clCC :: Maybe JExpr

newClosure :: Closure -> JExpr Source #

assignClosure :: JExpr -> Closure -> JStat Source #

data CopyCC Source #

Constructors

CopyCC |
DontCopyCC |

copyClosure :: CopyCC -> JExpr -> JExpr -> JStat Source #