Cabal-3.2.1.0: A framework for packaging Haskell software
Safe HaskellNone
LanguageHaskell2010

Distribution.Simple.GHCJS

Synopsis

Documentation

getInstalledPackages :: Verbosity -> PackageDBStack -> ProgramDb -> IO InstalledPackageIndex Source #

Given a package DB stack, return all installed packages.

getInstalledPackagesMonitorFiles :: Verbosity -> Platform -> ProgramDb -> [PackageDB] -> IO [FilePath] Source #

Get the packages from specific PackageDBs, not cumulative.

getPackageDBContents :: Verbosity -> PackageDB -> ProgramDb -> IO InstalledPackageIndex Source #

Given a single package DB, return all installed packages.

startInterpreter :: Verbosity -> ProgramDb -> Compiler -> Platform -> PackageDBStack -> IO () Source #

Start a REPL without loading any source files.

installLib Source #

Arguments

:: Verbosity 
-> LocalBuildInfo 
-> FilePath

install location

-> FilePath

install location for dynamic libraries

-> FilePath

Build location

-> PackageDescription 
-> Library 
-> ComponentLocalBuildInfo 
-> IO () 

Install for ghc, .hi, .a and, if --with-ghci given, .o

installFLib Source #

Arguments

:: Verbosity 
-> LocalBuildInfo 
-> FilePath

install location

-> FilePath

Build location

-> PackageDescription 
-> ForeignLib 
-> IO () 

Install foreign library for GHC.

installExe Source #

Arguments

:: Verbosity 
-> LocalBuildInfo 
-> FilePath

Where to copy the files to

-> FilePath

Build location

-> (FilePath, FilePath)

Executable (prefix,suffix)

-> PackageDescription 
-> Executable 
-> IO () 

Install executables for GHCJS.

libAbiHash :: Verbosity -> PackageDescription -> LocalBuildInfo -> Library -> ComponentLocalBuildInfo -> IO String Source #

Extracts a String representing a hash of the ABI of a built library. It can fail if the library has not yet been built.

getGlobalPackageDB :: Verbosity -> ConfiguredProgram -> IO FilePath Source #

Return the FilePath to the global GHC package database.

runCmd :: ProgramDb -> FilePath -> (FilePath, FilePath, [String]) Source #

Get the JavaScript file name and command and arguments to run a program compiled by GHCJS the exe should be the base program name without exe extension

Constructing and deconstructing GHC environment files

simpleGhcEnvironmentFile :: PackageDBStack -> [UnitId] -> [GhcEnvironmentFileEntry] Source #

Make entries for a GHC environment file based on a PackageDBStack and a bunch of package (unit) ids.

If you need to do anything more complicated then either use this as a basis and add more entries, or just make all the entries directly.

renderGhcEnvironmentFile :: [GhcEnvironmentFileEntry] -> String Source #

Render a bunch of GHC environment file entries

writeGhcEnvironmentFile Source #

Arguments

:: FilePath

directory in which to put it

-> Platform

the GHC target platform

-> Version

the GHC version

-> [GhcEnvironmentFileEntry]

the content

-> NoCallStackIO FilePath 

Write a .ghc.environment-$arch-$os-$ver file in the given directory.

The Platform and GHC Version are needed as part of the file name.

Returns the name of the file written.

ghcPlatformAndVersionString :: Platform -> Version -> String Source #

GHC's rendering of its platform and compiler version string as used in certain file locations (such as user package db location). For example x86_64-linux-7.10.4

Version-specific implementation quirks

data GhcImplInfo Source #

Information about features and quirks of a GHC-based implementation.

Compiler flavors based on GHC behave similarly enough that some of the support code for them is shared. Every implementation has its own peculiarities, that may or may not be a direct result of the underlying GHC version. This record keeps track of these differences.

All shared code (i.e. everything not in the Distribution.Simple.FLAVOR module) should use implementation info rather than version numbers to test for supported features.

Constructors

GhcImplInfo 

Fields