This project is mirrored from https://gitlab.haskell.org/ghc/ghc.git. 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 Nov, 2014 2 commits
  2. 23 Nov, 2014 1 commit
  3. 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: https://phabricator.haskell.org/D473
      8a8cdbbf
  4. 21 Nov, 2014 6 commits
  5. 10 Nov, 2014 1 commit
  6. 07 Nov, 2014 1 commit
  7. 05 Nov, 2014 1 commit
  8. 04 Nov, 2014 1 commit
  9. 31 Oct, 2014 1 commit
  10. 26 Oct, 2014 1 commit
  11. 18 Oct, 2014 2 commits
  12. 01 Oct, 2014 4 commits
  13. 28 Sep, 2014 1 commit
  14. 21 Sep, 2014 2 commits
    • Herbert Valerio Riedel's avatar
      Export `Monoid(..)`/`Foldable(..)`/`Traversable(..)` from Prelude · b8f58392
      Herbert Valerio Riedel authored
      This finally exposes also the methods of these 3 classes in the Prelude
      in order to allow to define basic class instances w/o needing imports.
      
      This almost completes the primary goal of #9586
      
      NOTE: `fold`, `foldl'`, `foldr'`, and `toList` are not exposed yet,
            as they require upstream fixes for at least `containers` and
            `bytestring`, and are not required for defining basic instances.
      
      Reviewed By: ekmett, austin
      
      Differential Revision: https://phabricator.haskell.org/D236
      b8f58392
    • Herbert Valerio Riedel's avatar
      Generalise Data.List/Control.Monad to Foldable/Traversable · 1f7f46f9
      Herbert Valerio Riedel authored
      This flips the switch and replaces the entities in
      `Data.List`/`Control.Monad` conflicting with
      `Data.{Foldable,Traversable}` with re-exports of the more general
      versions.
      
      As of this commit, the code below (which is also added as a test-case)
      compiles w/o error.
      
          module XPrelude (module X) where
      
          import Control.Monad     as X
          import Data.Foldable     as X
          import Data.List         as X
          import Data.Monoid       as X
          import Data.Traversable  as X
          import Prelude           as X
      
      This addresses #9568
      
      Reviewed By: ekmett, austin
      
      Differential Revision: https://phabricator.haskell.org/D235
      1f7f46f9
  15. 20 Sep, 2014 3 commits
  16. 19 Sep, 2014 1 commit
  17. 09 Sep, 2014 1 commit
  18. 04 Sep, 2014 1 commit
  19. 31 Aug, 2014 2 commits
    • Herbert Valerio Riedel's avatar
      Add `FiniteBits(count{Leading,Trailing}Zeros)` · a8a969ae
      Herbert Valerio Riedel authored
      This exposes the newly added CLZ/CTZ primops from
      e0c1767d (re #9340)
      via two new methods `countLeadingZeros` and `countTrailingZeros`
      in the `Data.Bits.FiniteBits` class.
      
      The original proposal can be found at
      
        http://www.haskell.org/pipermail/libraries/2014-August/023567.html
      
      Test Plan: successful validate
      
      Reviewers: ekmett, tibbe
      
      GHC Trac Issues: #9532
      
      Differential Revision: https://phabricator.haskell.org/D158
      a8a969ae
    • Herbert Valerio Riedel's avatar
      Re-export Word from Prelude (re #9531) · 393b8202
      Herbert Valerio Riedel authored
      The original proposal text can be found at
      
        http://www.haskell.org/pipermail/libraries/2014-August/023491.html
      
      The proposal passed with a clear majority, and was additionally
      confirmed by the core libraries committee.
      
      *Compatibility Note*
      
      Only code that imports `Data.Word` for the sole purpose of using `Word`
      *and* requires to be `-Werror`-clean (due to `-fwarn-unused-imports`)
      is affected by this change.
      
      In order to write warning-free forward/backward compatible against `base`,
      a variant of the following CPP-based snippet can be used:
      
        -- Starting with base>4.7.0 or GHC>7.8 Prelude re-exports 'Word'
        -- The following is needed, if 'Word' is the *only* entity needed from Data.Word
        #ifdef MIN_VERSION_base
        # if !MIN_VERSION_base(4,7,1)
        import Data.Word (Word)
        # endif
        -- no cabal_macros.h -- fallback to __GLASGOW_HASKELL__
        #elif __GLASGOW_HASKELL__ < 709
        import Data.Word (Word)
        #endif
      
      This also updates the haddock submodule in order to avoid a compile warning
      393b8202
  20. 19 Aug, 2014 2 commits
    • bernalex's avatar
      Make Prelude.signum handle -0.0 correctly (#7858) · d9a20573
      bernalex authored
      
      
      Summary:
      Make the `Float` and `Double` implementations of `signum` handle -0.0
      correctly per IEEE-754.
      
      This, together with "Make Prelude.abs handle -0.0 correctly (#7858)",
      fixes Trac #7858.
      
      Depends on D145
      Signed-off-by: bernalex's avatarAlexander Berntsen <alexander@plaimi.net>
      
      Test Plan:
      signum of (-0.0) should be (-0.0) not 0.0.
      
      Test program:
      
        main =
          putStrLn $ p ++ " " ++ n
          where
            f = show . signum
            p = f (-0.0 :: Double)
          n = f (0.0 :: Double)
      
      Reviewers: ekmett, hvr, rwbarton, austin
      
      Reviewed By: austin
      
      Subscribers: phaskell, simonmar, relrod, ezyang, carter
      
      Differential Revision: https://phabricator.haskell.org/D148
      
      GHC Trac Issues: #7858
      d9a20573
    • bernalex's avatar
      Make Prelude.abs handle -0.0 correctly (#7858) · 6f6ee6ea
      bernalex authored
      
      
      Summary:
      Make the `Float` and `Double` implementations of `abs` handle -0.0
      correctly per IEEE-754.
      
      abs (-0.0::Float) and abs (-0.0::Double) previously returned -0.0, when
      they should return 0.0. This patch fixes this.
      Signed-off-by: bernalex's avatarAlexander Berntsen <alexander@plaimi.net>
      
      Test Plan: abs (-0.0::Double) should = 0.0 instead of (-0.0)
      
      Reviewers: ekmett, hvr, austin, rwbarton
      
      Reviewed By: austin, rwbarton
      
      Subscribers: phaskell, trofi, simonmar, relrod, ezyang, carter
      
      Differential Revision: https://phabricator.haskell.org/D145
      
      GHC Trac Issues: #7858
      6f6ee6ea
  21. 20 Jul, 2014 1 commit
  22. 11 Jul, 2014 1 commit
  23. 14 May, 2014 1 commit
  24. 21 Apr, 2014 1 commit
  25. 19 Apr, 2014 1 commit
    • Herbert Valerio Riedel's avatar
      Weaken constraints on Data.Complex functions · 7b04d35a
      Herbert Valerio Riedel authored
      The RealFloat data type context was dropped from Data.Complex some time
      ago (see ea280135). However, the rest of
      the API in that module was left as-is even though many of the accessors
      in that module would work with much more general types now.
      
      This change simplifies the signatures of the functions above, which in
      the current API all unnecessarily take a RealFloat constraint that they
      don't use (and which may cause to pass around superflous type-class
      dictionaries):
      
          realPart  :: Complex a -> a
          imagPart  :: Complex a -> a
          conjugate :: Num a => Complex a -> Complex a
          mkPolar   :: Floating a => a -> a -> Complex a
          cis       :: Floating a => a -> Complex a
      
      This was originally proposed by Edward Kmett in
      
        http://www.haskell.org/pipermail/libraries/2014-March/022358.html
      
      Signed-off-by: Herbert Valerio Riedel's avatarHerbert Valerio Riedel <hvr@gnu.org>
      7b04d35a