Cabal-1.24.0.0: A framework for packaging Haskell software

Maintainerduncan@community.haskell.org
Safe HaskellNone

Distribution.Simple.BuildTarget

Contents

Description

Handling for user-specified build targets

Synopsis

Build targets

data BuildTarget

A fully resolved build target.

Constructors

BuildTargetComponent ComponentName

A specific component

BuildTargetModule ComponentName ModuleName

A specific module within a specific component.

BuildTargetFile ComponentName FilePath

A specific file within a specific component.

Instances

readBuildTargets :: PackageDescription -> [String] -> IO [BuildTarget]

Read a list of user-supplied build target strings and resolve them to BuildTargets according to a PackageDescription. If there are problems with any of the targets e.g. they don't exist or are misformatted, throw an IOException.

data QualLevel

Constructors

QL1 
QL2 
QL3 

Instances

Enum QualLevel 
Show QualLevel 

Parsing user build targets

data UserBuildTarget

Various ways that a user may specify a build target.

Resolving build targets

resolveBuildTargets :: PackageDescription -> [(UserBuildTarget, Bool)] -> ([BuildTargetProblem], [BuildTarget])

Given a bunch of user-specified targets, try to resolve what it is they refer to.

data BuildTargetProblem

Constructors

BuildTargetExpected UserBuildTarget [String] String
expected thing
(actually got)
BuildTargetNoSuch UserBuildTarget [(String, String)]
(no such thing, actually got)
BuildTargetAmbiguous UserBuildTarget [(UserBuildTarget, BuildTarget)] 

Instances