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. 24 Oct, 2015 1 commit
  2. 23 Oct, 2015 1 commit
  3. 19 Oct, 2015 1 commit
    • Facundo Domínguez's avatar
      base: Have the argument of mask restore the state. · 2b25a589
      Facundo Domínguez authored
      The implementation of `mask` and `uninterruptibleMask` assumed so far
      that the restore argument would be called in a context with the same
      masking state as that set by `mask` or `uninterruptibleMask`.
      This patch has the restore argument restore the masking, whatever the
      current masking state is.
      Test Plan: validate
      Reviewers: simonmar, hvr, austin, bgamari
      Reviewed By: bgamari
      Subscribers: thomie, qnikst
      Differential Revision:
      GHC Trac Issues: #10149
  4. 15 Oct, 2015 1 commit
  5. 12 Oct, 2015 1 commit
    • Herbert Valerio Riedel's avatar
      base: MRP-refactoring of AMP instances · e737a512
      Herbert Valerio Riedel authored
      This refactors `(>>)`/`(*>)`/`return`/`pure` methods into normal form.
      The redundant explicit `return` method definitions are dropped
      The explicit `(>>) = (*>)` definitions can't be removed yet, as
      the default implementation of `(>>)` is still in terms of `(*>)`
      (even though that should have been changed according to the AMP but
      wasn't -- see note in GHC.Base for details why this had to be postponed)
      A nofib comparision shows this refactoring to result in minor runtime
      improvements (unless those are within normal measurement fluctuations):
              Program           Size    Allocs   Runtime   Elapsed  TotalMem
                  Min          -0.0%     -0.0%     -1.6%     -3.9%     -1.1%
                  Max          -0.0%     +0.0%     +0.5%     +0.5%      0.0%
        Geometric Mean         -0.0%     -0.0%     -0.4%     -0.5%     -0.0%
      Full `nofib` report at
      Reviewers: quchen, alanz, austin, #core_libraries_committee, bgamari
      Reviewed By: bgamari
      Differential Revision:
  6. 03 Oct, 2015 1 commit
    • Ryan Scott's avatar
      Make GHC generics capable of handling unboxed types · 6cde981a
      Ryan Scott authored
      This adds a data family (`URec`) and six data family instances (`UAddr`,
      `UChar`, `UDouble`, `UFloat`, `UInt`, and `UWord`) which a `deriving
      Generic(1)` clause will generate if it sees `Addr#`, `Char#`, `Double#`,
      `Float#`, `Int#`, or `Word#`, respectively. The programmer can then
      provide instances for these data family instances to provide custom
      implementations for unboxed types, similar to how derived `Eq`, `Ord`,
      and `Show` instances currently special-case unboxed types.
      Fixes #10868.
      Test Plan: ./validate
      Reviewers: goldfire, dreixel, bgamari, austin, hvr, kosmikus
      Reviewed By: dreixel, kosmikus
      Subscribers: simonpj, thomie
      Differential Revision:
      GHC Trac Issues: #10868
  7. 02 Oct, 2015 1 commit
    • Ben Gamari's avatar
      Move CallStack back to base · 74424346
      Ben Gamari authored
      CallStack requires tuples, instances of which are defined in GHC.Tuple.
      Unfortunately the change made in D757 to the `Typeable` deriving
      mechanism means that `GHC.Tuple` must import `GHC.Types` for types
      necessary to generate type representations.  This results in a cycle.
      Test Plan: Validate
      Reviewers: gridaphobe, austin, hvr
      Subscribers: thomie
      Differential Revision:
  8. 28 Sep, 2015 1 commit
    • Joachim Breitner's avatar
      Allow enumDeltaIntegerFB to be inlined · 78053f44
      Joachim Breitner authored
      The function is very small and the compiler should be at liberty to
      inline it. But it is recursive, so it did not do it before. By applying
      the usual transformation with a local recursive function, GHC can now
      inline it, producing the loop that one would expect.
  9. 25 Sep, 2015 1 commit
    • Ben Gamari's avatar
      Weak: Don't require wrapping/unwrapping of finalizers · fb409264
      Ben Gamari authored
      To quote Simon Marlow,
          We don't expect users to ever write code that uses mkWeak# or
          finalizeWeak#, we have safe interfaces to these. Let's document the type
          unsafety and fix the problem with () without introducing any overhead.
      Updates stm submodule.
  10. 24 Sep, 2015 1 commit
  11. 23 Sep, 2015 2 commits
  12. 22 Sep, 2015 1 commit
  13. 08 Sep, 2015 1 commit
  14. 07 Sep, 2015 2 commits
    • Joachim Breitner's avatar
      Further simplify the story around minimum/maximum · c6b82e99
      Joachim Breitner authored
      After I have found out that I should look at -ddump-prep and not
      -ddump-core, I noticed that these days, GHC is perfectly capeable of
      turning (the equivalent) of foldl to (the equivalent) of foldl' if the
      operation in question is strict. So instead of using rewrite rules to
      rewrite maximum to a strictMaximum for certain types, we simply use
      This also marks maximum/minimum as INLINEABLE, so that client code can
      get similar specializations, hopefully even automatically. And inded,
      minimum applied to [Double] produces good code (although due to
      inlineing, not due to specialization, it seems).
      I checked (by looking at the core) that this still fixes #10788.
      Differential revision:
    • Joachim Breitner's avatar
      SPECIALIZE strictMinimum for Int and Integer · dc671a1c
      Joachim Breitner authored
      This fixes a regression reported in #10788, where due to less inlining
      compared to earlier versions, we’d get worse code. With the SPECIALIZE,
      we get the good code, and moreover, the good code is in List.hs and
      _not_ inlined to the use site, so smaller code size and less compilation
  15. 04 Sep, 2015 1 commit
    • Joachim Breitner's avatar
      Make Data.List.foldr1 inline · 85915e9b
      Joachim Breitner authored
      Previously, foldr1 would be defiend recursively and thus not inline.
      This is bad, for example, when maximumBy has a strict comparison
      function: Before the BBP, it was implemented via foldl1, which inlined
      and yielded good code. With BBP, it goes via foldr1, so we better inline
      this as well. Fixes #10830.
      Differential Revision:
  16. 02 Sep, 2015 1 commit
    • Eric Seidel's avatar
      Use IP based CallStack in error and undefined · 6740d70d
      Eric Seidel authored
      This patch modifies `error`, `undefined`, and `assertError` to use
      implicit call-stacks to provide better error messages to users.
      There are a few knock-on effects:
      - `GHC.Classes.IP` is now wired-in so it can be used in the wired-in
        types for `error` and `undefined`.
      - `TysPrim.tyVarList` has been replaced with a new function
        `TysPrim.mkTemplateTyVars`. `tyVarList` made it easy to introduce
        subtle bugs when you need tyvars of different kinds. The naive
        tv1 = head $ tyVarList kind1
        tv2 = head $ tyVarList kind2
        would result in `tv1` and `tv2` sharing a `Unique`, thus substitutions
        would be applied incorrectly, treating `tv1` and `tv2` as the same
        tyvar. `mkTemplateTyVars` avoids this pitfall by taking a list of kinds
        and producing a single tyvar of each kind.
      - The types `GHC.SrcLoc.SrcLoc` and `GHC.Stack.CallStack` now live in
      - The type `GHC.Exception.ErrorCall` has a new constructor
        `ErrorCallWithLocation` that takes two `String`s instead of one, the
        2nd one being arbitrary metadata about the error (but usually the
        call-stack). A bi-directional pattern synonym `ErrorCall` continues to
        provide the old API.
      Updates Cabal, array, and haddock submodules.
      Reviewers: nh2, goldfire, simonpj, hvr, rwbarton, austin, bgamari
      Reviewed By: simonpj
      Subscribers: rwbarton, rodlogic, goldfire, maoe, simonmar, carter,
      liyang, bgamari, thomie
      Differential Revision:
      GHC Trac Issues: #5273
  17. 29 Aug, 2015 1 commit
    • Ryan Scott's avatar
      Make Generic (Proxy t) instance poly-kinded (fixes #10775) · a6826c5d
      Ryan Scott authored
      This amounts to enabling PolyKinds in GHC.Generics. However, explicit
      kind signatures must be applied to the datatypes and typeclasses in
      GHC.Generics to ensure that the Core which TcGenGenerics generates
      is properly kinded.
      Several of the typeclasses in GHC.Generics could be poly-kinded, but
      this differential does not attempt to address this, since D493 already
      addresses this.
      Test Plan: ./validate
      Reviewers: hvr, austin, dreixel, bgamari
      Reviewed By: austin, dreixel, bgamari
      Subscribers: goldfire, thomie
      Differential Revision:
      GHC Trac Issues: #10775
  18. 05 Aug, 2015 1 commit
  19. 03 Aug, 2015 1 commit
  20. 30 Jul, 2015 2 commits
  21. 28 Jul, 2015 1 commit
    • Simon Peyton Jones's avatar
      Fallout from more assiduous RULE warnings · a1dd7dd6
      Simon Peyton Jones authored
      GHC now warns if rules compete, so that it's not predicatable
      which will work and which will not. E.g.
      {-# RULES
        f (g x) = ...
        g True  = ...
      If we had (f (g True)) it's not clear which rule would fire.
      This showed up fraility in the libraries.
      * Suppress warnigns in Control.Arrow, Control.Category for class
        methods. At the moment we simply don't have a good way to write a
        RULE with a class method in the LHS.  See Trac #1595.  Arrow and
        Category attempt to do so; I have silenced the complaints with
        -fno-warn-inline-rule-shadowing, but it's not a great solution.
      * Adjust the NOINLINE pragma on '' to account for the
        map/coerce rule
      * Adjust the rewrite rules in Enum, especially for the "literal 1"
        case.  See Note [Enum Integer rules for literal 1].
      * Suppress warnings for 'bytestring' e.g.
         libraries/bytestring/Data/ByteString.hs:895:1: warning:
            Rule "ByteString specialise break (x==)" may never fire
              because rule "Class op ==" for ‘==’ might fire first
            Probable fix: add phase [n] or [~n] to the competing rule
  22. 23 Jul, 2015 1 commit
  23. 21 Jul, 2015 1 commit
    • rwbarton's avatar
      When iconv is unavailable, use an ASCII encoding to encode ASCII · dbe6dac9
      rwbarton authored
      D898 and D1059 implemented a fallback behavior to handle the case
      that the end user's iconv installation is broken (typically due to
      running inside a chroot in which the necessary locale files and/or
      gconv modules have not been installed). In this case, if the
      program requests an ASCII locale, GHC's char8 encoding is used
      rather than the program failing.
      However, silently mangling data like char8 does when the programmer
      did not ask for it is poor behavior, for reasons described in D1059.
      This commit implements an ASCII encoding and uses it in the fallback
      case when iconv is unavailable and the user has requested ASCII.
      Test Plan:
      Added tests for the encodings defined in Latin1.
      Also, manually ran a statically-linked executable of that test
      in a chroot and the tests passed (up to the ones that call
      mkTextEncoding "LATIN1", since there is no fallback from iconv
      for that case yet).
      Reviewers: austin, hvr, hsyl20, bgamari
      Reviewed By: hsyl20, bgamari
      Subscribers: thomie
      Differential Revision:
      GHC Trac Issues: #7695, #10623
  24. 10 Jul, 2015 1 commit
    • Ben Gamari's avatar
      Fix self-contained handling of ASCII encoding · d69dfba4
      Ben Gamari authored
      D898 was primarily intended to fix hangs in the event that iconv was
      unavailable (namely #10298 and #7695). In addition to this fix, it also
      introduced self-contained handling of ANSI terminals to allow compiled
      executables to run in minimal environments lacking iconv.
      However, the behavior that the patch introduced is highly suspicious.
      Specifically, it gives the user a UTF-8 encoding even if they requested
      This has the potential to break quite a lot of code. At very least it
      breaks GHC's Unicode terminal detection logic, which attempts to catch
      an invalid character when encoding a pair of smart-quotes. Of course,
      this exception will never be thrown if a UTF-8 encoder is used.
      Here we use the `char8` encoding to handle requests for ASCII encodings
      in the event that we find iconv to be non-functional.
      Fixes #10623.
      Test Plan: Validate with T8959a
      Reviewers: rwbarton, hvr, austin, hsyl20
      Subscribers: thomie
      Differential Revision:
      GHC Trac Issues: #10623
  25. 07 Jul, 2015 1 commit
    • Ryan Scott's avatar
      Export more types from GHC.RTS.Flags (#9970) · 1967a52d
      Ryan Scott authored
      Export the data types `GiveGCStats`, `DoCostCentres`, `DoHeapProfiles`,
      and `DoTrace`, as well as the type synonyms `Time` and `RtsNat`. The
      above data types appear as fields in the `-Stats` data types in
      `GHC.RTS.Flags`, but since they only have `Show` instances, it is
      practically impossible to due anything useful with the above types
      unless they are exported.
      Reviewers: hvr, ekmett, austin, ezyang, bgamari
      Reviewed By: bgamari
      Subscribers: thomie, bgamari
      Differential Revision:
      GHC Trac Issues: #9970
  26. 16 Jun, 2015 1 commit
  27. 01 Jun, 2015 1 commit
    • Ben Gamari's avatar
      Fix dropped event registrations · 1c383259
      Ben Gamari authored
      D347 introduced a bug wherein the event manager would drop registrations that
      should be retained during processing. This occurs when an fd has multiple
      registrations, not all of which fire, as well as the case of multi-shot
      I also do some general house-keeping, try to better document things, and fix a
      bug which could result in unnecessary calls to `epoll_ctl`
      Reviewed By: austin
      Differential Revision:
      GHC Trac Issues: #10317
  28. 28 May, 2015 1 commit
    • Austin Seipp's avatar
      base: fix #10298 & #7695 · e28462de
      Austin Seipp authored
      This applies a patch from Reid Barton and Sylvain Henry, which fix a
      disasterous infinite loop when iconv fails to load locale files, as
      specified in #10298.
      The fix is a bit of a hack but should be fine - for the actual reasoning
      behind it, see `Note [Disaster and iconv]` for more info.
      In addition to this fix, we also patch up the IO Encoding utilities to
      recognize several variations of the 'ASCII' encoding (including its
      aliases) directly so that GHC can do conversions without iconv. This
      allows a static binary to sit in an initramfs.
      Authored-by: rwbarton's avatarReid Barton <>
      Authored-by: default avatarSylvain Henry <>
      Signed-off-by: default avatarAustin Seipp <>
      Test Plan: Eyeballed it.
      Reviewers: rwbarton, hvr
      Subscribers: bgamari, thomie
      Differential Revision:
      GHC Trac Issues: #10298, #7695
  29. 01 May, 2015 1 commit
    • Simon Peyton Jones's avatar
      Move IP, Symbol, Nat to ghc-prim · 2f6a0ac7
      Simon Peyton Jones authored
      This motivation is to declare class IP much earlier (in ghc-prim),
      so that implicit parameters (which depend on IP) is available
      to library code, notably the 'error' function.
      * Move class IP from base:GHC.IP
                      to ghc-prim:GHC.Classes
      * Delete module GHC.IP from base
      * Move types Symbol and Nat
            from base:GHC.TypeLits
            to ghc-prim:GHC.Types
      There was a name clash in GHC.RTS.Flags, where I renamed
      the local type Nat to RtsNat.
  30. 25 Apr, 2015 2 commits
  31. 24 Apr, 2015 1 commit
  32. 14 Apr, 2015 1 commit
  33. 06 Apr, 2015 1 commit
  34. 25 Mar, 2015 1 commit
  35. 19 Mar, 2015 1 commit
  36. 18 Mar, 2015 1 commit