Cabal-3.10.1.0: A framework for packaging Haskell software
Copyright(c) Duncan Coutts 2012
LicenseBSD-like
Maintainerduncan@community.haskell.org
Safe HaskellSafe-Inferred
LanguageHaskell2010

Distribution.Simple.BuildTarget

Description

Handling for user-specified build targets

Synopsis

Main interface

readTargetInfos :: Verbosity -> PackageDescription -> LocalBuildInfo -> [String] -> IO [TargetInfo] Source #

Take a list of String build targets, and parse and validate them into actual TargetInfos to be builtregisteredwhatever.

readBuildTargets :: Verbosity -> PackageDescription -> [String] -> IO [BuildTarget] Source #

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.

Build targets

data BuildTarget Source #

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

Instances details
Generic BuildTarget Source # 
Instance details

Defined in Distribution.Simple.BuildTarget

Associated Types

type Rep BuildTarget :: Type -> Type Source #

Show BuildTarget Source # 
Instance details

Defined in Distribution.Simple.BuildTarget

Binary BuildTarget Source # 
Instance details

Defined in Distribution.Simple.BuildTarget

Methods

put :: BuildTarget -> Put #

get :: Get BuildTarget #

putList :: [BuildTarget] -> Put #

Eq BuildTarget Source # 
Instance details

Defined in Distribution.Simple.BuildTarget

type Rep BuildTarget Source # 
Instance details

Defined in Distribution.Simple.BuildTarget

showBuildTarget :: PackageId -> BuildTarget -> String Source #

Unambiguously render a BuildTarget, so that it can be parsed in all situations.

Parsing user build targets

Resolving build targets

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

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