| Safe Haskell | None | 
|---|---|
| Language | Haskell2010 | 
GHC.StgToJS.Closure
Synopsis
- closureInfoStat :: Bool -> ClosureInfo -> JStat
 - closure :: ClosureInfo -> JStat -> JStat
 - conClosure :: Ident -> FastString -> CILayout -> Int -> JStat
 - data Closure = Closure {}
 - newClosure :: Closure -> JExpr
 - assignClosure :: JExpr -> Closure -> JStat
 - data CopyCC
- = CopyCC
 - | DontCopyCC
 
 - copyClosure :: CopyCC -> JExpr -> JExpr -> JStat
 - mkClosure :: JExpr -> [JExpr] -> JExpr -> Maybe JExpr -> Closure
 - allocData :: Int -> JExpr
 - allocClsA :: Int -> JExpr
 - dataName :: Int -> FastString
 - clsName :: Int -> FastString
 - dataFieldName :: Int -> FastString
 - varName :: Int -> Ident
 - jsClosureCount :: Int
 
Documentation
closureInfoStat :: Bool -> ClosureInfo -> JStat Source #
Arguments
| :: ClosureInfo | object being info'd see   | 
| -> JStat | rhs  | 
| -> JStat | 
conClosure :: Ident -> FastString -> CILayout -> Int -> JStat Source #
Used to pass arguments to newClosure with some safety
newClosure :: Closure -> JExpr Source #
Constructors
| CopyCC | |
| DontCopyCC | 
dataName :: Int -> FastString Source #
clsName :: Int -> FastString Source #
dataFieldName :: Int -> FastString Source #
jsClosureCount :: Int Source #
We use this in the RTS to determine the number of generated closures. These closures use the names cached here, so we bind them to the same number.