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 .
 23 Dec, 2015 1 commit


Eric Seidel authored
This introduces "freezing," an operation which prevents further locations from being appended to a CallStack. Library authors may want to prevent CallStacks from exposing implementation details, as a matter of hygiene. For example, in ``` head [] = error "head: empty list" ghci> head [] *** Exception: head: empty list CallStack (from implicit params): error, called at ... ``` including the callsite of `error` in `head` is not strictly necessary as the error message already specifies clearly where the error came from. So we add a function `freezeCallStack` that wraps an existing CallStack, preventing further callsites from being pushed onto it. In other words, ``` pushCallStack callSite (freezeCallStack callStack) = freezeCallStack callStack ``` Now we can define `head` to not produce a CallStack at all ``` head [] = let ?callStack = freezeCallStack emptyCallStack in error "head: empty list" ghci> head [] *** Exception: head: empty list CallStack (from implicit params): error, called at ... ```  1. We add the `freezeCallStack` and `emptyCallStack` and update the definition of `CallStack` to support this functionality. 2. We add `errorWithoutStackTrace`, a variant of `error` that does not produce a stack trace, using this feature. I think this is a sensible wrapper function to provide in case users want it. 3. We replace uses of `error` in base with `errorWithoutStackTrace`. The rationale is that base does not export any functions that use CallStacks (except for `error` and `undefined`) so there's no way for the stack traces (from Implicit CallStacks) to include userdefined functions. They'll only contain the call to `error` itself. As base already has a good habit of providing useful error messages that name the triggering function, the stack trace really just adds noise to the error. (I don't have a strong opinion on whether we should include this third commit, but the change was very mechanical so I thought I'd include it anyway in case there's interest) 4. Updates tests in `array` and `stm` submodules Test Plan: ./validate, new test is T11049 Reviewers: simonpj, nomeata, goldfire, austin, hvr, bgamari Reviewed By: simonpj Subscribers: thomie Projects: #ghc Differential Revision: https://phabricator.haskell.org/D1628 GHC Trac Issues: #11049

 21 Dec, 2015 6 commits


Ben Gamari authored

duairc authored
The following instances are added instance Bounded a => Bounded (Const a b) instance Enum a => Enum (Const a b) instance Ix a => Ix (Const a b) instance Storable a => Storable (Const a b) instance Bounded a => Bounded (Identity a) instance Enum a => Enum (Identity a) instance Ix a => Ix (Identity a) instance Semigroup a => Semigroup (Identity a) instance Storable a => Storable (Identity a) Reviewers: ekmett, RyanGlScott, rwbarton, hvr, austin, bgamari Reviewed By: RyanGlScott, hvr Subscribers: rwbarton, RyanGlScott, thomie Differential Revision: https://phabricator.haskell.org/D1626 GHC Trac Issues: #11210

Ryan Scott authored
This augments `MetaSel` with a `Bang` field, which gives generic programmers access to the following information about each field selector: * `SourceUnpackedness`: whether a field was marked `{# NOUNPACK #}`, `{# UNPACK #}`, or not * `SourceStrictness`: whether a field was given a strictness (`!`) or laziness (`~`) annotation * `DecidedStrictness`: what strictness GHC infers for a field during compilation, which may be influenced by optimization levels, `XStrictData`, `funboxstrictfields`, etc. Unlike in Phab:D1603, generics does not grant a programmer the ability to "splice" in metadata, so there is no issue including `DecidedStrictness` with `Bang` (whereas in Template Haskell, it had to be split off). One consequence of this is that `MetaNoSel` had to be removed, since it became redundant. The `NoSelector` empty data type was also removed for similar reasons. Fixes #10716. Test Plan: ./validate Reviewers: dreixel, goldfire, kosmikus, austin, hvr, bgamari Reviewed By: bgamari Subscribers: thomie Differential Revision: https://phabricator.haskell.org/D1646 GHC Trac Issues: #10716

dolio authored
 This part of the proposal is to add log1p, expm1, log1pexp and log1mexp to the Floating class, and export the full Floating class from Numeric Reviewers: ekmett, #core_libraries_committee, bgamari, hvr, austin Reviewed By: ekmett, #core_libraries_committee, bgamari Subscribers: Phyx, RyanGlScott, ekmett, thomie Differential Revision: https://phabricator.haskell.org/D1605 GHC Trac Issues: #11166

duairc authored
`Const` from `Control.Applicative` can trivially be made kindpolymorphic in its second argument. There has been a Trac issue about this for nearly a year now. It doesn't look like anybody objects to it, so I figured I might as well make a patch. Trac Issues: #10039, #10865, #11135 Differential Revision: https://phabricator.haskell.org/D1630 Reviewers: ekmett, hvr, bgamari Subscribers: RyanGlScott, thomie

dolio authored
The new instance resolves to `s ~ [Char]` as soon as we know that `s ~ [a]`, to avoid certain functions (like (++)) causing a situation where `a` is ambiguous and (currently) unable to be defaulted. Reviewers: #core_libraries_committee, hvr, austin, bgamari Reviewed By: hvr, bgamari Subscribers: thomie Differential Revision: https://phabricator.haskell.org/D1572 GHC Trac Issues: #10814

 17 Dec, 2015 1 commit


Ryan Scott authored
These modules were previously provided by the `transformers` package. Hence the submodule update. This patch was originally contributed by M FarkasDyck and subsequently taken over and completed by Ryan. The original proposal discussion can be found at https://mail.haskell.org/pipermail/libraries/2015July/026014.html This addresses #11135 Differential Revision: https://phabricator.haskell.org/D1543

 12 Dec, 2015 1 commit


Eric Seidel authored
We can't just solve CallStack constraints indiscriminately when they occur in the RHS of a letbinder. The toplevel given CallStack (if any) will not be in scope, so I've reworked the CallStack solver as follows: 1. CallStacks are treated like regular IPs unless one of the following two rules apply. 2. In a function call, we push the callsite onto a NEW wanted CallStack, which GHC will solve as a regular IP (either directly from a given, or by quantifying over it in a local let). 3. If, after the constraint solver is done, any wanted CallStacks remain, we default them to the empty CallStack. This rule exists mainly to clean up after rule 2 in a toplevel binder with no given CallStack. In rule (2) we have to be careful to emit the new wanted with an IPOccOrigin instead of an OccurrenceOf origin, so rule (2) doesn't fire again. This is a bit shady but I've updated the Note to explain the trick. Test Plan: validate Reviewers: simonpj, austin, bgamari, hvr Reviewed By: simonpj, bgamari Subscribers: thomie Differential Revision: https://phabricator.haskell.org/D1422 GHC Trac Issues: #10845

 07 Dec, 2015 1 commit


Ryan Scott authored
Test Plan: Validate. Reviewers: simonpj, goldfire, hvr, dreixel, kosmikus, austin, bgamari Reviewed By: kosmikus, austin, bgamari Subscribers: RyanGlScott, Fuuzetsu, bgamari, thomie, carter, dreixel Differential Revision: https://phabricator.haskell.org/D493 GHC Trac Issues: #9766

 18 Nov, 2015 1 commit


Ben Gamari authored
Test Plan: Read Reviewers: yav, hvr, austin Reviewed By: austin Subscribers: thomie Differential Revision: https://phabricator.haskell.org/D1490

 16 Nov, 2015 1 commit


Ben Gamari authored
Generalize `filterM`, `mapAndUnzipM`, `zipWithM`, `zipWithM_`, `replicateM`, and `replicateM_`. Reviewers: ekmett, #core_libraries_committee, austin, hvr, bgamari Reviewed By: ekmett, #core_libraries_committee, bgamari Subscribers: ekmett, glguy, thomie Projects: #ghc Differential Revision: https://phabricator.haskell.org/D1324 GHC Trac Issues: #10168

 03 Nov, 2015 2 commits


Herbert Valerio Riedel authored
This requires adding a new primitive `mplusIO` to `GHC.IO` Update transformers submodule to accomodate extant orphan instances. Reviewed By: austin, bgamari Differential Revision: https://phabricator.haskell.org/D1148 GHC Trac Issues: #10755

Herbert Valerio Riedel authored
This is based on David's initial patch augmented by more extensive Haddock comments. This has been broken out of D1248 to reduce its size by splitting the patch into smaller logical pieces. On its own, this new module does nothing interesting yet. Later patches will add support for a different desugaring of `do`blocks, at which point the new `MonadFail` class will become more useful. Reviewed By: ekmett, austin Differential Revision: https://phabricator.haskell.org/D1424

 02 Nov, 2015 1 commit


Ben Gamari authored

 01 Nov, 2015 1 commit


Herbert Valerio Riedel authored
This also relaxes a few upper bounds on base in the ghc.git repo; This required a massrewrite in testsuite/ sed i s,base4.8.2.0,base4.9.0.0,g $(git grep Fl 'base4.8.2.0') because it turns out the testsuite is still sensitive to package version changes.

 19 Oct, 2015 1 commit


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: https://phabricator.haskell.org/D1327 GHC Trac Issues: #10149

 17 Oct, 2015 1 commit


Ryan Scott authored
See Trac #10773 Remove Control.Monad.IO.Class from `transformers`. Updates `transformers` submodule. See Trac #10773 Test Plan: ./validate Reviewers: ekmett, hvr, bgamari, austin Reviewed By: hvr, bgamari, austin Subscribers: thomie Differential Revision: https://phabricator.haskell.org/D1147 GHC Trac Issues: #10773

 16 Oct, 2015 1 commit


Austin Seipp authored
Signedoffby: Austin Seipp <austin@welltyped.com>

 13 Oct, 2015 1 commit


joeyadams authored
Fixes #8010, according to the specified libraries proposal. [1] Also, some minor wordsmithing. [1] http://thread.gmane.org/gmane.comp.lang.haskell.libraries/22709 Signedoffby: Austin Seipp <austin@welltyped.com>

 10 Oct, 2015 1 commit


Ben Gamari authored
This can happen because the underlying primitive operations in `integergmp` don't support negative shiftamounts, and since `integergmp` can't throw proper exceptions and just provides a lowlevel API, it simply segfaults instead... This patch simply removes the `shift{L,R}` method definitions (and defines `unsafeShift{L,R}` instead) whose defaultimpls fallback on using `shift` which properly handles negative shift arguments. This addresses #10571 Test Plan: harbormaster can do it Reviewers: hvr, austin, rwbarton Subscribers: rwbarton, thomie, bgamari Differential Revision: https://phabricator.haskell.org/D1018 GHC Trac Issues: #10571

 03 Oct, 2015 1 commit


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 specialcase unboxed types. Fixes #10868. Test Plan: ./validate Reviewers: goldfire, dreixel, bgamari, austin, hvr, kosmikus Reviewed By: dreixel, kosmikus Subscribers: simonpj, thomie Differential Revision: https://phabricator.haskell.org/D1239 GHC Trac Issues: #10868

 02 Oct, 2015 1 commit


Herbert Valerio Riedel authored
This implements phase 1 of the semigroupasmonoidsuperclass proposal (https://ghc.haskell.org/wiki/Proposal/SemigroupMonoid). The modules were migrated from the `semigroups0.17` release mostly asis, except for dropping several trivial `{# INLINE #}`s, removing CPP usage, and instances for types & classes provided outside of `base` (e.g. `containers`, `deepseq`, `hashable`, `tagged`, `bytestring`, `text`) Differential Revision: https://phabricator.haskell.org/D1284

 29 Aug, 2015 1 commit


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 polykinded, 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: https://phabricator.haskell.org/D1166 GHC Trac Issues: #10775

 07 Aug, 2015 1 commit


Herbert Valerio Riedel authored
[skip ci]

 06 Aug, 2015 1 commit


Fumiaki Kinoshita authored
This patch adds following instances: * Foldable ZipList * Traversable ZipList * Functor Complex * Applicative Complex * Monad Complex * Foldable Complex * Traversable Complex * Generic1 Complex * Monoid a => Monoid (Identity a) * Storable () Reviewers: ekmett, fumieval, hvr, austin Subscribers: thomie, #core_libraries_committee Projects: #core_libraries_committee Differential Revision: https://phabricator.haskell.org/D1049 GHC Trac Issues: #10609

 05 Aug, 2015 1 commit


Ryan Scott authored
Certain instances of `Exception` are simply datatypes with only one argument, which should be `newtype`s. Reviewers: ekmett, hvr, austin, bgamari Reviewed By: bgamari Subscribers: thomie Differential Revision: https://phabricator.haskell.org/D1131 GHC Trac Issues: #10738

 30 Jul, 2015 1 commit


Ben Gamari authored
This fixes #9516. Differential Revision: https://phabricator.haskell.org/D181 Authoredby: Edsko de Vries <edsko@welltyped.com>

 07 Jul, 2015 2 commits


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: https://phabricator.haskell.org/D1030 GHC Trac Issues: #9970

Ben Gamari authored
This generalizes forever to depend on Applicative, rather than Monad. This was proposed a month ago (https://mail.haskell.org/pipermail/libraries/2015May/025711.html). Differential Revision: https://phabricator.haskell.org/D1045

 03 Jul, 2015 1 commit


Ryan Scott authored
This generalizes the type signatures of `traceM` and `traceShowM` to use `Applicative` rather than `Monad`. Reviewers: austin, ekmett, hvr, bgamari Reviewed By: ekmett, hvr, bgamari Subscribers: thomie, bgamari Differential Revision: https://phabricator.haskell.org/D1029 GHC Trac Issues: #10023

 16 Jun, 2015 1 commit


Gabriel439 authored
See original proposal at https://mail.haskell.org/pipermail/libraries/2014November/024310.html for more details Reviewed By: hvr, austin Differential Revision: https://phabricator.haskell.org/D988 GHC Trac Issues: #10523

 25 Apr, 2015 2 commits


Ben Gamari authored
This was an unfortunate oversight in the original event manager rework patch. Fixes #10308 Differential Revision: https://phabricator.haskell.org/D845

Herbert Valerio Riedel authored
This is needed because GHC 7.10.2 requires a minor version bump to base4.8.1.0 Several test outputs needed base4.8.1.0 replaced by base4.8.2.0

 14 Apr, 2015 2 commits


Herbert Valerio Riedel authored
Reviewed By: austin Differential Revision: https://phabricator.haskell.org/D827

Herbert Valerio Riedel authored
Reviewed By: austin Differential Revision: https://phabricator.haskell.org/D830

 03 Apr, 2015 1 commit


Ben Gamari authored
Reviewed By: hvr, austin Differential Revision: https://phabricator.haskell.org/D770

 25 Mar, 2015 1 commit


Fumiaki Kinoshita authored
This was proposed a couple of times in the past, e.g.  https://mail.haskell.org/pipermail/libraries/2011November/017153.html  https://mail.haskell.org/pipermail/libraries/2013July/020446.html but its implementation had been blocked by the fact that `Monoid` wasn't in scope where the `Monad` class was defined. Since the AMP/FTP restructuring this is no longer the case.

 23 Mar, 2015 1 commit


Herbert Valerio Riedel authored
Turns out we've been a bit too lazy and quite a few undocumented changes have accumulated in `base` relative to GHC 7.10's `base4.8.0.0`... [skip ci]

 17 Mar, 2015 1 commit


Austin Seipp authored
Signedoffby: Austin Seipp <austin@welltyped.com>
