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 .
Repository mirroring has been paused due to too many failed attempts. It can be resumed by a project maintainer.
Last successful update .
 05 Mar, 2015 1 commit


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

 23 Jan, 2015 1 commit


David Feuer authored
Also remove foldr2/right rule to avoid possibly introducing bottoms with rules. This effectively reverts most of 488e95b4 Reviewed By: nomeata Differential Revision: https://phabricator.haskell.org/D602

 22 Jan, 2015 1 commit


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

 21 Jan, 2015 2 commits


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 reopening #10011

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

 14 Jan, 2015 1 commit


Fumiaki Kinoshita authored
As suggested in https://www.haskell.org/pipermail/libraries/2013October/021531.html this adds the following instances  `Show a => Show (Const a b)`  `Read a => Read (Const a b)`  `Eq a => Eq (Const a b)`  `Ord a => Ord (Const a b)` The Read/Show instances are defined in such a way as if `Const` was defined without recordsyntax (i.e. as `newtype Const a b = Const a`) Addresses #9984 Reviewed By: ekmett Differential Revision: https://phabricator.haskell.org/D619

 19 Dec, 2014 1 commit


Herbert Valerio Riedel authored
These two facilities provide some means to avoid the doublebreakage caused by first by the deprecation (see #2496), and then again by the actual future fieldremoval. See also https://groups.google.com/d/msg/haskellcorelibraries/q9HQlL_gnE/4lbb_mBjre8J for details about this library addition. Reviewed By: ekmett Differential Revision: https://phabricator.haskell.org/D577

 06 Dec, 2014 2 commits


Herbert Valerio Riedel authored
[skip ci]

Alex Petrov authored
Summary: This adds zeroinitialising versions of `malloc{,Bytes,Array,Array0}` * Add `calloc` and `callocBytes` to `Foreign.Marshal.Alloc`. * Add `callocArray` and `callocArray0` to `Foreign.Marshal.Array`. Reviewers: ekmett, duncan, austin, hvr Reviewed By: austin, hvr Subscribers: ezyang, simonmar, ekmett, duncan, thomie, carter Projects: #ghc Differential Revision: https://phabricator.haskell.org/D527 GHC Trac Issues: #9859

 02 Dec, 2014 1 commit


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

 25 Nov, 2014 1 commit


Herbert Valerio Riedel authored
[skip ci]

 24 Nov, 2014 2 commits


Herbert Valerio Riedel authored
See b0534f78 for more details [skip ci]

Ö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: https://phabricator.haskell.org/D306 GHC Trac Issues: #5364 Conflicts: includes/rts/Flags.h

 23 Nov, 2014 1 commit


Carter Schonwald authored
The actual typesignatures of the new instances are: instance Storable a => Storable (Complex a) instance (Storable a, Integral a) => Storable (Ratio a) See also https://groups.google.com/d/msg/haskellcorelibraries/mjBSo2CQ3LU/0gwg0QvviOIJ Addresses #9826 Reviewed By: ekmett Differential Revision: https://phabricator.haskell.org/D519

 22 Nov, 2014 1 commit


Herbert Valerio Riedel authored
This implements a `Natural` type for representing unsigned arbitrary precision integers. When available, `integergmp>=1.0.0`'s `BigNat` type is used as buildingblock to construct `Natural` as an algebraic datatype. 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 GHCspecific API, while `Numeric.Natural` provides the official & portable API. Reviewed By: austin, ekmett Differential Revision: https://phabricator.haskell.org/D473

 21 Nov, 2014 6 commits


spl authored
The new function `Data.Bits.toIntegralSized` provides a similar functionality to `fromIntegral` but adds validation that the argument fits in the result type's size. The implementation of `toIntegralSized` has been derived from `intCastMaybe` (which is part of Herbert Valerio Riedel's `intcast` package, see http://hackage.haskell.org/package/intcast) Addresses #9816 Reviewed By: ekmett, austin Differential Revision: https://phabricator.haskell.org/D512

Michael Snoyman authored
Defaults to using `show` to prevent any breakage of existing code. Also provide a custom implementation for `SomeException` which uses the underlying exception's `displayException`. Differential Revision: https://phabricator.haskell.org/D517

Alex Petrov authored
fillBytes uses 'memset' to fill a memory area with a given byte value. Reviewed By: austin, hvr Differential Revision: https://phabricator.haskell.org/D465

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: https://phabricator.haskell.org/D506

David Feuer authored
Summary: Fixes #9368 Reviewers: nomeata, hvr, ekmett, austin Reviewed By: ekmett, austin Subscribers: thomie, carter Differential Revision: https://phabricator.haskell.org/D498 GHC Trac Issues: #9368

Herbert Valerio Riedel authored
Summary: The `Data.OldList` module was originally created in 3daf0023 to provide a way to access the original listspecialised 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: https://phabricator.haskell.org/D513

 10 Nov, 2014 1 commit


Herbert Valerio Riedel authored
This also updates the `transformers` submodule to the just released `transformers0.4.2.0` package version. See #9664 for more details Reviewed By: austin, ekmett Differential Revision: https://phabricator.haskell.org/D313

 07 Nov, 2014 1 commit


thomie authored
This makes nub and nubBy behave as specified in the Haskell 98 Report. This reverts 0ad9def5, and fixes #3280, #7913 and #2528 (properly). Before this change, the output of `T2528` was (4x wrong): ``` [A,B] [1,2] False False ``` Reviewed By: dfeuer, ekmett, austin, hvr Differential Revision: https://phabricator.haskell.org/D238

 05 Nov, 2014 1 commit


bernalex authored
Niklas Hambüchen suggested that we add the dual of `subsequences`, isSubsequenceOf (like `isPrefixOf` to `inits` & `isSuffixOf` to `tails`). It was a simple and noncontroversial proposal which passed unanimously. For more details see the original proposal discussion at https://www.haskell.org/pipermail/libraries/2014November/024063.html Differential Revision: https://phabricator.haskell.org/D435 Signedoffby: Alexander Berntsen <alexander@plaimi.net>

 04 Nov, 2014 1 commit


David Feuer authored
Complete #9759. Use `coerce` to get nicer definitions of `Sum` and `Product`; update documentation for `First` and `Last`. Reviewed By: hvr Differential Revision: https://phabricator.haskell.org/D422

 31 Oct, 2014 1 commit


Herbert Valerio Riedel authored
The internal Unicode definitions were updated via d4fd1680 [skip ci]

 26 Oct, 2014 1 commit


Herbert Valerio Riedel authored
This adds the module `Data.Bifunctor` providing the `Bifunctor(bimap,first,second)` class and a couple of instances This module and the class were previously exported by the `bifunctors` package. In contrast to the original module all `INLINE` pragmas have been removed. Reviewed By: ekmett, austin, dolio Differential Revision: https://phabricator.haskell.org/D336

 18 Oct, 2014 2 commits


Herbert Valerio Riedel authored
With this change `Control.Monad.foldM` becomes an alias for `Data.Foldable.foldlM`. Reviewed By: austin, ekmett Differential Revision: https://phabricator.haskell.org/D251

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: https://phabricator.haskell.org/D311

 01 Oct, 2014 4 commits


David Feuer authored
analogously to mapM. Fixes #9546.

David Feuer authored
This fixes #9502.

David Feuer authored
This fixes #9355.

David Feuer authored
in order to make its RULES semantics preserving. This fixes #9495.

 28 Sep, 2014 1 commit


Herbert Valerio Riedel authored
Generalise `when`/`unless`from `Monad` to `Applicative` and `guard` from `MonadPlus` to `Alternative` respectively. This was made possible by the AMP and is somewhat related to #9586 (but generalising in the context of the AMP instead of the FTP) Reviewed By: ekmett, austin Differential Revision: https://phabricator.haskell.org/D253

 21 Sep, 2014 2 commits


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

Herbert Valerio Riedel authored
This flips the switch and replaces the entities in `Data.List`/`Control.Monad` conflicting with `Data.{Foldable,Traversable}` with reexports of the more general versions. As of this commit, the code below (which is also added as a testcase) 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

 20 Sep, 2014 3 commits


Herbert Valerio Riedel authored

Herbert Valerio Riedel authored
This replaces the entities in Data.List conflicting with Data.Foldable with reexports of the generalised version from Data.Foldable. As of this commit, the following 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 Prelude as X Reviewed By: austin, dfeuer, ekmett Differential Revision: https://phabricator.haskell.org/D229

Herbert Valerio Riedel authored
Turn `toList`, `elem`, `sum`, `product`, `maximum`, and `minimum` into `Foldable` methods. This helps avoiding regressions (and semantic differences) while implementing #9586 Reviewed By: austin, dfeuer, ekmett Differential Revision: https://phabricator.haskell.org/D231

 19 Sep, 2014 1 commit


Herbert Valerio Riedel authored
This was probably just an oversight. With this change the fixity matches that from `Data.List.{elem,notElem`}`. Addresses #9610 Reviewed By: austin, ekmett Differential Revision: https://phabricator.haskell.org/D227
