Introduce FIeldGrammar.
This commit reworks how GenericPackageDescription is parsed from `[Field Position]` and pretty-printed to `Doc`. This also fixes few issues: - Fix #4697: `cabal format` doesn't output custom-setup stanza (nor foreign-lib stanzas) - Fix #4719: `parse . pretty . parse = parse` for all Hackage cabal files. - `parser-hackage-tests roundtrip` is the test program. The handling of `license-file` and `license-files` is changed. Now they behave the same.
Showing
- Cabal/Cabal.cabal 15 additions, 7 deletionsCabal/Cabal.cabal
- Cabal/Distribution/Compat/Map/Strict.hs 5 additions, 0 deletionsCabal/Distribution/Compat/Map/Strict.hs
- Cabal/Distribution/Compat/Parsec.hs 4 additions, 0 deletionsCabal/Distribution/Compat/Parsec.hs
- Cabal/Distribution/Compat/ReadP.hs 20 additions, 1 deletionCabal/Distribution/Compat/ReadP.hs
- Cabal/Distribution/Compiler.hs 17 additions, 6 deletionsCabal/Distribution/Compiler.hs
- Cabal/Distribution/FieldGrammar.hs 86 additions, 0 deletionsCabal/Distribution/FieldGrammar.hs
- Cabal/Distribution/FieldGrammar/Class.hs 149 additions, 0 deletionsCabal/Distribution/FieldGrammar/Class.hs
- Cabal/Distribution/FieldGrammar/Parsec.hs 260 additions, 0 deletionsCabal/Distribution/FieldGrammar/Parsec.hs
- Cabal/Distribution/FieldGrammar/Pretty.hs 70 additions, 0 deletionsCabal/Distribution/FieldGrammar/Pretty.hs
- Cabal/Distribution/License.hs 29 additions, 5 deletionsCabal/Distribution/License.hs
- Cabal/Distribution/ModuleName.hs 13 additions, 2 deletionsCabal/Distribution/ModuleName.hs
- Cabal/Distribution/PackageDescription.hs 1 addition, 1 deletionCabal/Distribution/PackageDescription.hs
- Cabal/Distribution/PackageDescription/FieldGrammar.hs 505 additions, 0 deletionsCabal/Distribution/PackageDescription/FieldGrammar.hs
- Cabal/Distribution/PackageDescription/Parse.hs 1 addition, 1 deletionCabal/Distribution/PackageDescription/Parse.hs
- Cabal/Distribution/PackageDescription/Parsec.hs 177 additions, 219 deletionsCabal/Distribution/PackageDescription/Parsec.hs
- Cabal/Distribution/PackageDescription/Parsec/FieldDescr.hs 0 additions, 620 deletionsCabal/Distribution/PackageDescription/Parsec/FieldDescr.hs
- Cabal/Distribution/PackageDescription/PrettyPrint.hs 115 additions, 257 deletionsCabal/Distribution/PackageDescription/PrettyPrint.hs
- Cabal/Distribution/PackageDescription/Quirks.hs 1 addition, 1 deletionCabal/Distribution/PackageDescription/Quirks.hs
- Cabal/Distribution/ParseUtils.hs 4 additions, 2 deletionsCabal/Distribution/ParseUtils.hs
- Cabal/Distribution/Parsec/Class.hs 30 additions, 375 deletionsCabal/Distribution/Parsec/Class.hs
Loading
Please register or sign in to comment