This project is mirrored from https://github.com/haskell/Cabal. Pull mirroring updated .
  1. 20 Mar, 2020 1 commit
  2. 12 Dec, 2019 1 commit
  3. 02 Mar, 2019 2 commits
  4. 27 Dec, 2018 1 commit
    • Oleg Grenrus's avatar
      Change MungedPackageName to be non-opaque type. · 1a6e2732
      Oleg Grenrus authored
      i.e. strict pair of PackageName and LibraryName
      the legacy conversion is done via Pretty/Parsec instances.
      
      Change of `Maybe UnqualComponentName` to `LibraryName` caused
      a cascade of other changes, but they all seem to be good changes.
      In the sense, they made many comments not-so-necessary.
      
      Add Distribution.Types.PackageName.Magic for special package names.
      
      Updates in cabal-install are mostly trivial type error driven changes.
      I removed few (deprecated) `Text` instances: `MungedPackageId`,
      `MungedPackageName` and `LibraryName`. Turns out only a `Pretty`
      part was used, so it was easy to update. Note: `LibraryName`
      doesn't have `Pretty` / `Parsec` instances as it's either parsed/printed
      as a `ComponentName` or `UnqualComponentName`, never stand alone.
      1a6e2732
  5. 16 Dec, 2018 1 commit
    • Oleg Grenrus's avatar
      Introduce Distribution.Fields module namespace · 7150c6d2
      Oleg Grenrus authored
      Split fields related functionality out of `Distribution.Parsec`
      namespace which is not left only to handle "scalar" values.
      This separation highlights that we use `parsec` for *structure* (think
      JSON), and the *values* of the fields (think e.g. dates in JSON).
      
      - New top-level `Distribution.Fields` and `Distribution.Parsec` modules
        should include most things most people would need.
      - Also `Distribution.Pretty.Field` is moved to `Distribution.Fields.Pretty`,
        as now it has proper place.
      - The commit is moving things around and fixing compilation errors.
      - I fixed `cabal check` parse error printing as I was nearby.
      7150c6d2
  6. 03 Dec, 2018 1 commit
  7. 29 Nov, 2018 1 commit
    • Oleg Grenrus's avatar
      Add visible field to Library · 32fbd0b5
      Oleg Grenrus authored
      - for main library default is True
      - for named libraries default is False
      - remove Monoid Library instance; i'd rather remove emptyLibrary too
        but now these (two?) usages are explicit:
        - creating Library from BuildInfo when merging common stanzas
        - creation of dummy package in `cabal new-repl`
      - Documentation is left for Francesco to write
      - Field is named `visible` because we have `buildable` and `exposed`
        adjectives. `visibility: True` is unclear.
      32fbd0b5
  8. 27 Nov, 2018 1 commit
  9. 26 Nov, 2018 1 commit
  10. 25 Nov, 2018 1 commit
  11. 03 Nov, 2018 1 commit
  12. 02 Aug, 2018 1 commit
  13. 31 Jul, 2018 1 commit
  14. 04 Jul, 2018 1 commit
  15. 07 Mar, 2018 1 commit
  16. 01 Feb, 2018 1 commit
  17. 30 Jan, 2018 1 commit
    • Oleg Grenrus's avatar
      Make Cabal-2.2 behave like Cabal-2.0 related to #5055 · b0e697e7
      Oleg Grenrus authored
      This is not a proper fix, but we are more conservative than is strictly
      required. I.e. each "branch" must have `type`.
      
      Also as `type` is set, then `main-is` (or module) have to be specified,
      because of `validate*` functions.
      
      The `onAllBranches` is wrong. But we can fix (i.e. relax) it for Cabal-2.4
      
      /Note:/
      regressions/issue-5055.format: it's broken as there isn't `main-is`
      `os(windows) conditional branch in the formatted output.
      b0e697e7
  18. 23 Jan, 2018 1 commit
  19. 17 Jan, 2018 1 commit
    • Peter Simons's avatar
      Provide a proper 'emptyGenericPackageDescription' constant. · ebdaa2a3
      Peter Simons authored
      Distribution.PackageDescription.Parsec had a locally defined empty
      GenericPackageDescription, which turned out to be useful for unit testing the
      NFdata instance of that type, too, so it's now available properly from the
      Distribution.Types.GenericPackageDescription module.
      ebdaa2a3
  20. 16 Jan, 2018 4 commits
  21. 15 Jan, 2018 1 commit
  22. 14 Jan, 2018 1 commit
  23. 24 Dec, 2017 3 commits
    • Oleg Grenrus's avatar
      f0b64973
    • Oleg Grenrus's avatar
      Implement availableSince. · 195702f7
      Oleg Grenrus authored
      Tag Backpack fields (mixins, signatures) to `availableSince [2,0]`.
      This "fixes" https://github.com/haskell/cabal/issues/4448, as fields
      are recognised, warned, but parsed as empty if cabal-version < 2.0
      (actual cut-off is ! (>= 1.25). For example, a file with
      
          cabal-version: >=1.10
          library:
            mixins: foo-indef requires (Foo42 as FooImpl)
      
      will be accepted, yet warned, and parsed `mixins` in `BuildInfo` will be
      an empty list.
      
      Also availableSince is removed from `build-tool-depends`,
      as we **want** to parse (and not warn) it in old Cabal files.
      It can be thought as added retrospectively to old specs, but old `Cabal`
      s don't know how to use it.
      195702f7
    • Oleg Grenrus's avatar
      CabalSpecVersion + Leading (or trailing) comma for build-depends · 0f72e4ac
      Oleg Grenrus authored
      CabalSpecVersion type-class will allow to gather per-spec conditionals.
      Currently it's used for selecting parsers / grammatical structure.
      
      Leading (or trailing commas) for CommaFSep/CommaVSep fields,
      i.e. fields with mandatory comma are (atm):
      
      - build-depends
      - build-tool-depends
      - build-tools
      - mixins
      - pkgconfig-depends
      - reexported-modules
      - setup-depends
      0f72e4ac
  24. 12 Dec, 2017 1 commit
    • Oleg Grenrus's avatar
      Common stanzas · bfb1967c
      Oleg Grenrus authored
      - common stanzas can be include other common stanzas
      - `import: name1, name2` to import multiple stanzas
      - Parse common stanzas in the same pass with other sections.
      - Common stanzas have to be defined before use.
      - Also negative tests
      - Terse documentation, let's improve it as questions are asked
      
      - Edit gen-extra-source-files to include golden files
      - Amend elif warning to mention cabal-version: 2.2
      - In regression golden tests, include also warnings
      
      Note: ATM the common stanzas are completely handled inside parser,
      GenericPackageDescription doesn't know about them anymore.
      That can be changed, but the the flattening of
      GenericPackageDescription to PackageDescription may fail.
      I don't want to do that refactor now.
      bfb1967c
  25. 14 Oct, 2017 3 commits
  26. 20 Sep, 2017 1 commit
    • Oleg Grenrus's avatar
      Introduce FIeldGrammar. · c72fd0e7
      Oleg Grenrus authored
      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.
      c72fd0e7
  27. 17 Aug, 2017 1 commit
  28. 16 Aug, 2017 1 commit
    • Oleg Grenrus's avatar
      Use alex in latin1 mode · 541c415f
      Oleg Grenrus authored
      At the moment we have very lax "name" lexer, which is essentially
      *everything else* than otherwise specified characters: parens, space,
      symbols (but not hyphen -)
      
      This removes `TokNum` and `SecArgNum`, both are merged into `TokSym` and
      `SecArgSym` respectively.
      541c415f
  29. 15 Aug, 2017 3 commits
  30. 19 Feb, 2017 1 commit