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. 01 Apr, 2020 1 commit
  3. 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
  4. 25 Jan, 2019 1 commit
  5. 22 Jan, 2019 1 commit
  6. 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
  7. 26 Nov, 2018 1 commit
  8. 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
  9. 05 Nov, 2018 1 commit
  10. 04 Oct, 2018 1 commit
  11. 04 Dec, 2017 1 commit
  12. 28 Nov, 2017 1 commit
  13. 14 Nov, 2016 1 commit
  14. 05 Sep, 2016 1 commit
    • novadenizen's avatar
      Added TODO: eradicateNoParse comments to all uses of bare 'read' · 978ca74e
      novadenizen authored
      When 'read' is used on invalid input, it raises a "no parse" exception that is
      typically very unhelpful to the user.  It is generally more desirable to either
      handle the error or produce a more helpful error message.
      
      This actually happens sometimes.  When a user creates a detailed-0.9 test
      suite, and that test suite crashes or is killed so it can't write its result
      log, the bare read in Distribution.Simple.Test.LibV09.runTest fails and cabal
      fails with "no parse".
      
      I could have just written a patch to fix that, but it seemed like a better idea
      to find all uses of bare read and see what we can do for all of them.
      
      I have grepped through the repository and I think I've found all uses of bare
      'read' that might raise the dreaded 'no parse' exception.  The plan is to
      separately patch each of them by either replacing with an alternate Read
      function (readMaybe is the most obvious candidate), proving the read will
      always succeed, or establishing that producing a 'no parse' exception is the
      most desirable behavior.
      978ca74e
  15. 28 Feb, 2016 2 commits
  16. 10 Feb, 2016 1 commit
  17. 06 Mar, 2015 1 commit
  18. 12 Apr, 2014 2 commits
  19. 02 Apr, 2014 1 commit
    • Ian D. Bollinger's avatar
      Fix #1569. · 85fecab0
      Ian D. Bollinger authored
      * Change `guessPackageName` to translate arbitrary strings into valid
      package names.
      * Change type of `packageName` flag from String to PackageName and
      reject names that do not pass PackageName's corresponding parse
      function.
      85fecab0
  20. 08 Feb, 2013 1 commit
  21. 04 Jan, 2013 1 commit
  22. 18 Dec, 2012 1 commit
  23. 13 Aug, 2012 2 commits
  24. 25 Oct, 2011 1 commit
  25. 19 Dec, 2009 1 commit
  26. 10 Nov, 2009 1 commit
  27. 11 Oct, 2009 1 commit