Distribution.PackageDescription.FieldGrammar

Cabal-3.2.0.0: A framework for packaging Haskell software

Safe Haskell | None
Language | Haskell2010

Distribution.PackageDescription.FieldGrammar

Contents

- Package description
- Library
- Foreign library
- Executable
- Test suite
  - Lenses
- Benchmark
  - Lenses
- Flag
- Source repository
- Setup build info
- Component build info

Description

`GenericPackageDescription` Field descriptions

Synopsis

- packageDescriptionFieldGrammar :: (FieldGrammar g, Applicative (g PackageDescription), Applicative (g PackageIdentifier)) => g PackageDescription PackageDescription
- libraryFieldGrammar :: (FieldGrammar g, Applicative (g Library), Applicative (g BuildInfo)) => LibraryName -> g Library Library
- foreignLibFieldGrammar :: (FieldGrammar g, Applicative (g ForeignLib), Applicative (g BuildInfo)) => UnqualComponentName -> g ForeignLib ForeignLib
- executableFieldGrammar :: (FieldGrammar g, Applicative (g Executable), Applicative (g BuildInfo)) => UnqualComponentName -> g Executable Executable
- data TestSuiteStanza = TestSuiteStanza {
  - _testStanzaTestType :: Maybe TestType
  - _testStanzaMainIs :: Maybe FilePath
  - _testStanzaTestModule :: Maybe ModuleName
  - _testStanzaBuildInfo :: BuildInfo
  }
- testSuiteFieldGrammar :: (FieldGrammar g, Applicative (g TestSuiteStanza), Applicative (g BuildInfo)) => g TestSuiteStanza TestSuiteStanza
- validateTestSuite :: Position -> TestSuiteStanza -> ParseResult TestSuite
- unvalidateTestSuite :: TestSuite -> TestSuiteStanza
- testStanzaTestType :: Lens' TestSuiteStanza (Maybe TestType)
- testStanzaMainIs :: Lens' TestSuiteStanza (Maybe FilePath)
- testStanzaTestModule :: Lens' TestSuiteStanza (Maybe ModuleName)
- testStanzaBuildInfo :: Lens' TestSuiteStanza BuildInfo
- data BenchmarkStanza = BenchmarkStanza {
  - _benchmarkStanzaBenchmarkType :: Maybe BenchmarkType
  - _benchmarkStanzaMainIs :: Maybe FilePath
  - _benchmarkStanzaBenchmarkModule :: Maybe ModuleName
  - _benchmarkStanzaBuildInfo :: BuildInfo
  }
- benchmarkFieldGrammar :: (FieldGrammar g, Applicative (g BenchmarkStanza), Applicative (g BuildInfo)) => g BenchmarkStanza BenchmarkStanza
- validateBenchmark :: Position -> BenchmarkStanza -> ParseResult Benchmark
- unvalidateBenchmark :: Benchmark -> BenchmarkStanza
- benchmarkStanzaBenchmarkType :: Lens' BenchmarkStanza (Maybe BenchmarkType)
- benchmarkStanzaMainIs :: Lens' BenchmarkStanza (Maybe FilePath)
- benchmarkStanzaBenchmarkModule :: Lens' BenchmarkStanza (Maybe ModuleName)
- benchmarkStanzaBuildInfo :: Lens' BenchmarkStanza BuildInfo
- flagFieldGrammar :: (FieldGrammar g, Applicative (g Flag)) => FlagName -> g Flag Flag
- sourceRepoFieldGrammar :: (FieldGrammar g, Applicative (g SourceRepo)) => RepoKind -> g SourceRepo SourceRepo
- setupBInfoFieldGrammar :: (FieldGrammar g, Functor (g SetupBuildInfo)) => Bool -> g SetupBuildInfo SetupBuildInfo
- buildInfoFieldGrammar :: (FieldGrammar g, Applicative (g BuildInfo)) => g BuildInfo BuildInfo

# Package description

packageDescriptionFieldGrammar :: (FieldGrammar g, Applicative (g PackageDescription), Applicative (g PackageIdentifier)) => g PackageDescription PackageDescription Source #

# Library

libraryFieldGrammar :: (FieldGrammar g, Applicative (g Library), Applicative (g BuildInfo)) => LibraryName -> g Library Library Source #

# Foreign library

foreignLibFieldGrammar :: (FieldGrammar g, Applicative (g ForeignLib), Applicative (g BuildInfo)) => UnqualComponentName -> g ForeignLib ForeignLib Source #

# Executable

executableFieldGrammar :: (FieldGrammar g, Applicative (g Executable), Applicative (g BuildInfo)) => UnqualComponentName -> g Executable Executable Source #

# Test suite

data TestSuiteStanza Source #

An intermediate type just used for parsing the test-suite stanza. After validation it is converted into the proper `TestSuite` type.

Constructors

TestSuiteStanza |
Fields _testStanzaTestType :: Maybe TestType _testStanzaMainIs :: Maybe FilePath _testStanzaTestModule :: Maybe ModuleName _testStanzaBuildInfo :: BuildInfo

#### Instances

Instances details

HasBuildInfo TestSuiteStanza # |
Instance details Defined in Distribution.PackageDescription.FieldGrammar Methods buildInfo :: Lens' TestSuiteStanza BuildInfo Source # buildable :: Lens' TestSuiteStanza Bool Source # buildTools :: Lens' TestSuiteStanza [LegacyExeDependency] Source # buildToolDepends :: Lens' TestSuiteStanza [ExeDependency] Source # cppOptions :: Lens' TestSuiteStanza [String] Source # asmOptions :: Lens' TestSuiteStanza [String] Source # cmmOptions :: Lens' TestSuiteStanza [String] Source # ccOptions :: Lens' TestSuiteStanza [String] Source # cxxOptions :: Lens' TestSuiteStanza [String] Source # ldOptions :: Lens' TestSuiteStanza [String] Source # pkgconfigDepends :: Lens' TestSuiteStanza [PkgconfigDependency] Source # frameworks :: Lens' TestSuiteStanza [String] Source # extraFrameworkDirs :: Lens' TestSuiteStanza [String] Source # asmSources :: Lens' TestSuiteStanza [FilePath] Source # cmmSources :: Lens' TestSuiteStanza [FilePath] Source # cSources :: Lens' TestSuiteStanza [FilePath] Source # cxxSources :: Lens' TestSuiteStanza [FilePath] Source # jsSources :: Lens' TestSuiteStanza [FilePath] Source # hsSourceDirs :: Lens' TestSuiteStanza [FilePath] Source # otherModules :: Lens' TestSuiteStanza [ModuleName] Source # virtualModules :: Lens' TestSuiteStanza [ModuleName] Source # autogenModules :: Lens' TestSuiteStanza [ModuleName] Source # defaultLanguage :: Lens' TestSuiteStanza (Maybe Language) Source # otherLanguages :: Lens' TestSuiteStanza [Language] Source # defaultExtensions :: Lens' TestSuiteStanza [Extension] Source # otherExtensions :: Lens' TestSuiteStanza [Extension] Source # oldExtensions :: Lens' TestSuiteStanza [Extension] Source # extraLibs :: Lens' TestSuiteStanza [String] Source # extraGHCiLibs :: Lens' TestSuiteStanza [String] Source # extraBundledLibs :: Lens' TestSuiteStanza [String] Source # extraLibFlavours :: Lens' TestSuiteStanza [String] Source # extraDynLibFlavours :: Lens' TestSuiteStanza [String] Source # extraLibDirs :: Lens' TestSuiteStanza [String] Source # includeDirs :: Lens' TestSuiteStanza [FilePath] Source # includes :: Lens' TestSuiteStanza [FilePath] Source # autogenIncludes :: Lens' TestSuiteStanza [FilePath] Source # installIncludes :: Lens' TestSuiteStanza [FilePath] Source # options :: Lens' TestSuiteStanza (PerCompilerFlavor [String]) Source # profOptions :: Lens' TestSuiteStanza (PerCompilerFlavor [String]) Source # sharedOptions :: Lens' TestSuiteStanza (PerCompilerFlavor [String]) Source # staticOptions :: Lens' TestSuiteStanza (PerCompilerFlavor [String]) Source # customFieldsBI :: Lens' TestSuiteStanza [(String, String)] Source # targetBuildDepends :: Lens' TestSuiteStanza [Dependency] Source # mixins :: Lens' TestSuiteStanza [Mixin] Source #

testSuiteFieldGrammar :: (FieldGrammar g, Applicative (g TestSuiteStanza), Applicative (g BuildInfo)) => g TestSuiteStanza TestSuiteStanza Source #

validateTestSuite :: Position -> TestSuiteStanza -> ParseResult TestSuite Source #

unvalidateTestSuite :: TestSuite -> TestSuiteStanza Source #

## Lenses

testStanzaTestType :: Lens' TestSuiteStanza (Maybe TestType) Source #

testStanzaMainIs :: Lens' TestSuiteStanza (Maybe FilePath) Source #

testStanzaTestModule :: Lens' TestSuiteStanza (Maybe ModuleName) Source #

testStanzaBuildInfo :: Lens' TestSuiteStanza BuildInfo Source #

# Benchmark

data BenchmarkStanza Source #

An intermediate type just used for parsing the benchmark stanza. After validation it is converted into the proper `Benchmark` type.

Constructors

BenchmarkStanza |
Fields _benchmarkStanzaBenchmarkType :: Maybe BenchmarkType _benchmarkStanzaMainIs :: Maybe FilePath _benchmarkStanzaBenchmarkModule :: Maybe ModuleName _benchmarkStanzaBuildInfo :: BuildInfo

#### Instances

Instances details

HasBuildInfo BenchmarkStanza # |
Instance details Defined in Distribution.PackageDescription.FieldGrammar Methods buildInfo :: Lens' BenchmarkStanza BuildInfo Source # buildable :: Lens' BenchmarkStanza Bool Source # buildTools :: Lens' BenchmarkStanza [LegacyExeDependency] Source # buildToolDepends :: Lens' BenchmarkStanza [ExeDependency] Source # cppOptions :: Lens' BenchmarkStanza [String] Source # asmOptions :: Lens' BenchmarkStanza [String] Source # cmmOptions :: Lens' BenchmarkStanza [String] Source # ccOptions :: Lens' BenchmarkStanza [String] Source # cxxOptions :: Lens' BenchmarkStanza [String] Source # ldOptions :: Lens' BenchmarkStanza [String] Source # pkgconfigDepends :: Lens' BenchmarkStanza [PkgconfigDependency] Source # frameworks :: Lens' BenchmarkStanza [String] Source # extraFrameworkDirs :: Lens' BenchmarkStanza [String] Source # asmSources :: Lens' BenchmarkStanza [FilePath] Source # cmmSources :: Lens' BenchmarkStanza [FilePath] Source # cSources :: Lens' BenchmarkStanza [FilePath] Source # cxxSources :: Lens' BenchmarkStanza [FilePath] Source # jsSources :: Lens' BenchmarkStanza [FilePath] Source # hsSourceDirs :: Lens' BenchmarkStanza [FilePath] Source # otherModules :: Lens' BenchmarkStanza [ModuleName] Source # virtualModules :: Lens' BenchmarkStanza [ModuleName] Source # autogenModules :: Lens' BenchmarkStanza [ModuleName] Source # defaultLanguage :: Lens' BenchmarkStanza (Maybe Language) Source # otherLanguages :: Lens' BenchmarkStanza [Language] Source # defaultExtensions :: Lens' BenchmarkStanza [Extension] Source # otherExtensions :: Lens' BenchmarkStanza [Extension] Source # oldExtensions :: Lens' BenchmarkStanza [Extension] Source # extraLibs :: Lens' BenchmarkStanza [String] Source # extraGHCiLibs :: Lens' BenchmarkStanza [String] Source # extraBundledLibs :: Lens' BenchmarkStanza [String] Source # extraLibFlavours :: Lens' BenchmarkStanza [String] Source # extraDynLibFlavours :: Lens' BenchmarkStanza [String] Source # extraLibDirs :: Lens' BenchmarkStanza [String] Source # includeDirs :: Lens' BenchmarkStanza [FilePath] Source # includes :: Lens' BenchmarkStanza [FilePath] Source # autogenIncludes :: Lens' BenchmarkStanza [FilePath] Source # installIncludes :: Lens' BenchmarkStanza [FilePath] Source # options :: Lens' BenchmarkStanza (PerCompilerFlavor [String]) Source # profOptions :: Lens' BenchmarkStanza (PerCompilerFlavor [String]) Source # sharedOptions :: Lens' BenchmarkStanza (PerCompilerFlavor [String]) Source # staticOptions :: Lens' BenchmarkStanza (PerCompilerFlavor [String]) Source # customFieldsBI :: Lens' BenchmarkStanza [(String, String)] Source # targetBuildDepends :: Lens' BenchmarkStanza [Dependency] Source # mixins :: Lens' BenchmarkStanza [Mixin] Source #

benchmarkFieldGrammar :: (FieldGrammar g, Applicative (g BenchmarkStanza), Applicative (g BuildInfo)) => g BenchmarkStanza BenchmarkStanza Source #

validateBenchmark :: Position -> BenchmarkStanza -> ParseResult Benchmark Source #

unvalidateBenchmark :: Benchmark -> BenchmarkStanza Source #

## Lenses

benchmarkStanzaBenchmarkType :: Lens' BenchmarkStanza (Maybe BenchmarkType) Source #

benchmarkStanzaMainIs :: Lens' BenchmarkStanza (Maybe FilePath) Source #

benchmarkStanzaBenchmarkModule :: Lens' BenchmarkStanza (Maybe ModuleName) Source #

benchmarkStanzaBuildInfo :: Lens' BenchmarkStanza BuildInfo Source #

# Flag

flagFieldGrammar :: (FieldGrammar g, Applicative (g Flag)) => FlagName -> g Flag Flag Source #

# Source repository

sourceRepoFieldGrammar :: (FieldGrammar g, Applicative (g SourceRepo)) => RepoKind -> g SourceRepo SourceRepo Source #

# Setup build info

setupBInfoFieldGrammar :: (FieldGrammar g, Functor (g SetupBuildInfo)) => Bool -> g SetupBuildInfo SetupBuildInfo Source #

# Component build info

buildInfoFieldGrammar :: (FieldGrammar g, Applicative (g BuildInfo)) => g BuildInfo BuildInfo Source #