This project is mirrored from Pull mirroring failed .
Repository mirroring has been paused due to too many failed attempts. It can be resumed by a project maintainer.
Last successful update .
  1. 07 Mar, 2015 2 commits
    • Herbert Valerio Riedel's avatar
      Add `GHC.OldList` legacy module · e76f8664
      Herbert Valerio Riedel authored
      This module provides access the list-specialised versions for legacy purposes
      (such as implementing Haskell2010-ish preludes). This module basically
      re-exports the hidden `Data.OldList` module (but in the less controversial `GHC.*`
      namespace, which signals less committment to keep this module around).
      This is legacy module is mostly for GHC 7.10's sake. What becomes long-term
      of `GHC.OldList` can be decided unhurriedly during the GHC 7.12 development
      Reviewed By: austin
      Differential Revision:
    • Herbert Valerio Riedel's avatar
      base: drop redundant Typeable derivings · 47b5b5c2
      Herbert Valerio Riedel authored
      Thanks to #9858 `Typeable` doesn't need to be explicitly derived anymore.
      This also makes `AutoDeriveTypeable` redundant, as well as some imports of
      `Typeable` (removal of whose may be beneficial to #9707). This commit
      removes several such now redundant use-sites in `base`.
      Reviewed By: austin, ekmett
      Differential Revision:
  2. 10 Feb, 2015 1 commit
  3. 19 Jan, 2015 1 commit
    • Eric Seidel's avatar
      Expose source locations via Implicit Parameters of type GHC.Location.Location · c024af13
      Eric Seidel authored
      IPs with this type will always be solved for the current source
      location. If another IP of the same type is in scope, the two locations will be
      appended, creating a call-stack. The Location type is kept abstract so users
      cannot create them, but a Location can be turned into a list of SrcLocs, which
      correspond to individual locations in a program. Each SrcLoc contains a
      package/module/file name and start/end lines and columns.
      The only thing missing from the SrcLoc in my opinion is the name of the
      top-level definition it inhabits. I suspect that would also be useful, but it's
      not clear to me how to extract the current top-level binder from within the
      constraint solver. (Surely I'm just missing something here?)
      I made the (perhaps controversial) decision to have GHC completely ignore
      the names of Location IPs, meaning that in the following code:
          bar :: (?myloc :: Location) => String
          bar = foo
          foo :: (?loc :: Location) => String
          foo = show ?loc
      if I call `bar`, the resulting call-stack will include locations for
      1. the use of `?loc` inside `foo`,
      2. `foo`s call-site inside `bar`, and
      3. `bar`s call-site, wherever that may be.
      This makes Location IPs very special indeed, and I'm happy to change it if the
      dissonance is too great.
      I've also left out any changes to base to make use of Location IPs, since there
      were some concerns about a snowball effect. I think it would be reasonable to
      mark this as an experimental feature for now (it is!), and defer using it in
      base until we have more experience with it. It is, after all, quite easy to
      define your own version of `error`, `undefined`, etc. that use Location IPs.
      Test Plan: validate, new test-case is testsuite/tests/typecheck/should_run/IPLocation.hs
      Reviewers: austin, hvr, simonpj
      Reviewed By: simonpj
      Subscribers: simonmar, rodlogic, carter, thomie
      Differential Revision:
      GHC Trac Issues: #9049
  4. 10 Dec, 2014 1 commit
  5. 24 Nov, 2014 1 commit
    • Ömer Sinan Ağacan's avatar
      accessors to RTS flag values -- #5364 · 1617a10a
      Ömer Sinan Ağacan authored
      Summary: Implementation of #5364. Mostly boilerplate, reading FILE fields is missing.
      Test Plan:
      - Get some feedback on missing parts. (FILE fields)
      - Get some feedback on module name.
      - Get some feedback on other things.
      - Get code reviewed.
      - Make sure test suite is passing. (I haven't run it myself)
      Reviewers: hvr, austin, ezyang
      Reviewed By: ezyang
      Subscribers: ekmett, simonmar, ezyang, carter, thomie
      Differential Revision:
      GHC Trac Issues: #5364
  6. 22 Nov, 2014 1 commit
    • Herbert Valerio Riedel's avatar
      Implement `Natural` number type (re #9818) · 8a8cdbbf
      Herbert Valerio Riedel authored
      This implements a `Natural` type for representing unsigned arbitrary
      precision integers.
      When available, `integer-gmp>=1.0.0`'s `BigNat` type is used as
      building-block to construct `Natural` as an algebraic data-type.
      Otherwise, `Natural` falls back being a `newtype`-wrapper around
      `Integer` (as is done in Edward Kmett's `nats` package).
      The `GHC.Natural` module exposes an internal GHC-specific API, while
      `Numeric.Natural` provides the official & portable API.
      Reviewed By: austin, ekmett
      Differential Revision:
  7. 21 Nov, 2014 2 commits
    • Herbert Valerio Riedel's avatar
      Add Data.Void to base (re #9814) · a97f90ce
      Herbert Valerio Riedel authored
      This adds the module `Data.Void` (formerly provided by Edward Kmett's `void`
      package) to `base`.
      The original Haskell98 compatible implementation has been modified to use
      modern GHC features (among others this makes use of `EmptyCase` as
      motivated by #2431), and `vacuousM` was dropped since it's redundant now
      with the AMP in place.  Instances for classes not part of `base` had to be
      dropped as well.
      TODO: Documentation could be improved
      Reviewed By: ekmett, austin
      Differential Revision:
    • Herbert Valerio Riedel's avatar
      Hide `Data.OldList` module · e888b943
      Herbert Valerio Riedel authored
      The `Data.OldList` module was originally created in
      3daf0023 to provide a way to access the
      original list-specialised functions from `Data.List`. It was also made
      an exposed module in order to facilitate adapting the
      `haskell2010`/`haskell98` packages. However, since the
      `haskell2010`/`haskell98` packages were dropped, we no longer need to
      expose `Data.OldList`.
      Depends on D511
      Reviewers: ekmett, austin
      Reviewed By: ekmett, austin
      Subscribers: thomie, carter
      Differential Revision:
  8. 12 Nov, 2014 1 commit
    • Herbert Valerio Riedel's avatar
      Implement new integer-gmp2 from scratch (re #9281) · c774b28f
      Herbert Valerio Riedel authored
      This is done as a separate `integer-gmp2` backend library because it
      turned out to become a complete rewrite from scratch.
      Due to the different (over)allocation scheme and potentially different
      accounting (via the new `{shrink,resize}MutableByteArray#` primitives),
      some of the nofib benchmarks actually results in increased allocation
      numbers (but not necessarily an increase in runtime!).  I believe the
      allocation numbers could improve if `{resize,shrink}MutableByteArray#`
      could be optimised to reallocate in-place more efficiently.
      Here are the more apparent changes in the latest nofib comparision
      between `integer-gmp` and `integer-gmp2`:
                Program     Size    Allocs   Runtime   Elapsed  TotalMem
             bernouilli    +1.6%    +15.3%     0.132     0.132      0.0%
           cryptarithm1    -2.2%      0.0%     -9.7%     -9.7%      0.0%
                  fasta    -0.7%     -0.0%    +10.9%    +10.9%      0.0%
                  kahan    +0.6%    +38.9%     0.169     0.169      0.0%
                   lcss    -0.7%     -0.0%     -6.4%     -6.4%      0.0%
                 mandel    +1.6%    +33.6%     0.049     0.049      0.0%
               pidigits    +0.8%     +8.5%     +3.9%     +3.9%      0.0%
                  power    +1.4%    -23.8%    -18.6%    -18.6%    -16.7%
              primetest    +1.3%    +50.1%     0.085     0.085      0.0%
                    rsa    +1.6%    +53.4%     0.026     0.026      0.0%
                    scs    +1.2%     +6.6%     +6.5%     +6.6%    +14.3%
                 symalg    +1.0%     +9.5%     0.010     0.010      0.0%
              transform    -0.6%     -0.0%     -5.9%     -5.9%      0.0%
                    Min    -2.3%    -23.8%    -18.6%    -18.6%    -16.7%
                    Max    +1.6%    +53.4%    +10.9%    +10.9%    +14.3%
         Geometric Mean    -0.3%     +1.9%     -0.8%     -0.8%     +0.0%
      (see P35 / for full report)
      By default, `INTEGER_LIBRARY=integer-gmp2` is active now, which results
      in the package `integer-gmp-` being registered in the package db.
      The previous `integer-gmp-` can be restored by setting
      `INTEGER_LIBRARY=integer-gmp` (but will probably be removed altogether
      for GHC 7.12). In-tree GMP support has been stolen from the old
      `integer-gmp` (while unpatching the custom memory-allocators, as well as
      forcing `-fPIC`)
      A minor hack to `ghc-cabal` was necessary in order to support two different
      `integer-gmp` packages (in different folders) with the same package key.
      There will be a couple of follow-up commits re-implementing some features
      that were dropped to keep D82 minimal, as well as further
      More information can be found via #9281 and
      Reviewed By: austin, rwbarton, simonmar
      Differential Revision:
  9. 10 Nov, 2014 1 commit
  10. 31 Oct, 2014 1 commit
    • Herbert Valerio Riedel's avatar
      Drop deprecated `OverlappingInstances` from base · cbb20ab2
      Herbert Valerio Riedel authored
      With #9242 the `OverlappingInstances` extension got deprecated, this
      commit adapts the only two remaining places in `base` where it was still
      Starting with this commit, the `Typeable (s t)` instance (which seemingly
      was the motivation for using `OverlappingInstances` in the first place
      when `Typeable` was neither polykinded nor auto-derived-only, see also
      commit ce3fd0e0 which introduced
      overlapping instances) does no longer allow overlapping instances, and
      there doesn't seem to be any good reason to keep allowing overlapping
      instance now.
      This also removes redundant `LANGUAGE`/`OPTIONS_GHC` pragmas from
      `Data.Typeable` and refactors the language pragmas into more uniform
      single-line pragmas.
      Reviewed By: austin
      Differential Revision:
  11. 26 Oct, 2014 1 commit
  12. 18 Oct, 2014 1 commit
    • mgmeier's avatar
      Remove obsolete Data.OldTypeable (#9639) · 7369d259
      mgmeier authored
      This finally removes the `Data.OldTypeable` module (which
      has been deprecated in 7.8), from `base`, compiler and testsuite.
      The deprecated `Typeable{1..7}` aliases in `Data.Typeable` are not
      removed yet in order to give existing code a bit more time to adapt.
      Reviewed By: hvr, dreixel
      Differential Revision:
  13. 20 Sep, 2014 1 commit
    • Herbert Valerio Riedel's avatar
      Set up framework for generalising Data.List to Foldables · 3daf0023
      Herbert Valerio Riedel authored
      This renames the Data.List module to Data.OldList, and puts a new
      Data.List module into its place re-exporting all list functions.
      The plan is to leave the monomorphic versions of the list functions in
      Data.OldList to help smooth the transition.
      The new Data.List module then will simply re-export entities from
      Data.OldList and Data.Foldable.
      This refactoring has been placed in a separate commit to be able to
      better isolate any regressions caused by the actual list function
      generalisations when implementing #9586
      This also updates the haskell2010, haskell98, and array submodules
      Reviewed By: austin, ekmett
      Differential Revision:
  14. 09 Sep, 2014 3 commits
  15. 05 Aug, 2014 1 commit
    • Edward Z. Yang's avatar
      Package keys (for linking/type equality) separated from package IDs. · 66218d15
      Edward Z. Yang authored
      This patch set makes us no longer assume that a package key is a human
      readable string, leaving Cabal free to "do whatever it wants" to allocate
      keys; we'll look up the PackageId in the database to display to the user.
      This also means we have a new level of qualifier decisions to make at the
      package level, and rewriting some Safe Haskell error reporting code to DTRT.
      Additionally, we adjust the build system to use a new ghc-cabal output
      Make variable PACKAGE_KEY to determine library names and other things,
      rather than concatenating PACKAGE/VERSION as before.
      Adds a new `-this-package-key` flag to subsume the old, erroneously named
      `-package-name` flag, and `-package-key` to select packages by package key.
      RFC: The md5 hashes are pretty tough on the eye, as far as the file
      system is concerned :(
      ToDo: safePkg01 test had its output updated, but the fix is not really right:
      the rest of the dependencies are truncated due to the fact the we're only
      grepping a single line, but ghc-pkg is wrapping its output.
      ToDo: In a later commit, update all submodules to stop using -package-name
      and use -this-package-key.  For now, we don't do it to avoid submodule
      Signed-off-by: default avatarEdward Z. Yang <>
      Test Plan: validate
      Reviewers: simonpj, simonmar, hvr, austin
      Subscribers: simonmar, relrod, carter
      Differential Revision:
  16. 27 May, 2014 1 commit
    • Herbert Valerio Riedel's avatar
      Replace DeriveDataTypeable by AutoDeriveTypeable · 6ed54303
      Herbert Valerio Riedel authored
      This is a first step towards addressing #9111
      This results in the following additional Typeable (exported) instances
      being generated (list was compiled by diff'ing hoogle txt output):
        instance Typeable CFile
        instance Typeable 'CFile
        instance Typeable CFpos
        instance Typeable 'CFpos
        instance Typeable CJmpBuf
        instance Typeable 'CJmpBuf
        instance Typeable ChItem
        instance Typeable QSem
        instance Typeable ID
        instance Typeable 'ID
        instance Typeable CONST
        instance Typeable Qi
        instance Typeable Qr
        instance Typeable Mp
        instance Typeable ConstrRep
        instance Typeable Fixity
        instance Typeable 'Prefix
        instance Typeable 'Infix
        instance Typeable Constr
        instance Typeable DataType
        instance Typeable DataRep
        instance Typeable Data
        instance Typeable HasResolution
        instance Typeable IsList
      Signed-off-by: Herbert Valerio Riedel's avatarHerbert Valerio Riedel <>
  17. 19 Apr, 2014 2 commits
  18. 28 Feb, 2014 1 commit
  19. 29 Jan, 2014 1 commit
  20. 31 Oct, 2013 1 commit
    •'s avatar
      Add new module Data.Type.Bool, defining &&, || and Not. · 9265c889 authored
      This change was necessary given the instances for (==) in
      Data.Type.Equality. These need conjunction, and a local
      definition of conjunction doesn't work if a client is reasoning
      about equality. Both the client and the library need the
      same conjunction, so that is what Data.Type.Bool provides.
  21. 27 Oct, 2013 1 commit
  22. 24 Oct, 2013 1 commit
  23. 09 Oct, 2013 1 commit
  24. 28 Sep, 2013 2 commits
    • Herbert Valerio Riedel's avatar
      Add missing/remove redundant `{-# LANGUAGE CPP #-}`s · e8640791
      Herbert Valerio Riedel authored
      The `CPP` forgotten were in windows-specific modules, and the redundant
      `CPP` files were removed in some `.hsc` files.
      Note: `.hsc` files only require `{-# LANGUAGE CPP #-}` annotations if
      they use `##`, as `hsc2hs` removes all non-escaped `#`-directives.
      Signed-off-by: Herbert Valerio Riedel's avatarHerbert Valerio Riedel <>
    • Herbert Valerio Riedel's avatar
      Modernize and refactor `base.cabal` · a7e09b46
      Herbert Valerio Riedel authored
       - removes the redundant `impl(ghc)` conditional
       - unifies the `exposed-modules` list
       - sorts lists alphabetically
       - convert to uniform `,`-less & line-oriented lists
         (helps reduce diff-noise in future)
       - remove obsolete `nhc98-options` field
       - avoid `{}`-style Cabal grammar
       - remove `extensions: CPP`
       - add `category` field to silence Cabal warning
       - add missing entries to `extra-source-files`
         (the source distribution wasn't buildable because of this!)
       - list all occuring `LANGUAGE` pragmas in `other-extensions`
       - explicitly declare `default-language: Haskell2010`
      Signed-off-by: Herbert Valerio Riedel's avatarHerbert Valerio Riedel <>
  25. 11 Sep, 2013 1 commit
  26. 03 Sep, 2013 1 commit
    • bos's avatar
      Switch IO manager to a mutable hashtable · 28cf2e00
      bos authored
      This data structure (IntTable) provides a similar API to its predecessor
      (IntMap), at half the number of lines in size.
      When tested in isolation using criterion, IntTable is much faster than
      IntMap: over 15x, according to my criterion benchmarks.
      This translates into a measurable improvement when used in the IO manager:
      using weighttp to benchmark acme-http under various configurations on two
      32-core Linux servers connected by a 10gbE network, I see between a 3%
      and 10% increase in requests served per second compared to IntMap.
      Signed-off-by: AndreasVoellmy's avatarAndreas Voellmy <>
  27. 24 Jul, 2013 1 commit
  28. 15 Jun, 2013 1 commit
  29. 08 May, 2013 1 commit
    • batterseapower's avatar
      Support for Windows DBCS and new SBCS with MultiByteToWideChar · 2216b897
      batterseapower authored
      Because MultiByteToWideChar/WideCharToMultiByte have a rather unhelpful
      interface, we have to use a lot of binary searching tricks to get them
      to match the iconv-like interface that GHC requires.
      Even though the resulting encodings are slow, it does at least mean that we
      now support all of Window's code pages. What's more, since these codecs are
      basically only used for console output there probably won't be a huge volume
      of text to deal with in the common case, so speed is less of a worry.
      Note that we will still use GHC's faster table-based custom codec for supported
  30. 12 Feb, 2013 2 commits
    •'s avatar
      Implement poly-kinded Typeable · 3d53407f authored
      This patch makes the Data.Typeable.Typeable class work with arguments of any
      kind. In particular, this removes the Typeable1..7 class hierarchy, greatly
      simplyfing the whole Typeable story. Also added is the AutoDeriveTypeable
      language extension, which will automatically derive Typeable for all types and
      classes declared in that module. Since there is now no good reason to give
      handwritten instances of the Typeable class, those are ignored (for backwards
      compatibility), and a warning is emitted.
      The old, kind-* Typeable class is now called OldTypeable, and lives in the
      Data.OldTypeable module. It is deprecated, and should be removed in some future
      version of GHC.
    • AndreasVoellmy's avatar
  31. 23 Jan, 2013 1 commit
  32. 10 Dec, 2012 1 commit
    • Simon Marlow's avatar
      Add back new working QSem and QSemN implementations (#7417) · 2f32d1d2
      Simon Marlow authored
      We decided not to break existing users without providing an easy
      migration path.  For the time being I've made these implementations,
      which fix the bugs in the old versions and perform reasonably well.
      In due course we should move the concurrency functionality, including
      these modules, out of base and into a separate package.
  33. 30 Nov, 2012 1 commit