ghc-9.6.3: The GHC API

Copyright | (c) The University of Glasgow 2001
License | BSD-style (see the file LICENSE)
Maintainer | Jeffrey Young <jeffrey.young@iohk.io> Luite Stegeman <luite.stegeman@iohk.io> Sylvain Henry <sylvain.henry@iohk.io> Josh Meredith <josh.meredith@iohk.io>
Stability | experimental
Safe Haskell | Safe-Inferred
Language | Haskell2010

GHC.StgToJS.Linker.Utils

Description

Various utilies used in the JS Linker

Synopsis

- getOptionsFromJsFile :: FilePath -> IO [JSOption]
- data JSOption = CPP
- jsExeFileName :: DynFlags -> FilePath
- getInstalledPackageLibDirs :: UnitState -> UnitId -> [ShortText]
- getInstalledPackageHsLibs :: UnitState -> UnitId -> [ShortText]
- commonCppDefs :: Bool -> ByteString

# Documentation

getOptionsFromJsFile Source #

Arguments

:: FilePath | Input file
-> IO [JSOption] | Parsed options, if any.

Parse option pragma in JS file

data JSOption Source #

Constructors

CPP |

#### Instances

Instances details

Eq JSOption Source # |
Instance details Defined in GHC.StgToJS.Linker.Utils Methods (==) :: JSOption -> JSOption -> Bool # (/=) :: JSOption -> JSOption -> Bool #
Ord JSOption Source # |
Instance details Defined in GHC.StgToJS.Linker.Utils Methods compare :: JSOption -> JSOption -> Ordering # (<) :: JSOption -> JSOption -> Bool # (<=) :: JSOption -> JSOption -> Bool # (>) :: JSOption -> JSOption -> Bool # (>=) :: JSOption -> JSOption -> Bool # max :: JSOption -> JSOption -> JSOption # min :: JSOption -> JSOption -> JSOption #

jsExeFileName :: DynFlags -> FilePath Source #

Construct the Filename for the "binary" of Haskell code compiled to JavaScript.

getInstalledPackageLibDirs :: UnitState -> UnitId -> [ShortText] Source #

Retrieve library directories provided by the `UnitId` in `UnitState`

getInstalledPackageHsLibs :: UnitState -> UnitId -> [ShortText] Source #

Retrieve the names of the libraries provided by `UnitId`

commonCppDefs :: Bool -> ByteString Source #

CPP definitions that are inserted into every .pp file