Maintainer | duncan@community.haskell.org |
---|---|
Safe Haskell | None |
Handling for user-specified build targets
- data BuildTarget
- readBuildTargets :: PackageDescription -> [String] -> IO [BuildTarget]
- data UserBuildTarget
- readUserBuildTargets :: [String] -> ([UserBuildTargetProblem], [UserBuildTarget])
- data UserBuildTargetProblem = UserBuildTargetUnrecognised String
- reportUserBuildTargetProblems :: [UserBuildTargetProblem] -> IO ()
- resolveBuildTargets :: PackageDescription -> [(UserBuildTarget, Bool)] -> ([BuildTargetProblem], [BuildTarget])
- data BuildTargetProblem
- reportBuildTargetProblems :: [BuildTargetProblem] -> IO ()
Build targets
data BuildTarget
A fully resolved build target.
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. |
readBuildTargets :: PackageDescription -> [String] -> IO [BuildTarget]
Parsing user build targets
data UserBuildTarget
Various ways that a user may specify a build target.
readUserBuildTargets :: [String] -> ([UserBuildTargetProblem], [UserBuildTarget])
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
BuildTargetExpected UserBuildTarget [String] String |
|
BuildTargetNoSuch UserBuildTarget [(String, String)] |
|
BuildTargetAmbigious UserBuildTarget [(UserBuildTarget, BuildTarget)] |
reportBuildTargetProblems :: [BuildTargetProblem] -> IO ()