HORIZON HASKELLDocslts/ghc-10.0.xaa25b892026-10-10Search names, modules, packages, or :: a typeCtrl K

GHC 10.0.0.20260917 · lts/ghc-10.0.x · aa25b89 · 2026-10-10

ModuleCabal-syntax-3.18.1.0Haskell2010

Distribution.FieldGrammar

This module provides a way to specify a grammar of .cabal -like files.

  • 6 types
  • 1 class
  • 14 values

Field grammar type

5 declarations
classclass (c SpecVersion, c TestedWith, c SpecLicense, c Token, c Token', c FilePathNT, forall s. Applicative (g s)) => FieldGrammar (c :: Type -> Constraint) (g :: Type -> Type -> Type) | g -> c where
#

g is parametrised by

  • s which is a structure we are parsing. We need this to provide prettyprinter functionality

  • a type of the field.

Methods

Instances3FieldGrammar

Concrete grammar implementations

8 declarations

Auxiliary

8 declarations
value(^^^) :: a -> (a -> b) -> b
#

Reverse function application which binds tighter than <$> and <*>. Useful for refining grammar specification.

<*> monoidalFieldAla "extensions"           (alaList' FSep MQuoted)       oldExtensions
    ^^^ deprecatedSince [1,12] "Please use 'default-extensions' or 'other-extensions' fields."
valuepartitionFields :: [Field ann] -> (Fields ann, [[Section ann]])
#

Partition field list into field map and groups of sections. Groups sections between fields. This means that the following snippet contains two section groups:

-- first group
some-section
    field: value
another-section
    field: value
foo: bar
-- second group
yet-another-section
    field: value

Newtypes

0 declarations