This project is mirrored from https://github.com/haskell/Cabal. Pull mirroring updated .
  1. 06 Apr, 2020 1 commit
    • Oleg Grenrus's avatar
      Improve `cabal init` code a bit · 2fa83023
      Oleg Grenrus authored
      - Always ask for SPDX expression, we can "convert" them to old format
      - No default license
      - Add cabal-version: 3.0 to the list
      - cabal-version is asked using CabalSpecVersion type
      - seems to fix what #6619 tries to fix:
      
      ```
      % /code/shared-haskell/cabal/dist-newstyle/build/x86_64-linux/ghc-8.8.3/cabal-install-3.3.0.0/x/cabal/build/cabal/cabal init -l 'FOO AND BAR'
      Cannot parse license: FOO AND BAR
      CallStack (from HasCallStack):
        error, called at ./Distribution/ReadE.hs:42:24 in Cabal-3.3.0.0-inplace:Distribution.ReadE
      ```
      
      an error, but it doesn't loop.
      2fa83023
  2. 04 Apr, 2020 1 commit
    • Matt Renaud's avatar
      Split monolithic Init.hs module into 5 sub-modules. · 9bd18b6a
      Matt Renaud authored
      Init.Command - Main cabal init logic that ties everything together.
      Init.Defaults - Default values for items not specified in config or arguments
      Init.FileCreators - All the createXyz functions which write files (LICENSE, Main.hs, etc.)
      Init.Prompt - Utilities for prompting the user for selections
      Init.Utils - Misc utilities shared across the above modules
      9bd18b6a
  3. 01 Apr, 2020 1 commit
  4. 22 Mar, 2020 1 commit
  5. 15 Dec, 2019 1 commit
  6. 02 Nov, 2019 1 commit
  7. 26 Apr, 2019 1 commit
  8. 07 Feb, 2019 1 commit
    • Matt Renaud's avatar
      `cabal init` improvements: application-dir and creating library hs file (#5740) · d59a224d
      Matt Renaud authored
      * Add support for application-dir and creating library hs file.
      
      This adds support for specifying an "application directory" for the
      Main.hs executable entrypoint to be located in ("app" is common).
      
      This also generates a MyLib.hs file when initializing a new project
      that is 'Library' or 'LibraryAndExecutable'. For the latter, the
      'Main' module also imports this library and uses it.
      
      * Fix otherModules bug when MyLib and Main are in the same directory.
      
      * Don't ask for "source dir" if this is an executable.
      
      That's what applicationDir is for.
      
      * Comments, explicitly handle 'Library' in getModulesBuildToolsAndDeps
      
      * Code cleanups.
      
      - More concise comments.
      - Simplified code to write MyLib.
      - Share directory creation code.
      
      * Update changelog.
      
      [ci skip]
      
      * Remove extraneous let.
      
      * Add support for application-dir and creating library hs file.
      
      This adds support for specifying an "application directory" for the
      Main.hs executable entrypoint to be located in ("app" is common).
      
      This also generates a MyLib.hs file when initializing a new project
      that is 'Library' or 'LibraryAndExecutable'. For the latter, the
      'Main' module also imports this library and uses it.
      
      * Fix otherModules bug when MyLib and Main are in the same directory.
      
      * Don't ask for "source dir" if this is an executable.
      
      That's what applicationDir is for.
      
      * Comments, explicitly handle 'Library' in getModulesBuildToolsAndDeps
      
      * Code cleanups.
      
      - More concise comments.
      - Simplified code to write MyLib.
      - Share directory creation code.
      
      * Update changelog.
      
      [ci skip]
      
      * Remove extraneous let.
      
      * More library and application directory suggestions.
      
      * Fix merge bug and reword interactive prompt.
      
      * Wording.
      d59a224d
  9. 25 Jan, 2019 2 commits
  10. 22 Jan, 2019 1 commit
  11. 21 Jan, 2019 3 commits
  12. 20 Jan, 2019 1 commit
  13. 04 Jan, 2019 1 commit
  14. 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
  15. 28 Nov, 2018 1 commit
    • Oleg Grenrus's avatar
      Move ReadP out of Cabal (to cabal-install) · baf78ca2
      Oleg Grenrus authored
      - Distribution.Compat.ReadP to Distribution.Deprecated.ReadP
      - Distribution.Text to Distribution.Deprecated.Text
      - all Text instances needed by cabal-install to Deprecated.Text too
      - Distribution.ParseUtils to Distribution.Deprecated.ParseUtils
      - Remove deprecated Distribution.PrettyUtils
      - new Distribution.Text with
      
          display = prettyShow
          simpleParse = simpleParsec
      
        to not break too much stuff (Custom Setup.hs)
      - parseInstalledPackageInfo type signature changed to use
        `base` types
      
      This removes around 2k lines from Cabal the library.
      git diff --stat shows less, as files are moved (git is smart).
      Even so, total 300 lines removal at this point.
      baf78ca2
  16. 26 Nov, 2018 2 commits
  17. 22 Nov, 2018 1 commit
    • Matt Renaud's avatar
      Add 'SimplePackage' package type. · a109809d
      Matt Renaud authored
      This new 'PackageType' addresses the common use case of getting a package set up
      as quickly as possible without needing to go through the full interactive
      prompt. We move the 'getLibOrExec' prompt to the front of the list, and if
      'SimpleProject' is selected we bypass the rest of the interactive prompt and use
      the defaults.
      
      This behaviour can also be invoked via: cabal init --simple
      
      Testing:
      - Manually tested
      a109809d
  18. 03 Nov, 2018 1 commit
    • Francesco Gazzetta's avatar
      Multiple libraries (allow depending on sublibs) · e2194d25
      Francesco Gazzetta authored
      Create a new syntax for depending on any library of any package.
      The syntax is
      
          build-depends: pkgname:{pkgname, sublibname} -any
      
      where the second `pkgname` specifies a dependency on the main unnamed
      library.
      
      Closes #4206.
      e2194d25
  19. 04 Oct, 2018 1 commit
  20. 18 Jul, 2018 2 commits
  21. 22 Dec, 2017 1 commit
  22. 04 Dec, 2017 2 commits
  23. 29 Nov, 2017 2 commits
  24. 28 Nov, 2017 1 commit
  25. 07 Jul, 2017 1 commit
  26. 06 May, 2017 3 commits
  27. 04 May, 2017 1 commit
  28. 28 Apr, 2017 1 commit
  29. 12 Apr, 2017 1 commit
  30. 17 Mar, 2017 2 commits