Cabal- A framework for packaging Haskell software

Safe HaskellNone





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

Given a package DB stack, return all installed packages.

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

Get the packages from specific PackageDBs, not cumulative.

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

Given a single package DB, return all installed packages.

buildExe :: Verbosity -> Flag (Maybe Int) -> PackageDescription -> LocalBuildInfo -> Executable -> ComponentLocalBuildInfo -> IO () #

Build an executable with GHC.

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

Start a REPL without loading any source files.

installLib #


:: 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 #


:: Verbosity 
-> LocalBuildInfo 
-> FilePath

install location

-> FilePath

Build location

-> PackageDescription 
-> ForeignLib 
-> IO () 

Install foreign library for GHC.

installExe #


:: 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 #

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 #

Return the FilePath to the global GHC package database.

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

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] #

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 #

Render a bunch of GHC environment file entries

writeGhcEnvironmentFile #


:: FilePath

directory in which to put it

-> Platform

the GHC target platform

-> Version

the GHC version

-> [GhcEnvironmentFileEntry]

the content

-> IO 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 #

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 #

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.