Safe Haskell | None |
---|
This module contains queries that operate on a PackageDescription. It provides a function to extract all targets along with their dependencies.
- data Target = Target {
- name :: TargetName
- dependencies :: [(String, Maybe Version)]
- sourceDirs :: [FilePath]
- includeDirs :: [FilePath]
- ghcOptions :: [String]
- extensions :: [String]
- buildable :: Bool
- enabled :: Bool
- data TargetName
- = Library
- | Executable String
- | TestSuite String
- | BenchSuite String
- data PackageDescription
- targets :: Query PackageDescription [Target]
Documentation
A target is a single Library, an Excutable, a TestSuite or a Benchmark.
Target | |
|
data TargetName Source
The name of a target. Libraries don't have a name, they are always named after the package.
data PackageDescription Source
A package description type. This type has no constructors, and is only used for type-safety purposes.
targets :: Query PackageDescription [Target]Source
Query the available targets. This will return all targets, even disabled ones. If a package is disabled or not buildable, it's possible that not all dependencies have versions, some can be Nothing.