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.Types

Description

Synopsis

- data GhcjsEnv = GhcjsEnv {
  - linkerArchiveDeps :: MVar (Map (Set FilePath) (Map Module (Deps, DepsLocation), [LinkableUnit]))
  }
- newGhcjsEnv :: IO GhcjsEnv
- data JSLinkConfig = JSLinkConfig {
  - lcNoJSExecutables :: Bool
  - lcNoHsMain :: Bool
  - lcOnlyOut :: Bool
  - lcNoRts :: Bool
  - lcNoStats :: Bool
  }
- defaultJSLinkConfig :: JSLinkConfig
- generateAllJs :: JSLinkConfig -> Bool
- data LinkedObj
  - = ObjFile FilePath
  - | ObjLoaded String Object
- type LinkableUnit = (Module, Int)

# Documentation

data GhcjsEnv Source #

Constructors

GhcjsEnv |

Fields

- linkerArchiveDeps :: MVar (Map (Set FilePath) (Map Module (Deps, DepsLocation), [LinkableUnit]))

newGhcjsEnv :: IO GhcjsEnv Source #

return a fresh `GhcjsEnv`

data JSLinkConfig Source #

Constructors

JSLinkConfig |

Fields

- lcNoJSExecutables :: Bool
- lcNoHsMain :: Bool
- lcOnlyOut :: Bool
- lcNoRts :: Bool
- lcNoStats :: Bool

defaultJSLinkConfig :: JSLinkConfig Source #

generateAllJs :: JSLinkConfig -> Bool Source #

we generate a runnable all.js only if we link a complete application, no incremental linking and no skipped parts

data LinkedObj Source #

An object file that's either already in memory (with name) or on disk

Constructors

ObjFile FilePath | load from this file
ObjLoaded String Object | already loaded: description and payload

#### Instances

Instances details

Outputable LinkedObj Source # |
Instance details Defined in GHC.StgToJS.Linker.Types Methods ppr :: LinkedObj -> SDoc Source #

type LinkableUnit = (Module, Int) Source #

A `LinkableUnit` is a pair of a module and the index of the block in the object file