Distribution.PackageDescription.FieldGrammar

Cabal-syntax-3.16.0.0: A library for working with .cabal files

Safe Haskell | None
Language | Haskell2010

Distribution.PackageDescription.FieldGrammar

Contents

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

Description

`GenericPackageDescription` Field descriptions

Synopsis

- packageDescriptionFieldGrammar :: forall (c :: Type -> Constraint) g. (FieldGrammar c g, Applicative (g PackageDescription), Applicative (g PackageIdentifier), c (Identity BuildType), c (Identity PackageName), c (Identity Version), forall from (to :: FileOrDir). c (List FSep (RelativePathNT from to) (RelativePath from to)), forall from (to :: FileOrDir). c (List VCat (RelativePathNT from to) (RelativePath from to)), c (List FSep TestedWith (CompilerFlavor, VersionRange)), c CompatLicenseFile, c CompatDataDir) => g PackageDescription PackageDescription
- newtype CompatDataDir = CompatDataDir {
  - getCompatDataDir :: SymbolicPath Pkg ('Dir DataDir)
  }
- newtype CompatLicenseFile = CompatLicenseFile {
  - getCompatLicenseFile :: [RelativePath Pkg 'File]
  }
- libraryFieldGrammar :: forall (c :: Type -> Constraint) g. (FieldGrammar c g, Applicative (g Library), Applicative (g BuildInfo), c (Identity LibraryVisibility), c (List CommaFSep (Identity ExeDependency) ExeDependency), c (List CommaFSep (Identity LegacyExeDependency) LegacyExeDependency), c (List CommaFSep (Identity PkgconfigDependency) PkgconfigDependency), c (List CommaVCat (Identity Dependency) Dependency), c (List CommaVCat (Identity Mixin) Mixin), c (List CommaVCat (Identity ModuleReexport) ModuleReexport), c (List FSep (MQuoted Extension) Extension), c (List FSep (MQuoted Language) Language), c (List FSep Token String), c (List NoCommaFSep Token' String), c (List VCat (MQuoted ModuleName) ModuleName), forall from (to :: FileOrDir). c (List FSep (SymbolicPathNT from to) (SymbolicPath from to)), forall from (to :: FileOrDir). c (List FSep (RelativePathNT from to) (RelativePath from to)), forall from (to :: FileOrDir). c (List VCat (SymbolicPathNT from to) (SymbolicPath from to)), c (List VCat Token String), c (MQuoted Language)) => LibraryName -> g Library Library
- foreignLibFieldGrammar :: forall (c :: Type -> Constraint) g. (FieldGrammar c g, Applicative (g ForeignLib), Applicative (g BuildInfo), c (Identity ForeignLibType), c (Identity LibVersionInfo), c (Identity Version), c (List CommaFSep (Identity ExeDependency) ExeDependency), c (List CommaFSep (Identity LegacyExeDependency) LegacyExeDependency), c (List CommaFSep (Identity PkgconfigDependency) PkgconfigDependency), c (List CommaVCat (Identity Dependency) Dependency), c (List CommaVCat (Identity Mixin) Mixin), c (List FSep (Identity ForeignLibOption) ForeignLibOption), c (List FSep (MQuoted Extension) Extension), c (List FSep (MQuoted Language) Language), c (List FSep Token String), forall from (to :: FileOrDir). c (List FSep (SymbolicPathNT from to) (SymbolicPath from to)), forall from (to :: FileOrDir). c (List FSep (RelativePathNT from to) (RelativePath from to)), forall from (to :: FileOrDir). c (List VCat (SymbolicPathNT from to) (SymbolicPath from to)), c (List NoCommaFSep Token' String), c (List VCat (MQuoted ModuleName) ModuleName), c (List VCat Token String), c (MQuoted Language)) => UnqualComponentName -> g ForeignLib ForeignLib
- executableFieldGrammar :: forall (c :: Type -> Constraint) g. (FieldGrammar c g, Applicative (g Executable), Applicative (g BuildInfo), c (Identity ExecutableScope), c (List CommaFSep (Identity ExeDependency) ExeDependency), c (List CommaFSep (Identity LegacyExeDependency) LegacyExeDependency), c (List CommaFSep (Identity PkgconfigDependency) PkgconfigDependency), c (List CommaVCat (Identity Dependency) Dependency), c (List CommaVCat (Identity Mixin) Mixin), c (List FSep (MQuoted Extension) Extension), c (List FSep (MQuoted Language) Language), c (List FSep Token String), forall from (to :: FileOrDir). c (List FSep (SymbolicPathNT from to) (SymbolicPath from to)), forall from (to :: FileOrDir). c (List FSep (RelativePathNT from to) (RelativePath from to)), forall from (to :: FileOrDir). c (List FSep (SymbolicPathNT from to) (SymbolicPath from to)), forall from (to :: FileOrDir). c (List FSep (RelativePathNT from to) (RelativePath from to)), forall from (to :: FileOrDir). c (List VCat (SymbolicPathNT from to) (SymbolicPath from to)), forall from (to :: FileOrDir). c (SymbolicPathNT from to), forall from (to :: FileOrDir). c (RelativePathNT from to), c (List NoCommaFSep Token' String), c (List VCat (MQuoted ModuleName) ModuleName), c (List VCat Token String), c (MQuoted Language)) => UnqualComponentName -> g Executable Executable
- data TestSuiteStanza = TestSuiteStanza {
  - _testStanzaTestType :: Maybe TestType
  - _testStanzaMainIs :: Maybe (RelativePath Source 'File)
  - _testStanzaTestModule :: Maybe ModuleName
  - _testStanzaBuildInfo :: BuildInfo
  - _testStanzaCodeGenerators :: [String]
  }
- testSuiteFieldGrammar :: forall (c :: Type -> Constraint) g. (FieldGrammar c g, Applicative (g TestSuiteStanza), Applicative (g BuildInfo), c (Identity ModuleName), c (Identity TestType), c (List CommaFSep (Identity ExeDependency) ExeDependency), c (List CommaFSep (Identity LegacyExeDependency) LegacyExeDependency), c (List CommaFSep (Identity PkgconfigDependency) PkgconfigDependency), c (List CommaFSep Token String), c (List CommaVCat (Identity Dependency) Dependency), c (List CommaVCat (Identity Mixin) Mixin), c (List FSep (MQuoted Extension) Extension), c (List FSep (MQuoted Language) Language), c (List FSep Token String), c (List NoCommaFSep Token' String), c (List VCat (MQuoted ModuleName) ModuleName), forall from (to :: FileOrDir). c (List FSep (SymbolicPathNT from to) (SymbolicPath from to)), forall from (to :: FileOrDir). c (List FSep (RelativePathNT from to) (RelativePath from to)), forall from (to :: FileOrDir). c (List VCat (SymbolicPathNT from to) (SymbolicPath from to)), forall from (to :: FileOrDir). c (RelativePathNT from to), c (List VCat Token String), c (MQuoted Language)) => g TestSuiteStanza TestSuiteStanza
- validateTestSuite :: CabalSpecVersion -> Position -> TestSuiteStanza -> ParseResult TestSuite
- unvalidateTestSuite :: TestSuite -> TestSuiteStanza
- testStanzaTestType :: Lens' TestSuiteStanza (Maybe TestType)
- testStanzaMainIs :: Lens' TestSuiteStanza (Maybe (RelativePath Source 'File))
- testStanzaTestModule :: Lens' TestSuiteStanza (Maybe ModuleName)
- testStanzaBuildInfo :: Lens' TestSuiteStanza BuildInfo
- data BenchmarkStanza = BenchmarkStanza {
  - _benchmarkStanzaBenchmarkType :: Maybe BenchmarkType
  - _benchmarkStanzaMainIs :: Maybe (RelativePath Source 'File)
  - _benchmarkStanzaBenchmarkModule :: Maybe ModuleName
  - _benchmarkStanzaBuildInfo :: BuildInfo
  }
- benchmarkFieldGrammar :: forall (c :: Type -> Constraint) g. (FieldGrammar c g, Applicative (g BenchmarkStanza), Applicative (g BuildInfo), c (Identity BenchmarkType), c (Identity ModuleName), c (List CommaFSep (Identity ExeDependency) ExeDependency), c (List CommaFSep (Identity LegacyExeDependency) LegacyExeDependency), c (List CommaFSep (Identity PkgconfigDependency) PkgconfigDependency), c (List CommaVCat (Identity Dependency) Dependency), c (List CommaVCat (Identity Mixin) Mixin), c (List FSep (MQuoted Extension) Extension), c (List FSep (MQuoted Language) Language), c (List FSep Token String), c (List NoCommaFSep Token' String), c (List VCat (MQuoted ModuleName) ModuleName), forall from (to :: FileOrDir). c (List FSep (SymbolicPathNT from to) (SymbolicPath from to)), forall from (to :: FileOrDir). c (List FSep (RelativePathNT from to) (RelativePath from to)), forall from (to :: FileOrDir). c (List VCat (SymbolicPathNT from to) (SymbolicPath from to)), forall from (to :: FileOrDir). c (RelativePathNT from to), c (List VCat Token String), c (MQuoted Language)) => g BenchmarkStanza BenchmarkStanza
- validateBenchmark :: CabalSpecVersion -> Position -> BenchmarkStanza -> ParseResult Benchmark
- unvalidateBenchmark :: Benchmark -> BenchmarkStanza
- formatDependencyList :: [Dependency] -> List CommaVCat (Identity Dependency) Dependency
- formatExposedModules :: [ModuleName] -> List VCat (MQuoted ModuleName) ModuleName
- formatExtraSourceFiles :: [RelativePath Pkg 'File] -> List VCat (RelativePathNT Pkg 'File) (RelativePath Pkg 'File)
- formatHsSourceDirs :: [SymbolicPath Pkg ('Dir Source)] -> List FSep (SymbolicPathNT Pkg ('Dir Source)) (SymbolicPath Pkg ('Dir Source))
- formatMixinList :: [Mixin] -> List CommaVCat (Identity Mixin) Mixin
- formatOtherExtensions :: [Extension] -> List FSep (MQuoted Extension) Extension
- formatOtherModules :: [ModuleName] -> List VCat (MQuoted ModuleName) ModuleName
- benchmarkStanzaBenchmarkType :: Lens' BenchmarkStanza (Maybe BenchmarkType)
- benchmarkStanzaMainIs :: Lens' BenchmarkStanza (Maybe (RelativePath Source 'File))
- benchmarkStanzaBenchmarkModule :: Lens' BenchmarkStanza (Maybe ModuleName)
- benchmarkStanzaBuildInfo :: Lens' BenchmarkStanza BuildInfo
- flagFieldGrammar :: forall (c :: Type -> Constraint) g. (FieldGrammar c g, Applicative (g PackageFlag)) => FlagName -> g PackageFlag PackageFlag
- sourceRepoFieldGrammar :: forall (c :: Type -> Constraint) g. (FieldGrammar c g, Applicative (g SourceRepo), c (Identity RepoType), c Token, c FilePathNT) => RepoKind -> g SourceRepo SourceRepo
- setupBInfoFieldGrammar :: forall (c :: Type -> Constraint) g. (FieldGrammar c g, Functor (g SetupBuildInfo), c (List CommaVCat (Identity Dependency) Dependency)) => Bool -> g SetupBuildInfo SetupBuildInfo
- buildInfoFieldGrammar :: forall (c :: Type -> Constraint) g. (FieldGrammar c g, Applicative (g BuildInfo), c (List CommaFSep (Identity ExeDependency) ExeDependency), c (List CommaFSep (Identity LegacyExeDependency) LegacyExeDependency), c (List CommaFSep (Identity PkgconfigDependency) PkgconfigDependency), c (List CommaVCat (Identity Dependency) Dependency), c (List CommaVCat (Identity Mixin) Mixin), c (List FSep (MQuoted Extension) Extension), c (List FSep (MQuoted Language) Language), c (List FSep Token String), c (List NoCommaFSep Token' String), c (List VCat (MQuoted ModuleName) ModuleName), forall from (to :: FileOrDir). c (List FSep (SymbolicPathNT from to) (SymbolicPath from to)), forall from (to :: FileOrDir). c (List FSep (RelativePathNT from to) (RelativePath from to)), forall from (to :: FileOrDir). c (List VCat (SymbolicPathNT from to) (SymbolicPath from to)), c (List VCat Token String), c (MQuoted Language)) => g BuildInfo BuildInfo

# Package description

packageDescriptionFieldGrammar :: forall (c :: Type -> Constraint) g. (FieldGrammar c g, Applicative (g PackageDescription), Applicative (g PackageIdentifier), c (Identity BuildType), c (Identity PackageName), c (Identity Version), forall from (to :: FileOrDir). c (List FSep (RelativePathNT from to) (RelativePath from to)), forall from (to :: FileOrDir). c (List VCat (RelativePathNT from to) (RelativePath from to)), c (List FSep TestedWith (CompilerFlavor, VersionRange)), c CompatLicenseFile, c CompatDataDir) => g PackageDescription PackageDescription Source #

newtype CompatDataDir Source #

Newtype for data directory (absolute or relative).

Accepts empty file path, but issues a warning; there are simply too many (~1200) package definition files

    data-dir: ""

across Hackage to outrule them completely. I suspect some of them are generated (e.g. formatted) by machine.

Constructors

CompatDataDir |
Fields getCompatDataDir :: SymbolicPath Pkg ('Dir DataDir)

#### Instances

Instances details

Parsec CompatDataDir Source # |
Instance details Defined in Distribution.PackageDescription.FieldGrammar Methods parsec :: CabalParsing m => m CompatDataDir Source #
Pretty CompatDataDir Source # |
Instance details Defined in Distribution.PackageDescription.FieldGrammar Methods pretty :: CompatDataDir -> Doc Source # prettyVersioned :: CabalSpecVersion -> CompatDataDir -> Doc Source #
Newtype (SymbolicPath Pkg ('Dir DataDir)) CompatDataDir Source # |
Instance details Defined in Distribution.PackageDescription.FieldGrammar Methods pack :: SymbolicPath Pkg ('Dir DataDir) -> CompatDataDir Source # unpack :: CompatDataDir -> SymbolicPath Pkg ('Dir DataDir) Source #

newtype CompatLicenseFile Source #

Constructors

CompatLicenseFile |
Fields getCompatLicenseFile :: [RelativePath Pkg 'File]

#### Instances

Instances details

Parsec CompatLicenseFile Source # |
Instance details Defined in Distribution.PackageDescription.FieldGrammar Methods parsec :: CabalParsing m => m CompatLicenseFile Source #
Pretty CompatLicenseFile Source # |
Instance details Defined in Distribution.PackageDescription.FieldGrammar Methods pretty :: CompatLicenseFile -> Doc Source # prettyVersioned :: CabalSpecVersion -> CompatLicenseFile -> Doc Source #
Newtype [RelativePath Pkg 'File] CompatLicenseFile Source # |
Instance details Defined in Distribution.PackageDescription.FieldGrammar Methods pack :: [RelativePath Pkg 'File] -> CompatLicenseFile Source # unpack :: CompatLicenseFile -> [RelativePath Pkg 'File] Source #

# Library

libraryFieldGrammar :: forall (c :: Type -> Constraint) g. (FieldGrammar c g, Applicative (g Library), Applicative (g BuildInfo), c (Identity LibraryVisibility), c (List CommaFSep (Identity ExeDependency) ExeDependency), c (List CommaFSep (Identity LegacyExeDependency) LegacyExeDependency), c (List CommaFSep (Identity PkgconfigDependency) PkgconfigDependency), c (List CommaVCat (Identity Dependency) Dependency), c (List CommaVCat (Identity Mixin) Mixin), c (List CommaVCat (Identity ModuleReexport) ModuleReexport), c (List FSep (MQuoted Extension) Extension), c (List FSep (MQuoted Language) Language), c (List FSep Token String), c (List NoCommaFSep Token' String), c (List VCat (MQuoted ModuleName) ModuleName), forall from (to :: FileOrDir). c (List FSep (SymbolicPathNT from to) (SymbolicPath from to)), forall from (to :: FileOrDir). c (List FSep (RelativePathNT from to) (RelativePath from to)), forall from (to :: FileOrDir). c (List VCat (SymbolicPathNT from to) (SymbolicPath from to)), c (List VCat Token String), c (MQuoted Language)) => LibraryName -> g Library Library Source #

# Foreign library

foreignLibFieldGrammar :: forall (c :: Type -> Constraint) g. (FieldGrammar c g, Applicative (g ForeignLib), Applicative (g BuildInfo), c (Identity ForeignLibType), c (Identity LibVersionInfo), c (Identity Version), c (List CommaFSep (Identity ExeDependency) ExeDependency), c (List CommaFSep (Identity LegacyExeDependency) LegacyExeDependency), c (List CommaFSep (Identity PkgconfigDependency) PkgconfigDependency), c (List CommaVCat (Identity Dependency) Dependency), c (List CommaVCat (Identity Mixin) Mixin), c (List FSep (Identity ForeignLibOption) ForeignLibOption), c (List FSep (MQuoted Extension) Extension), c (List FSep (MQuoted Language) Language), c (List FSep Token String), forall from (to :: FileOrDir). c (List FSep (SymbolicPathNT from to) (SymbolicPath from to)), forall from (to :: FileOrDir). c (List FSep (RelativePathNT from to) (RelativePath from to)), forall from (to :: FileOrDir). c (List VCat (SymbolicPathNT from to) (SymbolicPath from to)), c (List NoCommaFSep Token' String), c (List VCat (MQuoted ModuleName) ModuleName), c (List VCat Token String), c (MQuoted Language)) => UnqualComponentName -> g ForeignLib ForeignLib Source #

# Executable

executableFieldGrammar :: forall (c :: Type -> Constraint) g. (FieldGrammar c g, Applicative (g Executable), Applicative (g BuildInfo), c (Identity ExecutableScope), c (List CommaFSep (Identity ExeDependency) ExeDependency), c (List CommaFSep (Identity LegacyExeDependency) LegacyExeDependency), c (List CommaFSep (Identity PkgconfigDependency) PkgconfigDependency), c (List CommaVCat (Identity Dependency) Dependency), c (List CommaVCat (Identity Mixin) Mixin), c (List FSep (MQuoted Extension) Extension), c (List FSep (MQuoted Language) Language), c (List FSep Token String), forall from (to :: FileOrDir). c (List FSep (SymbolicPathNT from to) (SymbolicPath from to)), forall from (to :: FileOrDir). c (List FSep (RelativePathNT from to) (RelativePath from to)), forall from (to :: FileOrDir). c (List FSep (SymbolicPathNT from to) (SymbolicPath from to)), forall from (to :: FileOrDir). c (List FSep (RelativePathNT from to) (RelativePath from to)), forall from (to :: FileOrDir). c (List VCat (SymbolicPathNT from to) (SymbolicPath from to)), forall from (to :: FileOrDir). c (SymbolicPathNT from to), forall from (to :: FileOrDir). c (RelativePathNT from to), c (List NoCommaFSep Token' String), c (List VCat (MQuoted ModuleName) ModuleName), c (List VCat Token String), c (MQuoted Language)) => 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 (RelativePath Source 'File) _testStanzaTestModule :: Maybe ModuleName _testStanzaBuildInfo :: BuildInfo _testStanzaCodeGenerators :: [String]

#### Instances

Instances details

HasBuildInfo TestSuiteStanza Source # |
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 # jsppOptions :: Lens' TestSuiteStanza [String] Source # ldOptions :: Lens' TestSuiteStanza [String] Source # hsc2hsOptions :: Lens' TestSuiteStanza [String] Source # pkgconfigDepends :: Lens' TestSuiteStanza [PkgconfigDependency] Source # frameworks :: Lens' TestSuiteStanza [RelativePath Framework 'File] Source # extraFrameworkDirs :: Lens' TestSuiteStanza [SymbolicPath Pkg ('Dir Framework)] Source # asmSources :: Lens' TestSuiteStanza [SymbolicPath Pkg 'File] Source # cmmSources :: Lens' TestSuiteStanza [SymbolicPath Pkg 'File] Source # cSources :: Lens' TestSuiteStanza [SymbolicPath Pkg 'File] Source # cxxSources :: Lens' TestSuiteStanza [SymbolicPath Pkg 'File] Source # jsSources :: Lens' TestSuiteStanza [SymbolicPath Pkg 'File] Source # hsSourceDirs :: Lens' TestSuiteStanza [SymbolicPath Pkg ('Dir Source)] 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 # extraLibsStatic :: 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 [SymbolicPath Pkg ('Dir Lib)] Source # extraLibDirsStatic :: Lens' TestSuiteStanza [SymbolicPath Pkg ('Dir Lib)] Source # includeDirs :: Lens' TestSuiteStanza [SymbolicPath Pkg ('Dir Include)] Source # includes :: Lens' TestSuiteStanza [SymbolicPath Include 'File] Source # autogenIncludes :: Lens' TestSuiteStanza [RelativePath Include 'File] Source # installIncludes :: Lens' TestSuiteStanza [RelativePath Include 'File] Source # options :: Lens' TestSuiteStanza (PerCompilerFlavor [String]) Source # profOptions :: Lens' TestSuiteStanza (PerCompilerFlavor [String]) Source # sharedOptions :: Lens' TestSuiteStanza (PerCompilerFlavor [String]) Source # profSharedOptions :: 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 :: forall (c :: Type -> Constraint) g. (FieldGrammar c g, Applicative (g TestSuiteStanza), Applicative (g BuildInfo), c (Identity ModuleName), c (Identity TestType), c (List CommaFSep (Identity ExeDependency) ExeDependency), c (List CommaFSep (Identity LegacyExeDependency) LegacyExeDependency), c (List CommaFSep (Identity PkgconfigDependency) PkgconfigDependency), c (List CommaFSep Token String), c (List CommaVCat (Identity Dependency) Dependency), c (List CommaVCat (Identity Mixin) Mixin), c (List FSep (MQuoted Extension) Extension), c (List FSep (MQuoted Language) Language), c (List FSep Token String), c (List NoCommaFSep Token' String), c (List VCat (MQuoted ModuleName) ModuleName), forall from (to :: FileOrDir). c (List FSep (SymbolicPathNT from to) (SymbolicPath from to)), forall from (to :: FileOrDir). c (List FSep (RelativePathNT from to) (RelativePath from to)), forall from (to :: FileOrDir). c (List VCat (SymbolicPathNT from to) (SymbolicPath from to)), forall from (to :: FileOrDir). c (RelativePathNT from to), c (List VCat Token String), c (MQuoted Language)) => g TestSuiteStanza TestSuiteStanza Source #

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

unvalidateTestSuite :: TestSuite -> TestSuiteStanza Source #

## Lenses

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

testStanzaMainIs :: Lens' TestSuiteStanza (Maybe (RelativePath Source 'File)) 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 (RelativePath Source 'File) _benchmarkStanzaBenchmarkModule :: Maybe ModuleName _benchmarkStanzaBuildInfo :: BuildInfo

#### Instances

Instances details

HasBuildInfo BenchmarkStanza Source # |
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 # jsppOptions :: Lens' BenchmarkStanza [String] Source # ldOptions :: Lens' BenchmarkStanza [String] Source # hsc2hsOptions :: Lens' BenchmarkStanza [String] Source # pkgconfigDepends :: Lens' BenchmarkStanza [PkgconfigDependency] Source # frameworks :: Lens' BenchmarkStanza [RelativePath Framework 'File] Source # extraFrameworkDirs :: Lens' BenchmarkStanza [SymbolicPath Pkg ('Dir Framework)] Source # asmSources :: Lens' BenchmarkStanza [SymbolicPath Pkg 'File] Source # cmmSources :: Lens' BenchmarkStanza [SymbolicPath Pkg 'File] Source # cSources :: Lens' BenchmarkStanza [SymbolicPath Pkg 'File] Source # cxxSources :: Lens' BenchmarkStanza [SymbolicPath Pkg 'File] Source # jsSources :: Lens' BenchmarkStanza [SymbolicPath Pkg 'File] Source # hsSourceDirs :: Lens' BenchmarkStanza [SymbolicPath Pkg ('Dir Source)] 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 # extraLibsStatic :: 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 [SymbolicPath Pkg ('Dir Lib)] Source # extraLibDirsStatic :: Lens' BenchmarkStanza [SymbolicPath Pkg ('Dir Lib)] Source # includeDirs :: Lens' BenchmarkStanza [SymbolicPath Pkg ('Dir Include)] Source # includes :: Lens' BenchmarkStanza [SymbolicPath Include 'File] Source # autogenIncludes :: Lens' BenchmarkStanza [RelativePath Include 'File] Source # installIncludes :: Lens' BenchmarkStanza [RelativePath Include 'File] Source # options :: Lens' BenchmarkStanza (PerCompilerFlavor [String]) Source # profOptions :: Lens' BenchmarkStanza (PerCompilerFlavor [String]) Source # sharedOptions :: Lens' BenchmarkStanza (PerCompilerFlavor [String]) Source # profSharedOptions :: 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 :: forall (c :: Type -> Constraint) g. (FieldGrammar c g, Applicative (g BenchmarkStanza), Applicative (g BuildInfo), c (Identity BenchmarkType), c (Identity ModuleName), c (List CommaFSep (Identity ExeDependency) ExeDependency), c (List CommaFSep (Identity LegacyExeDependency) LegacyExeDependency), c (List CommaFSep (Identity PkgconfigDependency) PkgconfigDependency), c (List CommaVCat (Identity Dependency) Dependency), c (List CommaVCat (Identity Mixin) Mixin), c (List FSep (MQuoted Extension) Extension), c (List FSep (MQuoted Language) Language), c (List FSep Token String), c (List NoCommaFSep Token' String), c (List VCat (MQuoted ModuleName) ModuleName), forall from (to :: FileOrDir). c (List FSep (SymbolicPathNT from to) (SymbolicPath from to)), forall from (to :: FileOrDir). c (List FSep (RelativePathNT from to) (RelativePath from to)), forall from (to :: FileOrDir). c (List VCat (SymbolicPathNT from to) (SymbolicPath from to)), forall from (to :: FileOrDir). c (RelativePathNT from to), c (List VCat Token String), c (MQuoted Language)) => g BenchmarkStanza BenchmarkStanza Source #

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

unvalidateBenchmark :: Benchmark -> BenchmarkStanza Source #

# Field grammars

formatDependencyList :: [Dependency] -> List CommaVCat (Identity Dependency) Dependency Source #

formatExposedModules :: [ModuleName] -> List VCat (MQuoted ModuleName) ModuleName Source #

formatExtraSourceFiles :: [RelativePath Pkg 'File] -> List VCat (RelativePathNT Pkg 'File) (RelativePath Pkg 'File) Source #

formatHsSourceDirs :: [SymbolicPath Pkg ('Dir Source)] -> List FSep (SymbolicPathNT Pkg ('Dir Source)) (SymbolicPath Pkg ('Dir Source)) Source #

formatMixinList :: [Mixin] -> List CommaVCat (Identity Mixin) Mixin Source #

formatOtherExtensions :: [Extension] -> List FSep (MQuoted Extension) Extension Source #

formatOtherModules :: [ModuleName] -> List VCat (MQuoted ModuleName) ModuleName Source #

## Lenses

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

benchmarkStanzaMainIs :: Lens' BenchmarkStanza (Maybe (RelativePath Source 'File)) Source #

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

benchmarkStanzaBuildInfo :: Lens' BenchmarkStanza BuildInfo Source #

# Flag

flagFieldGrammar :: forall (c :: Type -> Constraint) g. (FieldGrammar c g, Applicative (g PackageFlag)) => FlagName -> g PackageFlag PackageFlag Source #

# Source repository

sourceRepoFieldGrammar :: forall (c :: Type -> Constraint) g. (FieldGrammar c g, Applicative (g SourceRepo), c (Identity RepoType), c Token, c FilePathNT) => RepoKind -> g SourceRepo SourceRepo Source #

# Setup build info

setupBInfoFieldGrammar :: forall (c :: Type -> Constraint) g. (FieldGrammar c g, Functor (g SetupBuildInfo), c (List CommaVCat (Identity Dependency) Dependency)) => Bool -> g SetupBuildInfo SetupBuildInfo Source #

# Component build info

buildInfoFieldGrammar :: forall (c :: Type -> Constraint) g. (FieldGrammar c g, Applicative (g BuildInfo), c (List CommaFSep (Identity ExeDependency) ExeDependency), c (List CommaFSep (Identity LegacyExeDependency) LegacyExeDependency), c (List CommaFSep (Identity PkgconfigDependency) PkgconfigDependency), c (List CommaVCat (Identity Dependency) Dependency), c (List CommaVCat (Identity Mixin) Mixin), c (List FSep (MQuoted Extension) Extension), c (List FSep (MQuoted Language) Language), c (List FSep Token String), c (List NoCommaFSep Token' String), c (List VCat (MQuoted ModuleName) ModuleName), forall from (to :: FileOrDir). c (List FSep (SymbolicPathNT from to) (SymbolicPath from to)), forall from (to :: FileOrDir). c (List FSep (RelativePathNT from to) (RelativePath from to)), forall from (to :: FileOrDir). c (List VCat (SymbolicPathNT from to) (SymbolicPath from to)), c (List VCat Token String), c (MQuoted Language)) => g BuildInfo BuildInfo Source #