ghc-9.12.0.20241114: The GHC API
Safe HaskellNone
LanguageGHC2021

GHC.StgToJS.Symbols

Description

JS symbol generation

Synopsis

Documentation

intBS :: Int -> ByteString Source #

Hexadecimal representation of an int

Used for the sub indices.

word64BS :: Word64 -> ByteString Source #

Hexadecimal representation of a 64-bit word

Used for uniques. We could use base-62 as GHC usually does but this is likely faster.

unitModuleStringZ :: Module -> ByteString Source #

Return z-encoded unit:module

moduleGlobalSymbol :: Module -> FastString Source #

the global linkable unit of a module exports this symbol, depend on it to include that unit (used for cost centres)

mkJsSymbolBS :: Bool -> Module -> FastString -> ByteString Source #

Make JS symbol corresponding to the given Haskell symbol in the given module

mkJsSymbol :: Bool -> Module -> FastString -> FastString Source #

Make JS symbol corresponding to the given Haskell symbol in the given module

mkFreshJsSymbol :: Module -> Int -> FastString Source #

Make JS symbol for given module and unique.

mkRawSymbol :: Bool -> FastString -> FastString Source #

Make symbol "h$XYZ" or "h$$XYZ"

hddB :: ByteString Source #

"h$$" constant string

hdB :: ByteString Source #

"h$" constant string

len :: FastString Source #

only for byte arrays. This is a JS byte array method