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. 05 Mar, 2015 1 commit
    • Herbert Valerio Riedel's avatar
      Add public rnf/hash operations to TypeRep/TyCon · 56e0ac98
      Herbert Valerio Riedel authored
      Summary:
      `TyCon` and `TypeRep` are supposed to be abstract, by providing these
      additional few public operations the need to import
      `Data.Typeable.Internal` is reduced, and future changes to the internal
      structure of `TypeRep`/`TyCon` shouldn't require changes in packages such as
      `deepseq` or `hashable` anymore (hopefully).
      
      Reviewers: ekmett, simonpj, tibbe, austin
      
      Reviewed By: ekmett, simonpj, austin
      
      Subscribers: thomie
      
      Differential Revision: https://phabricator.haskell.org/D699
      56e0ac98
  2. 23 Jan, 2015 1 commit
  3. 22 Jan, 2015 1 commit
    • Herbert Valerio Riedel's avatar
      Restore invariant in `Data (Ratio a)` instance · 3df429e2
      Herbert Valerio Riedel authored
      (2nd attempt, this time leaving the `Constr` using `":%"`)
      
      The Data instance for `Ratio` just uses the raw `:%` constructor and
      doesn't check that the result is reduced to normal form.
      
      The fix is to add back the `Integral` constraint on the Data
      instance (which was dropped in c409b6f3) and to use `%` rather
      than `:%` in the `gfoldl` and `gunfold` implementation.
      
      This restores the invariant and matches the behavior of "virtual
      constructors" we've used to patch up such problems elsewhere.
      
      This addresses #10011
      
      Reviewed By: ekmett, austin
      
      Differential Revision: https://phabricator.haskell.org/D625
      3df429e2
  4. 21 Jan, 2015 2 commits
    • Herbert Valerio Riedel's avatar
      Revert "Restore invariant in `Data (Ratio a)` instance" · 22c4d60b
      Herbert Valerio Riedel authored
      This reverts commit 79b0d0e6
      due to
      
        Compile failed (status 256) errors were:
        [1 of 2] Compiling A                ( A.hs, A.o )
        [2 of 2] Compiling Main             ( T4491.hs, T4491.o )
        T4491.hs:19:11:
          Illegal data constructor name: ‘%’
          When splicing a TH expression: (GHC.Real.%) 11 2
          In the splice: $(dataToExpQ (const Nothing) (5.5 :: Rational))
        *** unexpected failure for T4491(normal)
      
      Therefore re-opening #10011
      22c4d60b
    • Herbert Valerio Riedel's avatar
      Restore invariant in `Data (Ratio a)` instance · 79b0d0e6
      Herbert Valerio Riedel authored
      The Data instance for `Ratio` just uses the raw `:%` constructor and
      doesn't check that the result is reduced to normal form.
      
      The fix is to add back the `Integral` constraint on the Data
      instance (which was dropped in c409b6f3) and to use `%` rather
      than `:%` in the `gfoldl` and `gunfold` implementation.
      
      This restores the invariant and matches the behavior of "virtual
      constructors" we've used to patch up such problems elsewhere.
      
      This addresses #10011
      
      Reviewed By: ekmett, austin
      
      Differential Revision: https://phabricator.haskell.org/D625
      79b0d0e6
  5. 14 Jan, 2015 1 commit
  6. 19 Dec, 2014 1 commit
  7. 06 Dec, 2014 2 commits
  8. 02 Dec, 2014 1 commit
    • puffnfresh's avatar
      Make `read . show = id` for Data.Fixed (fix #9240) · 7c38e985
      puffnfresh authored
      The QuickCheck property now succeeds:
      
          prop :: Fixed B7 -> Bool
          prop a = read (show a) == a
      
      This changes the Show instance for Fixed to round up, rather than down
      when calculating a digit. This needs to happen because Read also
      rounds down:
      
          data B7
      
          instance HasResolution B7 where
            resolution _ = 128
      
          1 / 128 = 0.0078125
      
          read "0.007" = (0.000 :: Fixed B7)
      
      Here is an example of the change to Show:
      
          showFixed False (0.009 :: Fixed B7)
      
          -- Broken: "0.007"
          -- Fixed:  "0.008"
      
      And now Read can continue to round down:
      
          read "0.008" = (0.0078125 :: Fixed B7)
      
      Reviewed By: hvr, ekmett
      
      Differential Revision: https://phabricator.haskell.org/D547
      7c38e985
  9. 25 Nov, 2014 1 commit
  10. 24 Nov, 2014 2 commits
  11. 23 Nov, 2014 1 commit
  12. 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
  13. 21 Nov, 2014 6 commits
  14. 10 Nov, 2014 1 commit
  15. 07 Nov, 2014 1 commit
  16. 05 Nov, 2014 1 commit
  17. 04 Nov, 2014 1 commit
  18. 31 Oct, 2014 1 commit
  19. 26 Oct, 2014 1 commit
  20. 18 Oct, 2014 2 commits
  21. 01 Oct, 2014 4 commits
  22. 28 Sep, 2014 1 commit
  23. 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
  24. 20 Sep, 2014 3 commits
  25. 19 Sep, 2014 1 commit