cabal-cargs-0.7.1: A command line program for extracting compiler arguments from a cabal file.

Safe HaskellNone

CabalCargs.Spec

Synopsis

Documentation

data Spec Source

Specifies which compiler args from which sections should be collected.

Constructors

Spec 

Fields

sections :: [Section]

the sections used for collecting the compiler args

fields :: Fields

for these fields compiler args are collected

condVars :: CondVars

used for the evaluation of the conditional fields in the cabal file

pkgDescrp :: GenericPackageDescription

the package description of the read in cabal file

cabalFile :: FilePath

the cabal file read from

distDir :: Maybe FilePath

the dist directory of the cabal build, a relative path to the directory of the cabal file

packageDB :: Maybe FilePath

the directory of package database of the cabal sandbox, a relative path to the directory of the cabal file

relativePaths :: Bool

if all returned paths are relative to the directory of the cabal file, otherwise all paths are absolute

fromCmdArgs :: Args -> IO (Either Error Spec)Source

Create a Spec by the command line arguments given to 'cabal-cargs'.

Depending on the command line arguments fromCmdArgs might behave like fromCabalFile, if only a cabal file was given, like fromSourceFile, if only a source file was given or like a mix of both, if a cabal file and a source file have been given.