5 years agoExport `Monoid(..)`/`Foldable(..)`/`Traversable(..)` from Prelude
Herbert Valerio Riedel [Sun, 21 Sep 2014 21:22:19 +0000 (23:22 +0200)] 
Export `Monoid(..)`/`Foldable(..)`/`Traversable(..)` from Prelude

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:

5 years agoGeneralise Data.List/Control.Monad to Foldable/Traversable
Herbert Valerio Riedel [Sun, 21 Sep 2014 17:15:46 +0000 (19:15 +0200)] 
Generalise Data.List/Control.Monad to Foldable/Traversable

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

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:

5 years agoMove `mapM` and `sequence` to GHC.Base and break import-cycles
Herbert Valerio Riedel [Sun, 21 Sep 2014 17:14:04 +0000 (19:14 +0200)] 
Move `mapM` and `sequence` to GHC.Base and break import-cycles

This simplifies the import graph and more importantly removes import
cycles that arise due to `Control.Monad` & `Data.List` importing
`Data.Traversable` (preparation for #9586)

Reviewed By: ekmett, austin

Differential Revision:

5 years agoMake libffi install into a predictable directory (#9620)
Reid Barton [Sun, 21 Sep 2014 12:53:37 +0000 (08:53 -0400)] 
Make libffi install into a predictable directory (#9620)

On some systems (depending on gcc multilib configuration) libffi
would install into libffi/build/inst/lib64 even though we configure
it with --libdir=libffi/build/inst/lib. There appears to be no way
to get libffi to install to a predictable directory "out of the box",
so we apply a small patch to This is the same fix used
in Gentoo's ebuild (

5 years agoUpdate haskell2010, haskell98, and array submodules
Herbert Valerio Riedel [Sun, 21 Sep 2014 09:27:08 +0000 (11:27 +0200)] 
Update haskell2010, haskell98, and array submodules

The changes are purely cleanups to improve forward compatibility
to help with the Foldable/Traversal changes ahead.

5 years agoSimplify import-graph a bit more
Herbert Valerio Riedel [Sun, 21 Sep 2014 08:46:19 +0000 (10:46 +0200)] 
Simplify import-graph a bit more

This is preparatory refactoring for avoiding import cycles
when `Data.Traversable` will be imported by `Control.Monad` and
`Data.List` for implementing #9586

5 years agoAdd missing changelog entries for current state of #9586
Herbert Valerio Riedel [Sat, 20 Sep 2014 21:58:12 +0000 (23:58 +0200)] 
Add missing changelog entries for current state of #9586

5 years agoGeneralise (some of) Data.List to Foldables (re #9568)
Herbert Valerio Riedel [Sat, 20 Sep 2014 21:50:06 +0000 (23:50 +0200)] 
Generalise (some of) Data.List to Foldables (re #9568)

This replaces the entities in Data.List conflicting with Data.Foldable
with re-exports 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:

5 years agoTurn a few existing folds into `Foldable`-methods (#9621)
Herbert Valerio Riedel [Sat, 20 Sep 2014 21:43:23 +0000 (23:43 +0200)] 
Turn a few existing folds into `Foldable`-methods (#9621)

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:

5 years agoSet up framework for generalising Data.List to Foldables
Herbert Valerio Riedel [Sat, 20 Sep 2014 21:32:06 +0000 (23:32 +0200)] 
Set up framework for generalising Data.List to Foldables

This renames the Data.List module to Data.OldList, and puts a new
Data.List module into its place re-exporting all list functions.

The plan is to leave the monomorphic versions of the list functions in
Data.OldList to help smooth the transition.

The new Data.List module then will simply re-export entities from
Data.OldList and Data.Foldable.

This refactoring has been placed in a separate commit to be able to
better isolate any regressions caused by the actual list function
generalisations when implementing #9586

This also updates the haskell2010, haskell98, and array submodules

Reviewed By: austin, ekmett

Differential Revision:

5 years agoChange linker message verbosity to `-v2` (re #7863)
Herbert Valerio Riedel [Sat, 20 Sep 2014 19:23:28 +0000 (21:23 +0200)] 
Change linker message verbosity to `-v2` (re #7863)

With this change, the linker status logging output such as

    Loading package ghc-prim ... linking ... done.
    Loading package integer-gmp ... linking ... done.
    Loading package base ... linking ... done.

is suppressed unless verbosity level is `-v2` or higher. This is done
to reduce the compiler message noise when TH is involved, which can
reduce the visibiliy of compile warnings.

Reviewed By: ekmett, austin

Differential Revision:

5 years agoDeactive T4801 `max_bytes_used`-check & bump T3064 numbers
Herbert Valerio Riedel [Sat, 20 Sep 2014 19:19:28 +0000 (21:19 +0200)] 
Deactive T4801 `max_bytes_used`-check & bump T3064 numbers

T4801 is deactived for now because it's currently too volatile
and causes too much noise in Phabricator's CI

Reviewed By: austin

Differential Revision:

5 years agoFix potential `mingw32_HOST_OS` -Werror failure
Herbert Valerio Riedel [Sat, 20 Sep 2014 17:11:48 +0000 (19:11 +0200)] 
Fix potential `mingw32_HOST_OS` -Werror failure

5 years agoFix potential `mingw32_HOST_OS` breakage from eae19112462fe77
Herbert Valerio Riedel [Sat, 20 Sep 2014 15:37:24 +0000 (17:37 +0200)] 
Fix potential `mingw32_HOST_OS` breakage from eae19112462fe77

5 years agoTypos
Krzysztof Gogolewski [Fri, 19 Sep 2014 17:27:34 +0000 (19:27 +0200)] 

5 years agoDefine fixity for `Data.Foldable.{elem,notElem}`
Herbert Valerio Riedel [Fri, 19 Sep 2014 15:53:33 +0000 (17:53 +0200)] 
Define fixity for `Data.Foldable.{elem,notElem}`

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:

5 years agoFixup overlooked `unless` occurence
Herbert Valerio Riedel [Fri, 19 Sep 2014 14:49:20 +0000 (16:49 +0200)] 
Fixup overlooked `unless` occurence

This was broken in eae19112462fe77a3f1298bff12b409b205a581d

5 years agoClean up Coercible handling, and interaction of data families with newtypes
Simon Peyton Jones [Thu, 18 Sep 2014 15:19:55 +0000 (16:19 +0100)] 
Clean up Coercible handling, and interaction of data families with newtypes

This patch fixes Trac #9580, in which the Coercible machinery succeeded
even though the relevant data constructor was not in scope.

As usual I got dragged into a raft of refactoring changes,
all for the better.

* Delete TcEvidence.coercionToTcCoercion (now unused)

* Move instNewTyConTF_maybe, instNewTyCon_maybe to FamInst,
  and rename them to tcInstNewTyConTF_maybe, tcInstNewTyCon
  (They both return TcCoercions.)

* tcInstNewTyConTF_maybe also gets more convenient type,
  which improves TcInteract.getCoercibleInst

* Define FamInst.tcLookupDataFamInst, and use it in TcDeriv,
  (as well as in tcInstNewTyConTF_maybe)

* Improve error report for Coercible errors, when data familes
  are involved  Another use of tcLookupDataFamInst

* In TcExpr.tcTagToEnum, use tcLookupDataFamInst to replace
  local hacky code

* Fix Coercion.instNewTyCon_maybe and Type.newTyConInstRhs to deal
  with eta-reduced newtypes, using
  (new) Type.unwrapNewTyConEtad_maybe and (new) Type.applyTysX

Some small refactoring of TcSMonad.matchFam.

5 years agoWhite space only
Simon Peyton Jones [Thu, 18 Sep 2014 15:05:14 +0000 (16:05 +0100)] 
White space only

5 years agoDefine Util.leLength :: [a] -> [b] -> Bool
Simon Peyton Jones [Thu, 18 Sep 2014 15:04:41 +0000 (16:04 +0100)] 
Define Util.leLength :: [a] -> [b] -> Bool

5 years agoFix garbled comment wording
Simon Peyton Jones [Tue, 9 Sep 2014 12:00:18 +0000 (13:00 +0100)] 
Fix garbled comment wording

Thanks to Gabor for pointing this out

5 years agoTypo in comment in GHC.Generics
Simon Peyton Jones [Tue, 9 Sep 2014 11:58:25 +0000 (12:58 +0100)] 
Typo in comment in GHC.Generics

Fixes Trac #9523

5 years agoUse mapAccumL (refactoring only)
Simon Peyton Jones [Tue, 9 Sep 2014 11:57:04 +0000 (12:57 +0100)] 
Use mapAccumL (refactoring only)

Fixes Trac #9529

5 years agoSpelling error in flags.xml
Simon Peyton Jones [Tue, 9 Sep 2014 11:56:31 +0000 (12:56 +0100)] 
Spelling error in flags.xml

Fixes Trac #9528

5 years agoIncrease -fcontext-stack=N default to 100
Simon Peyton Jones [Tue, 9 Sep 2014 11:52:18 +0000 (12:52 +0100)] 
Increase -fcontext-stack=N default to 100

This addresses Trac #5395

5 years agoAuto-derive a few manually coded Show instances
Herbert Valerio Riedel [Fri, 19 Sep 2014 08:25:34 +0000 (10:25 +0200)] 
Auto-derive a few manually coded Show instances

In `base`, the instances

  instance Show ()
  instance Show Bool
  instance Show Ordering
  instance Show a => Show (Maybe a)

where defined manually, even though we can leverage GHC's auto-deriver
which is perfectly capable by standalone derivation to avoid boiler-plate
code such as this.

Reviewed By: austin

Differential Revision:

5 years agoRevert accidental wip/generics-propeq-conservative merge
Herbert Valerio Riedel [Fri, 19 Sep 2014 08:13:16 +0000 (10:13 +0200)] 
Revert accidental wip/generics-propeq-conservative merge

This commit reverts the commits

   e12a6a8 Propositional equality for Datatype meta-information
   0a8e6fc Make constructor metadata parametrized (with intended parameter <- datatype)
   f097b77 Implement sameConstructor
   cc618e6 get roles right and fix a FIXME
   79c7125 Actually parametrize the Constructor with the Datatype
   7bd4bab Supply a reasonable name (should be derived from d_name tho)
   09fcd70 Use 'd_name' as the name (should be derived from d_name tho)
   4d90e44 Add default case (fixes -Werror)

and effectively resets ghc.git to the state it was at commit

5 years agoAdd default case (fixes -Werror)
Gabor Greif [Fri, 19 Sep 2014 04:23:58 +0000 (06:23 +0200)] 
Add default case (fixes -Werror)

5 years agoUse 'd_name' as the name (should be derived from d_name tho)
Gabor Greif [Wed, 17 Sep 2014 08:56:20 +0000 (10:56 +0200)] 
Use 'd_name' as the name (should be derived from d_name tho)

5 years agoSupply a reasonable name (should be derived from d_name tho)
Gabor Greif [Wed, 17 Sep 2014 05:46:39 +0000 (07:46 +0200)] 
Supply a reasonable name (should be derived from d_name tho)

5 years agoActually parametrize the Constructor with the Datatype
Gabor Greif [Wed, 17 Sep 2014 04:43:21 +0000 (06:43 +0200)] 
Actually parametrize the Constructor with the Datatype

5 years agoget roles right and fix a FIXME
Gabor Greif [Tue, 16 Sep 2014 05:22:52 +0000 (07:22 +0200)] 
get roles right and fix a FIXME

5 years agoImplement sameConstructor
Gabor Greif [Tue, 2 Sep 2014 10:44:09 +0000 (12:44 +0200)] 
Implement sameConstructor

5 years agoMake constructor metadata parametrized (with intended parameter <- datatype)
Gabor Greif [Mon, 1 Sep 2014 21:52:01 +0000 (23:52 +0200)] 
Make constructor metadata parametrized (with intended parameter <- datatype)

5 years agoPropositional equality for Datatype meta-information
Gabor Greif [Fri, 29 Aug 2014 13:57:45 +0000 (15:57 +0200)] 
Propositional equality for Datatype meta-information

5 years agoUpdate haddock submodule (miscellaneous fixes)
Edward Z. Yang [Thu, 18 Sep 2014 22:49:50 +0000 (15:49 -0700)] 
Update haddock submodule (miscellaneous fixes)

Signed-off-by: Edward Z. Yang <>
5 years agoAdd -fwarn-context-quantification (#4426)
Krzysztof Gogolewski [Thu, 18 Sep 2014 21:52:50 +0000 (14:52 -0700)] 
Add -fwarn-context-quantification (#4426)

This warning (enabled by default) reports places where a context
implicitly binds a type variable, for example

type T a = {-forall m.-} Monad m => a -> m a

Also update Haddock submodule.

Test Plan: validate

Reviewers: hvr, goldfire, simonpj, austin

Reviewed By: austin

Subscribers: simonmar, ezyang, carter

Differential Revision:

GHC Trac Issues: #4426

5 years agoRevert "Update haddock submodule for package key fix."
Edward Z. Yang [Thu, 18 Sep 2014 21:17:08 +0000 (14:17 -0700)] 
Revert "Update haddock submodule for package key fix."

This reverts commit a8d7f81d1f6a9ea658c6f1a965bb3e7717b11e40.

5 years agoGeneralise Control.Monad.{sequence_,msum,mapM_,forM_}
Herbert Valerio Riedel [Thu, 18 Sep 2014 21:05:57 +0000 (23:05 +0200)] 
Generalise Control.Monad.{sequence_,msum,mapM_,forM_}

This finally takes the gloves off, and performs the first actual
generalization in order to implement #9586. This re-exports the
respective definitions for the 4 combinators defined in Data.Foldable.

This way, importing Data.Foldable and Control.Monad unqualified won't bring
conflicting definitions of those 4 entities into scope anymore.

This change seems to have some minor effect on rule-firing, which
causes some wibble in the test-case T4007

Reviewed By: ekmett, austin

Differential Revision:

5 years agoInvert module-dep between Control.Monad and Data.Foldable
Herbert Valerio Riedel [Thu, 18 Sep 2014 21:05:47 +0000 (23:05 +0200)] 
Invert module-dep between Control.Monad and Data.Foldable

This is the last preparation needed before generalizing entities in
Control.Monad conflicting with those from Data.Foldable (re #9586)

Reviewed By: ekmett, austin

Differential Revision:

5 years agoMove Control.Monad.void into Data.Functor
Herbert Valerio Riedel [Thu, 18 Sep 2014 21:05:43 +0000 (23:05 +0200)] 
Move Control.Monad.void into Data.Functor

Both modules still export `void`, but `void`'s implementation now lives in
Data.Functor where it actually belongs in (as it doesn't need a Monad context)

The desired side-effect of this is to invert the import-dep
between Control.Monad and Data.Functor.

Reviewed By: ekmett, austin

Differential Revision:

5 years agoMove Applicative/MonadPlus into GHC.Base
Herbert Valerio Riedel [Thu, 18 Sep 2014 21:05:40 +0000 (23:05 +0200)] 
Move Applicative/MonadPlus into GHC.Base

This is necessary in order to invert the import-dependency between
Data.Foldable and Control.Monad (for addressing #9586)

This also updates the `binary` submodule to qualify a GHC.Base import

Reviewed By: austin

Differential Revision:

5 years agoMove `when` to GHC.Base
Herbert Valerio Riedel [Thu, 18 Sep 2014 21:05:35 +0000 (23:05 +0200)] 
Move `when` to GHC.Base

This allows several modules to avoid importing Control.Monad and thus break
import cycles that manifest themselves when implementing #9586

Reviewed By: austin, ekmett

Differential Revision:

5 years agoMove (=<<) to GHC.Base
Herbert Valerio Riedel [Thu, 18 Sep 2014 21:05:31 +0000 (23:05 +0200)] 
Move (=<<) to GHC.Base

This allows GHC.Stack to avoid importing Control.Monad, and
is preparatory work for implementing #9586

Reviewed By: austin

Differential Revision:

5 years agoFix formatting bug in core-spec.
Richard Eisenberg [Thu, 18 Sep 2014 21:00:37 +0000 (17:00 -0400)] 
Fix formatting bug in core-spec.

5 years agoUpdate haddock submodule for package key fix.
Edward Z. Yang [Thu, 18 Sep 2014 20:47:49 +0000 (13:47 -0700)] 
Update haddock submodule for package key fix.

Signed-off-by: Edward Z. Yang <>
5 years agoComments only: explain checkAxInstCo in OptCoercion
Richard Eisenberg [Thu, 18 Sep 2014 17:40:47 +0000 (13:40 -0400)] 
Comments only: explain checkAxInstCo in OptCoercion

5 years agoRemove unnecessary imports in GHC.Event.KQueue to fix compiler warnings.
Andreas Voellmy [Wed, 17 Sep 2014 12:26:41 +0000 (08:26 -0400)] 
Remove unnecessary imports in GHC.Event.KQueue to fix compiler warnings.

Summary: The imports of Data.Monoid and Data.Maybe in GHC.Event.KQueue are unnecessary and cause validate to fail.

Test Plan: Validate successfully (though I get some unrelated failures).

Reviewers: austin

Subscribers: simonmar, ezyang, carter

Differential Revision:

5 years agoImplement `decodeDouble_Int64#` primop
Herbert Valerio Riedel [Wed, 17 Sep 2014 15:54:20 +0000 (17:54 +0200)] 
Implement `decodeDouble_Int64#` primop

The existing `decodeDouble_2Int#` primop is rather inconvenient to use
(and in fact is not even used by `integer-gmp`) as the mantissa is split
into 3 components which would actually fit in an `Int64#` value.

However, `decodeDouble_Int64#` is to be used by the new `integer-gmp2`
re-implementation (see #9281).

Moreover, `decodeDouble_2Int#` performs direct bit-wise operations on the
IEEE representation which can be replaced by a combination of the
portable standard C99 `scalbn(3)` and `frexp(3)` functions.

Differential Revision:

5 years agoTypo in comment
Gabor Greif [Wed, 17 Sep 2014 05:48:42 +0000 (07:48 +0200)] 
Typo in comment

5 years agoSimplify
Gabor Greif [Wed, 17 Sep 2014 04:40:32 +0000 (06:40 +0200)] 

5 years agoTypo
Gabor Greif [Tue, 16 Sep 2014 04:56:31 +0000 (06:56 +0200)] 

5 years agoRe-add SPECIALISE liftM* pragmas dropped in d94de87252d0fe
Herbert Valerio Riedel [Tue, 16 Sep 2014 17:33:54 +0000 (19:33 +0200)] 
Re-add SPECIALISE liftM* pragmas dropped in d94de87252d0fe

They were dropped because `Maybe` wasn't available in GHC.Base, but now
it is thanks to b47521991a7574f4f3554f7c5444a8c60cfe9efd.

Differential Revision:

5 years agoMove `Maybe`-typedef into GHC.Base
Herbert Valerio Riedel [Tue, 16 Sep 2014 17:19:25 +0000 (19:19 +0200)] 
Move `Maybe`-typedef into GHC.Base

This is preparatory work for reintroducing SPECIALISEs that were lost
in d94de87252d0fe2ae97341d186b03a2fbe136b04

Differential Revision:

5 years agoFix typo "Rrestriction" in user's guide (lspitzner, #9528)
Reid Barton [Tue, 16 Sep 2014 16:57:50 +0000 (12:57 -0400)] 
Fix typo "Rrestriction" in user's guide (lspitzner, #9528)

5 years agoRevert "Revert "rts/base: Fix #9423"" and resolve issue that caused the revert.
Andreas Voellmy [Tue, 16 Sep 2014 12:56:54 +0000 (07:56 -0500)] 
Revert "Revert "rts/base: Fix #9423"" and resolve issue that caused the revert.

This reverts commit 4748f5936fe72d96edfa17b153dbfd84f2c4c053. The fix for #9423
was reverted because this commit introduced a C function setIOManagerControlFd()
(defined in Schedule.c) defined for all OS types, while the prototype
(in includes/rts/IOManager.h) was only included when mingw32_HOST_OS is
not defined. This broke Windows builds.

This commit reverts the original commit and resolves the problem by only defining
setIOManagerControlFd() when mingw32_HOST_OS is defined. Hence the missing prototype
error should not occur on Windows.

In addition, since the io_manager_control_wr_fd field of the Capability struct is only
usd by the setIOManagerControlFd, this commit includes the io_manager_control_wr_fd
field in the Capability struct only when mingw32_HOST_OS is not defined.

Test Plan: Try to compile successfully on all platforms.

Reviewers: austin

Reviewed By: austin

Subscribers: simonmar, ezyang, carter

Differential Revision:

5 years agoReturn nBytes instead of nextAddr from utf8DecodeChar
Thomas Miedema [Tue, 16 Sep 2014 12:56:35 +0000 (07:56 -0500)] 
Return nBytes instead of nextAddr from utf8DecodeChar

While researching D176, I came across the following simplification

Not all functions that call utf8DecodeChar actually need the address
of the next char. And some need the 'number of bytes' read. So returning
nBytes instead of nextAddr should save a few addition and subtraction
operations, and makes the code a bit simpler.

Test Plan: it validates

Reviewers: simonmar, ezyang, austin

Reviewed By: austin

Subscribers: simonmar, ezyang, carter

Differential Revision:

5 years agoAdd the ability to :set -l{foo} in ghci, fix #1407.
archblob [Tue, 16 Sep 2014 12:56:09 +0000 (07:56 -0500)] 
Add the ability to :set -l{foo} in ghci, fix #1407.

The dynamic linking code was already there but it was not called
on flag changes in ghci.

Test Plan: validate

Reviewers: hvr, simonmar, austin

Reviewed By: austin

Subscribers: simonmar, ezyang, carter

Differential Revision:

GHC Trac Issues: #1407

5 years agoRemove special casing of singleton strings, split all strings.
Thijs Alkemade [Tue, 16 Sep 2014 12:55:34 +0000 (07:55 -0500)] 
Remove special casing of singleton strings, split all strings.

exprIsConApp_maybe now detects string literals and correctly
splits them. This means case-statemnts on string literals can
now push the literal into the cases.

fix trac issue #9400

Test Plan: validate

Reviewers: austin, simonpj

Reviewed By: austin, simonpj

Subscribers: simonmar, ezyang, carter

Differential Revision:

GHC Trac Issues: #9400

5 years agoFix cppcheck warnings
Boris Egorov [Tue, 16 Sep 2014 12:55:06 +0000 (07:55 -0500)] 
Fix cppcheck warnings

Cppcheck found a few defects in win32 IOManager and a typo in rts
testsuite. This commit fixes them.

Cppcheck 1.54 founds three possible null pointer dereferences of ioMan
pointer. It is dereferenced and checked for NULL after that.

testheapalloced.c contains typo in printf statement, which should print
percent sign but treated as parameter placement by compiler. To properly
print percent sign one need to use "%%" string.

FYI: Cppcheck 1.66 cannot find possible null pointer dereferences in
mentioned places, mistakenly thinking that some memory leaking instead.
I probably fill a regression bug to Cppcheck.

Test Plan:
Build project, run 'make fulltest'. It finished with 28 unexpected
failures. I don't know if they are related to my fix.

    Unexpected results from:
    TEST="T3500b T7891 tc124 T7653 T5321FD T5030 T4801 T6048 T5631 T5837 T5642 T9020 T3064 parsing001 T1969 T5321Fun T783 T3294"

    OVERALL SUMMARY for test run started at Tue Sep  9 16:46:27 2014 NOVT
     4:23:24 spent to go through
        4101 total tests, which gave rise to
       16075 test cases, of which
        3430 were skipped

         315 had missing libraries
       12154 expected passes
         145 expected failures

           3 caused framework failures
           0 unexpected passes
          28 unexpected failures

    Unexpected failures:
       ../../libraries/base/tests  T7653 [bad exit code] (ghci,threaded1,threaded2)
       perf/compiler               T1969 [stat not good enough] (normal)
       perf/compiler               T3064 [stat not good enough] (normal)
       perf/compiler               T3294 [stat not good enough] (normal)
       perf/compiler               T4801 [stat not good enough] (normal)
       perf/compiler               T5030 [stat not good enough] (normal)
       perf/compiler               T5321FD [stat not good enough] (normal)
       perf/compiler               T5321Fun [stat not good enough] (normal)
       perf/compiler               T5631 [stat not good enough] (normal)
       perf/compiler               T5642 [stat not good enough] (normal)
       perf/compiler               T5837 [stat not good enough] (normal)
       perf/compiler               T6048 [stat not good enough] (optasm)
       perf/compiler               T783 [stat not good enough] (normal)
       perf/compiler               T9020 [stat not good enough] (optasm)
       perf/compiler               parsing001 [stat not good enough] (normal)
       typecheck/should_compile    T7891 [exit code non-0] (hpc,optasm,optllvm)
       typecheck/should_compile    tc124 [exit code non-0] (hpc,optasm,optllvm)
       typecheck/should_run        T3500b [exit code non-0] (hpc,optasm,threaded2,dyn,optllvm)

Reviewers: austin

Reviewed By: austin

Subscribers: simonmar, ezyang, carter

Differential Revision:

5 years agoFind the target gcc when cross-compiling
Reid Barton [Tue, 16 Sep 2014 12:54:43 +0000 (07:54 -0500)] 
Find the target gcc when cross-compiling

"./configure --target=TARGET" was broken; it would use the host gcc.
(So you had to explicitly specify "--with-gcc=TARGET-gcc" also,
as a workaround.)

This was broken by commit fc4856f9e811d9a23ae9212f43a09ddf5ef12b26
for #8148. A comment claimed that FP_ARG_WITH_PATH_GNU_PROG_OPTIONAL
was the same as FP_ARG_WITH_PATH_GNU_PROG except for not raising
an error when the program isn't found; but that wasn't true --
the former didn't prepend the target name when cross-compiling.

We actually need three versions of FP_ARG_WITH_PATH_GNU_PROG since
the LLVM tools are usually not prefixed with the target name even
when cross-compiling. So I generalized the logic in a single macro.

Test Plan:
Built with "./configure --target=i386-unknown-linux"
and BuildFlavour=quick, successfully

Reviewers: ezyang, austin

Reviewed By: ezyang, austin

Subscribers: simonmar, ezyang, carter

Differential Revision:

5 years agoAdd special stdout for hClose002 on x64 Solaris
Kjetil Limkjær [Tue, 16 Sep 2014 12:54:15 +0000 (07:54 -0500)] 
Add special stdout for hClose002 on x64 Solaris

This is identical to the x86 output from bug #4290,
and fixes the hClose002 test when running under

Test Plan: Re-run 'make TEST=hClose002' under x64 Solaris.

Reviewers: ezyang, austin

Reviewed By: ezyang, austin

Subscribers: simonmar, ezyang, carter

Differential Revision:

5 years agohaskeline: update submodule to fix Windows breakage
Austin Seipp [Tue, 16 Sep 2014 12:51:38 +0000 (07:51 -0500)] 
haskeline: update submodule to fix Windows breakage

Signed-off-by: Austin Seipp <>
5 years agoFollow-up to 72d6d0c2704ee6d9 updating submodules for real
Herbert Valerio Riedel [Tue, 16 Sep 2014 10:20:45 +0000 (12:20 +0200)] 
Follow-up to 72d6d0c2704ee6d9 updating submodules for real

5 years agoUpdate config.{guess,sub} to GNU automake 1.14.1
Herbert Valerio Riedel [Tue, 16 Sep 2014 10:14:31 +0000 (12:14 +0200)] 
Update config.{guess,sub} to GNU automake 1.14.1

The new versions should work better under MSYS2

A few submodules' `config.{guess,sub}` files were updated as well

With this commit, all config.{guess,sub} files in the GHC tree have the md5sums

    0fb81517303511f05a01b14f41cec2cf  config.guess
    d2a165dceaa5ac1edba3c512f6ca7bd1  config.sub

This addresses #9597

5 years agoMark T8639_api/T8628 as PHONY
Edward Z. Yang [Mon, 15 Sep 2014 22:11:41 +0000 (15:11 -0700)] 
Mark T8639_api/T8628 as PHONY

Signed-off-by: Edward Z. Yang <>
5 years agoDeclare official GitHub home of libraries/filepath
Herbert Valerio Riedel [Mon, 15 Sep 2014 21:11:36 +0000 (23:11 +0200)] 
Declare official GitHub home of libraries/filepath

Effective immediately, pushing to libraries/filepath requires
pushing to ssh://

5 years agoDon't offer hidden modules for autocomplete.
Edward Z. Yang [Mon, 15 Sep 2014 20:14:30 +0000 (13:14 -0700)] 
Don't offer hidden modules for autocomplete.

It was annoying to test GHCi directly, so I added a ghc-api unit test
of the function instead.

Signed-off-by: Edward Z. Yang <>
5 years agobase: Add some notes about the default impl of '(>>)'
Austin Seipp [Mon, 15 Sep 2014 10:02:21 +0000 (05:02 -0500)] 
base: Add some notes about the default impl of '(>>)'

See Note [Recursive bindings for Applicative/Monad]. This documents the
tricky little details that kept me occupied for so long with this patch,
and why exactly we deviate from the original proposal.

Signed-off-by: Austin Seipp <>
5 years agobase: Remove bunk default impl of (>>=)
Austin Seipp [Mon, 15 Sep 2014 01:35:09 +0000 (20:35 -0500)] 
base: Remove bunk default impl of (>>=)

Without 'join' as a part of Monad, this default implementation is bogus,
and is a leftover from d94de87252d0fe2ae9.

Signed-off-by: Austin Seipp <>
5 years agoExport `Traversable()` and `Foldable()` from Prelude
Herbert Valerio Riedel [Mon, 15 Sep 2014 06:37:30 +0000 (08:37 +0200)] 
Export `Traversable()` and `Foldable()` from Prelude

This exposes *only* the type-classes w/o any of their methods.
This is the very first step for implementing BPP (see #9586), which
already requires breaking up several import-cycles leading back to `Prelude`.

Ideally, importing `Prelude` should be avoided in most `base` modules,
as `Prelude` does not define any entities, but rather re-exports
existing ones.

Test Plan: validate passes

Reviewers: ekmett, austin

Reviewed By: ekmett, austin

Subscribers: simonmar, ezyang, carter

Differential Revision:

GHC Trac Issues: #9586

5 years agoTweak perf-numbers for T1969 and T4801
Herbert Valerio Riedel [Sun, 14 Sep 2014 10:33:57 +0000 (12:33 +0200)] 
Tweak perf-numbers for T1969 and T4801

Right now, Phab's buildbot complains about

  Unexpected failures:
    perf/compiler T1969 [stat too good] (normal)
    perf/compiler T4801 [stat not good enough] (normal)

However, on my workstation, those tests don't fail (c.f. P14).
So this commit tries to blindly tweak those numbers and see if
if Phabricator succeeds to build this code-revision...

Test Plan: Let Harbormaster build it

Reviewers: austin

Subscribers: simonmar, ezyang, carter

Differential Revision:

5 years agoUpdate libffi-tarballs submodule to libffi 3.1 (re #8701)
Herbert Valerio Riedel [Sat, 13 Sep 2014 17:55:25 +0000 (19:55 +0200)] 
Update libffi-tarballs submodule to libffi 3.1 (re #8701)

5 years agoUpdate haskell2010 submodule
Herbert Valerio Riedel [Sat, 13 Sep 2014 17:10:02 +0000 (19:10 +0200)] 
Update haskell2010 submodule kill "Kill CPP conditionals for HUGS and old GHCs"

5 years agoDetabify primops.txt.pp
Herbert Valerio Riedel [Sat, 13 Sep 2014 16:34:08 +0000 (18:34 +0200)] 
Detabify primops.txt.pp

5 years agoMove docstring of `seq` to primops.txt.pp
Herbert Valerio Riedel [Sat, 13 Sep 2014 16:14:55 +0000 (18:14 +0200)] 
Move docstring of `seq` to primops.txt.pp

The documentation for `seq` was recently augmented via #9390 &
cbfa107604f4cbfaf02bd633c1faa6ecb90c6dd7. However, it doesn't show
up in the Haddock generated docs because `#ifdef __HADDOCK__` doesn't
work as expected.  Also, it's easier to just fix the problem at the
origin (which in this is case is the primops.txt.pp file).

The benefit/downside of this is that now the extended documentation
shows up everywhere `seq` is re-exported directly.

5 years agoFixup test-case broken by Follow-up to b53c95fe621
Herbert Valerio Riedel [Sat, 13 Sep 2014 13:01:16 +0000 (15:01 +0200)] 
Fixup test-case broken by Follow-up to b53c95fe621

5 years agoFollow-up to b53c95fe621d3a66a82e6dad383e1c0c08f3871e
Herbert Valerio Riedel [Sat, 13 Sep 2014 11:24:38 +0000 (13:24 +0200)] 
Follow-up to b53c95fe621d3a66a82e6dad383e1c0c08f3871e

Forgot to fix-up the `haskell2010` and `haskell98` submodules in the previous

5 years agoMove ($!) from Prelude into GHC.Base
Herbert Valerio Riedel [Sat, 13 Sep 2014 09:56:37 +0000 (11:56 +0200)] 
Move ($!) from Prelude into GHC.Base

I don't see any reason why this needs to be in Prelude, where it makes
life harder to avoid import cycles involving Prelude. Ideally, the
`Prelude` module should only re-export entities from other modules, and
not define anything on its own.

So this moves `($!)` close to the definition of its `($)` cousin.

5 years agobase: Drop obsolete/redundant `__GLASGOW_HASKELL__` checks
Herbert Valerio Riedel [Sat, 13 Sep 2014 08:44:20 +0000 (10:44 +0200)] 
base: Drop obsolete/redundant `__GLASGOW_HASKELL__` checks

Since 527bcc41630918977c7 we require GHC >=7.6 for bootstrapping anyway.
This also allows to avoid the CPP-processing overhead for these two modules.

5 years agoRemove obsolete comment about (!!)
Joachim Breitner [Fri, 12 Sep 2014 21:13:07 +0000 (23:13 +0200)] 
Remove obsolete comment about (!!)

as spotted by David Feuer and reported as #9585.
The comment was right until ceb68b9118fa883e88abfaa532fc78f6640cf17f,
which is only 13 years ago :-).

5 years agoFix support for deriving Generic1 for data families (FIX #9563)
Jose Pedro Magalhaes [Fri, 12 Sep 2014 16:44:12 +0000 (17:44 +0100)] 
Fix support for deriving Generic1 for data families (FIX #9563)

5 years agoUpdate nofib submodule: Update gitignore with more generated files
Edward Z. Yang [Thu, 11 Sep 2014 14:40:27 +0000 (07:40 -0700)] 
Update nofib submodule: Update gitignore with more generated files

Signed-off-by: Edward Z. Yang <>
5 years agoMake GHC `time-1.5`-ready
Herbert Valerio Riedel [Wed, 10 Sep 2014 21:50:38 +0000 (23:50 +0200)] 
Make GHC `time-1.5`-ready

This also updates a few submodules to have their upper-bounds on
`time` relaxed to allow `time-1.5`. The only package that can't be
upgraded yet is `Cabal` due to API changes breaking `ghc-cabal`. This
needs to be addressed in a future commit.

5 years agoKill obsolete pre GHC 7.6 bootstrapping support
Herbert Valerio Riedel [Wed, 10 Sep 2014 21:46:03 +0000 (23:46 +0200)] 
Kill obsolete pre GHC 7.6 bootstrapping support

This left-over is definitely not needed anymore
and was probably missed in 527bcc41630918977c7

5 years agoT4801 perf numbers: Another typo
Joachim Breitner [Wed, 10 Sep 2014 14:18:17 +0000 (16:18 +0200)] 
T4801 perf numbers: Another typo

5 years agoFix T5321Fun perf number
Joachim Breitner [Wed, 10 Sep 2014 12:52:20 +0000 (14:52 +0200)] 
Fix T5321Fun perf number

(I obviously copy’n’pasted the wrong number.)

5 years agoUpdate performance numbers
Joachim Breitner [Wed, 10 Sep 2014 09:26:25 +0000 (11:26 +0200)] 
Update performance numbers

including some that are not failing yet, but did show a significant
change, and some that Austing changed post-AMP, but where both
harbormaster and ghcspeed reported something else. Numbers taken from
the ghcspeed machine.

5 years agotestsuite: AMPify T3001-2
Joachim Breitner [Wed, 10 Sep 2014 09:26:10 +0000 (11:26 +0200)] 
testsuite: AMPify T3001-2

5 years agotestsuite: AMPify ioprof.hs
Joachim Breitner [Wed, 10 Sep 2014 07:01:33 +0000 (09:01 +0200)] 
testsuite: AMPify ioprof.hs

5 years agoUpdate nofib submodule to track gc bitrot updates.
Edward Z. Yang [Wed, 10 Sep 2014 02:39:58 +0000 (19:39 -0700)] 
Update nofib submodule to track gc bitrot updates.

Signed-off-by: Edward Z. Yang <>
5 years agoUpdate nofib submodule to fix errors in main suite.
Edward Z. Yang [Tue, 9 Sep 2014 22:28:00 +0000 (15:28 -0700)] 
Update nofib submodule to fix errors in main suite.

Signed-off-by: Edward Z. Yang <>
5 years Stage1 needn't be built with -fllvm
Ben Gamari [Sat, 6 Sep 2014 17:24:30 +0000 (13:24 -0400)] Stage1 needn't be built with -fllvm

We can use the native codegen for stage 1 as it is to run on the host

Test Plan:



GHC Trac Issues:

5 years agobase: replace ver references by
Herbert Valerio Riedel [Tue, 9 Sep 2014 16:46:10 +0000 (18:46 +0200)] 
base: replace ver references by

Since we now had to major bump due to AMP being landed, `base-` is not
gonna happen, as we're going straight for a `base-` release.

[skip ci] since this is a doc-only change

5 years agoBump `base` version to for real
Herbert Valerio Riedel [Tue, 9 Sep 2014 15:39:57 +0000 (17:39 +0200)] 
Bump `base` version to for real

This commit updates several submodules in order to bump
the upper bounds on `base` of most boot packages

Moreover, this updates some of the test-suite cases which have
version numbers hardcoded within.

However, I'm not sure if this commit didn't introduce the following
two test-failures

   ghc-api  T8628 [bad stdout] (normal)
   ghc-api  T8639_api [bad stdout] (normal)

This needs investigation

5 years agoRevert "base: Bump version to"
Austin Seipp [Tue, 9 Sep 2014 13:51:04 +0000 (08:51 -0500)] 
Revert "base: Bump version to"

This reverts commit 0829f4c829a92d1287b820b12102a64dac91d35a.

This fails to build, because I'm dumb and hasty, obviously.

Signed-off-by: Austin Seipp <>
5 years agobase: Bump version to
Austin Seipp [Tue, 9 Sep 2014 13:18:56 +0000 (08:18 -0500)] 
base: Bump version to

Signed-off-by: Austin Seipp <>
5 years agoMake Applicative a superclass of Monad
Austin Seipp [Tue, 22 Apr 2014 11:09:40 +0000 (06:09 -0500)] 
Make Applicative a superclass of Monad

This includes pretty much all the changes needed to make `Applicative`
a superclass of `Monad` finally. There's mostly reshuffling in the
interests of avoid orphans and boot files, but luckily we can resolve
all of them, pretty much. The only catch was that
Alternative/MonadPlus also had to go into Prelude to avoid this.

As a result, we must update the hsc2hs and haddock submodules.

Signed-off-by: Austin Seipp <>
Test Plan: Build things, they might not explode horribly.

Reviewers: hvr, simonmar

Subscribers: simonmar

Differential Revision:

5 years agorules: fix buld failure due to o-boot suffix typo
Sergei Trofimovich [Mon, 8 Sep 2014 16:29:26 +0000 (19:29 +0300)] 
rules: fix buld failure due to o-boot suffix typo

Last-time tweak in commit 049bef7dc8858cff1b69002cde91b9d1cdef8e70
broke build. Update '_o-boot' to '_o-bootsuf' variable name.

Signed-off-by: Sergei Trofimovich <>
5 years agorules: cleanup: use '$way_*suf' var instead of open-coded '($3_way_)s'
Sergei Trofimovich [Mon, 8 Sep 2014 16:11:49 +0000 (19:11 +0300)] 
rules: cleanup: use '$way_*suf' var instead of open-coded '($3_way_)s'

The changes look like:
    -$1/$2/build/%.$$($3_way_)s : $1/%.c $$(LAX_DEPS_FOLLOW) $$$$($1_$2_HC_DEP)
    +$1/$2/build/%.$$($3_ssuf)  : $1/%.c $$(LAX_DEPS_FOLLOW) $$$$($1_$2_HC_DEP)

This way typos will manifest themselves in all ways,
not only non-vanilla.

Signed-off-by: Sergei Trofimovich <>