This project is mirrored from Pull mirroring updated .
  1. 08 Nov, 2016 1 commit
  2. 02 Oct, 2016 1 commit
  3. 29 Sep, 2016 2 commits
    • Herbert Valerio Riedel's avatar
      Move ShortText to Distribution.Utils.ShortText to avoid cycles · e204a346
      Herbert Valerio Riedel authored
      This moves `String`/UTF8 conversion helpers to Distribution.Utils.String
    • Duncan Coutts's avatar
      Adjust behaviour of reportBuildFailures · 4d308c04
      Duncan Coutts authored
      Make sure it consistently uses stderr, rather than a mixture of stdout
      and stderr. Also rename it to dieOnBuildFailure to make it clear that
      it is fatal in the case of build failures.
      In general we report build failures in two steps: header plus build log
      for each failing package, then a final die exception with summary.
      Previously the build log step was reported to stdout whereas the die
      exception message gets reported to stderr. So we switch that to use
      new dieMsg and dieMsgNoWrap utils so that it all goes to stderr. Also,
      like die, these are reported irrespective of the verbosity.
      This is more or less just a workaround for the fact that we do not yet
      have a nice structured/formatted error mechanism that would allow us to
      throw just the one error in this case.
  4. 28 Sep, 2016 2 commits
    • Herbert Valerio Riedel's avatar
      Add `Distribution.Simple.Utils.ShortText` type (#3898) · 993d20a2
      Herbert Valerio Riedel authored
      This implements a type with a compact representation of `[Char]`.
      The data is stored internally as UTF8 in an 'Data.ByteString.Short.ShortByteString'
      when compiled against `bytestring >= 0.10.4`, and otherwise in a
      plain old `[Char]`.
      `ShortByteString` is available only from `bytestring` 0.10.4 on, and GHC
      7.8.4 was the first GHC to bundle `binary-0.10.4`. So this fallback
      affects mostly only GHC 7.6 and older.
      Note: Originally a strict `ByteString` was used as fallback for this patch. However, the 
      `[Char]` fallback avoids pinned memory and may be more preferable when dealing with
      many small `ShortText`s
    • Herbert Valerio Riedel's avatar
      Make `Version` type opaque (#3905) · bb2026c4
      Herbert Valerio Riedel authored
      Similiar to dabd9d98 which made
      `PackageName` opaque, this makes `Distribution.Version.Version` opaque.
      The most common version numbers occuring on Hackage are 3- and
      4-part versions. This results in significant Heap overhead due to
      `Data.Version`'s inefficient internal representation.
      So like the `PackageName` commit, this commit is a preparatory commit to
      pave the way for replacing `Version`'s internal representation by a
      representation with a memory footprint which can be an order of
      magnitude smaller.
      Finally, this also adds a new functor-like convenience function
          alterVersion :: ([Int] -> [Int]) -> Version -> Version
      for modifying the version number components.
  5. 22 Sep, 2016 1 commit
    • Herbert Valerio Riedel's avatar
      Update default-language & avoid default-extensions (#3880) · f87738df
      Herbert Valerio Riedel authored
      This upgrades the `default-language: Haskell98` to `Haskell2010`
      and removes `default-extensions: RankNTypes, FlexibleContexts`
      in favor of adding `LANGUAGE` pragmas where needed.
      Moroever, this also drops `LANGUAGE` pragmas which have become redundant
      due to `Haskell2010` (specifically, `EmptyDataDecls`,
      `ForeignFunctionInterface` and `PatternGuards`)
      Finally, an `other-extensions` specification is put in place for the
      `Cabal` library component.
      This helps loading up files directly in GHCi, such as e.g. `ghci Setup.hs`
      without having to specify `-X...` flags.
  6. 11 Sep, 2016 1 commit
  7. 09 Sep, 2016 2 commits
    • Lennart Kolmodin's avatar
      isAbsolute fix for Windows. · 7a8062b9
      Lennart Kolmodin authored
      The comment ending in \ turned the subsequent line of code
      into a comment. This is due to the CPP language extension which is
      turned on for this module.
      Thus the 'isAbsolute' function failed to detect absolute
      file paths on the form of DRIVE:\\PATH.
    • Lennart Kolmodin's avatar
      Use the platform independant isAbsolute/isRelative. · e46ed9e2
      Lennart Kolmodin authored
      Move the isAbsolute and isRelative to the Utils module.
      Use them throughout Cabal instead of the versions System.FilePath.
  8. 08 Sep, 2016 2 commits
    • Edward Z. Yang's avatar
      Provide useful call-stacks over all IO code. · 48a0d6ce
      Edward Z. Yang authored
      The key idea is that we define:
          type IO a = HasCallStack => Prelude.IO a
      and voila, call stacks are maintained across all IO!  You can
      look at the stacks using -v"debug +callstack".
      There are a number of IO functions for which the call stack is
      never used.  They are explicitly annotated using NoCallStackIO.
      Maybe some day they will use call stacks and we can change their
      types.  Similarly, there are a number of functions which do
      have type IO, but then suppress the redundant constraint error
      using "_ = callStack". Maybe some day we will attach call
      stacks to the exceptions we throw.
      Signed-off-by: default avatarEdward Z. Yang <>
    • Edward Z. Yang's avatar
      Add support for extended verbosity specification -v"debug +callsite" · 83c93c10
      Edward Z. Yang authored
      This patch uses CallStack support in GHC 7.10 and GHC 8.0 to make
      it possible to get stack traces when we log output.
      This is the bare minimum to make this patch useful: there is
      plenty of tuning that can be done.  For example:
      * Insertions of withFrozenCallStack can help make the "callsite" output
        more useful, though be careful, we lose all stack information at that point!
      * Insertions of 'WithVerbosity', which will let us get deeper stacks
        (at the moment, they are basically always 1-deep.)
      Fixes #3768.
      CC @23Skidoo
      Signed-off-by: default avatarEdward Z. Yang <>
  9. 06 Sep, 2016 1 commit
    • Edward Z. Yang's avatar
      Make default install plan printing more chatty, fixes #3352. · da388222
      Edward Z. Yang authored
      Now it looks something like this by default:
      In order, the following will be built (use -v for more details):
       - Cabal- (test:package-tests) (file Cabal.cabal changed)
       - Cabal- (test:unit-tests) (cannot read state cache)
       - cabal-install- (exe:cabal, test:integration-tests, test:integration-tests2, test:solver-quickcheck, test:unit-tests) (file tests/UnitTests/Distribution/Solver/Modular/DSL.hs changed)
       - pretty-show-1.6.12 (exe:ppsh) (first run)
      Signed-off-by: default avatarEdward Z. Yang <>
  10. 01 Sep, 2016 1 commit
  11. 02 Aug, 2016 1 commit
  12. 26 Jul, 2016 2 commits
  13. 07 May, 2016 1 commit
    • Duncan Coutts's avatar
      Report process output decoding errors in context · cc35a48a
      Duncan Coutts authored
      It turns out that in rawSystemStdInOut any IO errors, including text
      decoding, occurring while collecting the output (stderr or stdout) do
      not get reported immediately, but only later if/when the output is
      consumed. This is because the exceptions happened in the threads forked
      to force the output, but if the main thread looks at the output later
      then the exception is reported again.
      This leads to very confusing results. In particular we had a case where
      the configure process did not fail until writing out the LocalBuildInfo
      because that was the first point that forced the output. So the distance
      from when the exception really occurred and the fact that the exception
      message does not include the name of the program run means that this is
      then a pain to track down.
      This patch makes sure that any exceptions arising from forcing the
      program output occur immediately and with an error message that includes
      the name of the program in question.
  14. 29 Mar, 2016 1 commit
  15. 12 Mar, 2016 1 commit
    • ttuegel's avatar
      D.S.Utils.topHandlerWith: wrap all error messages · 54a7e521
      ttuegel authored
      Fixes #3157. The wrapText helper is used to format all error
      messages. Previously, it was only used to format IOException errors;
      other exceptions would be formatted incorrectly.
  16. 20 Feb, 2016 1 commit
  17. 13 Feb, 2016 4 commits
  18. 30 Jan, 2016 1 commit
  19. 25 Jan, 2016 1 commit
  20. 11 Jan, 2016 1 commit
  21. 10 Jan, 2016 1 commit
  22. 08 Jan, 2016 1 commit
    • Edward Z. Yang's avatar
      Remove same-package import lists, fixes #2835. · 639cd007
      Edward Z. Yang authored
      Instead of qualifying, in some cases I just added an extra
      'hiding' pragma to squelch errors.  Common conflicts
      (just grep for hiding):
          - Flag
              - Distribution.Simple.Compiler
              - Distribution.PackageDescription
              - Distribution.Simple.Setup
          - installedComponentId
              - Distribution.Package
              - Distribution.InstalledPackageInfo
          - doesFileExist
              - Distribution.PackageDescription.Check
          - instantiatedWith
              - I renamed the field in InstalledPackageInfo.  But
                it's probably going away with Backpack bits; I
                migth just excise it soon.
          - absoluteInstallDirs and substPathTemplate
              - Distribution.Simple.InstallDirs
              - Distribution.Simple.LocalBuildInfo
      I fixed some shadowing errors by renaming local variables in some cases.
      Common shadowings (we should perhaps consider not using these as
      method/field names):
          - freeVars
          - components
          - noVersion
          - verbosity
          - get
          - description
          - name
      Some data structures were moved around (IPIConvert and ABIHash)
      to make it easier to handle import lists.
      Some functions in Utils could be turned into reexports of standard
      library functions.
      No explicit imports were removed from non-Cabal imports.  These
      imports help maintain warning cleanliness across versions of GHC,
      so I don't recommend removing them.
      Signed-off-by: default avatarEdward Z. Yang <>
  23. 16 Dec, 2015 1 commit
    • Duncan Coutts's avatar
      Be consistent about using findProgramOnSearchPath · 7d4fbb26
      Duncan Coutts authored
      The findProgramOnSearchPath function is what we use in most places to
      implement the Program abstraction's programFindLocation method.
      Re-export it via Program module.
      The only place that was still using the old findProgramLocation
      instead was in HaskellSuite. Deprecate findProgramLocation which
      is now no longer used.
      This is in preparation for changing the return type of
  24. 22 Oct, 2015 1 commit
  25. 14 Oct, 2015 1 commit
  26. 23 Sep, 2015 1 commit
  27. 04 Sep, 2015 1 commit
  28. 19 Aug, 2015 2 commits
  29. 31 May, 2015 3 commits