Distribution.PackageDescription.FieldGrammar

Cabal-2.4.0.1: 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)) => Maybe UnqualComponentName -> 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 #

# Library

libraryFieldGrammar :: (FieldGrammar g, Applicative (g Library), Applicative (g BuildInfo)) => Maybe UnqualComponentName -> g Library Library #

# Foreign library

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

# Executable

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

# Test suite

data TestSuiteStanza #

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

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

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

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

unvalidateTestSuite :: TestSuite -> TestSuiteStanza #

## Lenses

testStanzaTestType :: Lens' TestSuiteStanza (Maybe TestType) #

testStanzaMainIs :: Lens' TestSuiteStanza (Maybe FilePath) #

testStanzaTestModule :: Lens' TestSuiteStanza (Maybe ModuleName) #

testStanzaBuildInfo :: Lens' TestSuiteStanza BuildInfo #

# Benchmark

data BenchmarkStanza #

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

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

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

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

unvalidateBenchmark :: Benchmark -> BenchmarkStanza #

## Lenses

benchmarkStanzaBenchmarkType :: Lens' BenchmarkStanza (Maybe BenchmarkType) #

benchmarkStanzaMainIs :: Lens' BenchmarkStanza (Maybe FilePath) #

benchmarkStanzaBenchmarkModule :: Lens' BenchmarkStanza (Maybe ModuleName) #

benchmarkStanzaBuildInfo :: Lens' BenchmarkStanza BuildInfo #

# Flag

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

# Source repository

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

# Setup build info

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

# Component build info

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