ghc.git
5 years agoSet VERSION=7.8.1, RELEASE=YES ghc-7.8.1-release
Austin Seipp [Mon, 7 Apr 2014 21:26:42 +0000 (16:26 -0500)] 
Set VERSION=7.8.1, RELEASE=YES

Signed-off-by: Austin Seipp <austin@well-typed.com>
5 years agoUpdate ANNOUNCE for GHC 7.8.1
Austin Seipp [Mon, 7 Apr 2014 21:25:50 +0000 (16:25 -0500)] 
Update ANNOUNCE for GHC 7.8.1

Signed-off-by: Austin Seipp <austin@well-typed.com>
5 years agousers_guide: note -XPatternSynonyms is required for use sites
Austin Seipp [Mon, 7 Apr 2014 15:15:05 +0000 (10:15 -0500)] 
users_guide: note -XPatternSynonyms is required for use sites

Signed-off-by: Austin Seipp <austin@well-typed.com>
(cherry picked from commit b059dcc81e9c4097b5f04f85e1ac33586c494110)

5 years agoT8958: fix stderr
Austin Seipp [Mon, 7 Apr 2014 14:05:29 +0000 (09:05 -0500)] 
T8958: fix stderr

Signed-off-by: Austin Seipp <austin@well-typed.com>
5 years agoRequire PatternSynonyms language flag when encountering a use of pattern synonym
Dr. ERDI Gergo [Sun, 6 Apr 2014 13:26:46 +0000 (21:26 +0800)] 
Require PatternSynonyms language flag when encountering a use of pattern synonym
(#8961)

(cherry picked from commit 8f831ec578d22419788542290e164c50524d90f6)

5 years agoRevert "Revert ad15c2, which causes Windows seg-faults (Trac #8834)"
Austin Seipp [Fri, 4 Apr 2014 15:33:03 +0000 (10:33 -0500)] 
Revert "Revert ad15c2, which causes Windows seg-faults (Trac #8834)"

This reverts commit a79613a75c7da0d3d225850382f0f578a07113b5.

(cherry picked from commit c6c86789c95462216a3167d7b98b202a5bf4c0b2)

5 years agoFix desguaring of bang patterns (Trac #8952)
Simon Peyton Jones [Thu, 3 Apr 2014 12:30:59 +0000 (13:30 +0100)] 
Fix desguaring of bang patterns (Trac #8952)

A palpable bug, although one that will rarely bite

(cherry picked from commit 3671d0027329804a31a628a5bee355e0640a2045)

5 years agoFix copy/paste error (#8937)
Simon Marlow [Tue, 1 Apr 2014 12:02:59 +0000 (13:02 +0100)] 
Fix copy/paste error (#8937)

(cherry picked from commit 59b9b067b030d551f9b42423b50770c661c9d86c)

5 years agoTest Trac #8931
Simon Peyton Jones [Thu, 3 Apr 2014 12:34:52 +0000 (13:34 +0100)] 
Test Trac #8931

(cherry picked from commit 8bf8ce1e7cb1b97a1f18ec6f5552e339808ffba9)

5 years agoMake sure that polykinded Typeable is defaultable (Trac #8931)
Simon Peyton Jones [Tue, 1 Apr 2014 13:34:11 +0000 (14:34 +0100)] 
Make sure that polykinded Typeable is defaultable (Trac #8931)

(cherry picked from commit 791f4fa24dd6929ab2e55c9f8b870d8078337427)

5 years agowindows: Fix #8870
Austin Seipp [Fri, 4 Apr 2014 15:33:14 +0000 (10:33 -0500)] 
windows: Fix #8870

This bumps the amount of default reserved and committed stack for GHC
executables to 8mb, to work around #8870. A proper fix should happen in
7.8.2

See note [Windows stack usage] in SysTools for the details.

Signed-off-by: Austin Seipp <austin@well-typed.com>
(cherry picked from commit f0af58df4b5d5ace750e7d7a91ad471284c1b429)

5 years agoFix #8958.
Richard Eisenberg [Sat, 5 Apr 2014 17:56:00 +0000 (13:56 -0400)] 
Fix #8958.

We now do role inference on stupid datatype contexts, allowing a
lightweight role annotation syntax.

(cherry picked from commit d468cd376ffc02cf9f4755275a316be914c482be)

5 years agoBump haddock.base test-case resource limits due to haddock-2.14.2
Herbert Valerio Riedel [Tue, 1 Apr 2014 20:36:02 +0000 (22:36 +0200)] 
Bump haddock.base test-case resource limits due to haddock-2.14.2

Signed-off-by: Herbert Valerio Riedel <hvr@gnu.org>
5 years agoTemporarily fight off build bogons on OS X
Austin Seipp [Mon, 31 Mar 2014 11:47:44 +0000 (06:47 -0500)] 
Temporarily fight off build bogons on OS X

Right now there's a bug with Clang that prevents 'cabal haddock' from
working nicely. But there's an easy fix for now.

Signed-off-by: Austin Seipp <austin@well-typed.com>
(cherry picked from commit 52c6dc970272437aa83a936fc1fe63977fa6178d)

5 years agorts: remove unused functions, fix validate on OS X
Austin Seipp [Thu, 27 Mar 2014 21:51:07 +0000 (16:51 -0500)] 
rts: remove unused functions, fix validate on OS X

After a toolchain update, Clang is no longer appreciative of the fact
these are unused, thanks to -Werror during validate.

Signed-off-by: Austin Seipp <austin@well-typed.com>
(cherry picked from commit 7ef3f0d6dbd54d9e58fb6ab1f2db322bc8fac37a)

5 years agoUse the correct callClobberedRegs on Windows/x64 (#8834)
Simon Marlow [Mon, 24 Mar 2014 14:36:16 +0000 (14:36 +0000)] 
Use the correct callClobberedRegs on Windows/x64 (#8834)

Signed-off-by: Austin Seipp <austin@well-typed.com>
(cherry picked from commit c4eeacdfdf4578eb6e75bbf2e067bfe70ec94ab0)

5 years agoImplement ordering comparisons for type-level naturals and symbols.
Iavor S. Diatchki [Wed, 19 Mar 2014 01:54:23 +0000 (18:54 -0700)] 
Implement ordering comparisons for type-level naturals and symbols.

This is done with two built-in type families: `CmpNat and `CmpSymbol`.
Both of these return a promoted `Ordering` type (EQ, LT, or GT).

(cherry picked from commit 5e4bdb5fc5e741522cbb787731422da3f12aa398)

5 years agoFlattener preserves synonyms, rewriteEvidence can drop buggy "optimisation"
Simon Peyton Jones [Fri, 21 Mar 2014 15:37:27 +0000 (15:37 +0000)] 
Flattener preserves synonyms, rewriteEvidence can drop buggy "optimisation"

There was a special case in rewriteEvidence, looking like:
  = return (Just (if ctEvPred old_ev `tcEqType` new_pred
                  then old_ev
                  else old_ev { ctev_pred = new_pred }))

But this was wrong: old_pred and new_pred might differ in the kind
of a TyVar occurrence, in which case tcEqType would not notice,
but we really, really want new_pred.  This caused Trac #8913.

I solved this by dropping the whole test, and instead making
the flattener preserve type synonyms. This was easy because
TcEvidence has TcTyConAppCo which (unlike) Coercion, handles
synonyms.

(cherry picked from commit 6ae678e31a5fdd3b0bd1f8613fe164012bb630f4)

5 years agoFor equalities with incompatible kinds, new IrredCan goes in the inert set, not work...
Simon Peyton Jones [Fri, 21 Mar 2014 15:32:58 +0000 (15:32 +0000)] 
For equalities with incompatible kinds, new IrredCan goes in the inert set, not work list

This change makes the code for canIrred markedly simpler (and more efficient)
See Note [Equalities with incompatible kinds].

I don't think there was really a bug here, but I came across it when
fixing Trac #8913

(cherry picked from commit c89c57e3b72a8f3de9f35e1bd6e0f70d2b18a941)

5 years agoImplicit parameters should not be allowed in class and instance declarations
Simon Peyton Jones [Fri, 21 Mar 2014 15:55:39 +0000 (15:55 +0000)] 
Implicit parameters should not be allowed in class and instance declarations

Trac #8912 pointed out that GHC 7.4 and 7.6 have omitted this test, although
7.2 and earlier had it.  This patch puts the test back in, and refactors a
little.

(cherry picked from commit a8b7b28cdb98d14c6fb43d5ad3293fd4a5c1f8b4)

Conflicts:
testsuite/tests/typecheck/should_fail/all.T

5 years agorelnotes: GND is not -XSafe compatible.
Austin Seipp [Mon, 24 Mar 2014 11:07:27 +0000 (06:07 -0500)] 
relnotes: GND is not -XSafe compatible.

Signed-off-by: Austin Seipp <austin@well-typed.com>
(cherry picked from commit 73cab206e0f211b75cb6fd62ab9b6ca8ae0950f2)

5 years agoAdd missing kind-check for tcEqType on forall-types
Simon Peyton Jones [Fri, 21 Mar 2014 15:24:49 +0000 (15:24 +0000)] 
Add missing kind-check for tcEqType on forall-types

This wasn't showing up as a bug, but it was definitely wrong.

(cherry picked from commit 74894e0bc405247092e865b9541f5f18d26aa015)

5 years agoRevert "change deriveConstants to use nm in a POSIX way (fixes #8781)"
Austin Seipp [Mon, 24 Mar 2014 07:14:09 +0000 (02:14 -0500)] 
Revert "change deriveConstants to use nm in a POSIX way (fixes #8781)"

It causes a failure on Windows right now.

This reverts commit 045b28033a33a48d31951240a8cb35f2b78345dc.

(cherry picked from commit 15b1eb7c67e29c4ad6f6859f89d220b33493fd46)

5 years agoEnable popcnt test now when segfault is fixed
Johan Tibell [Sat, 22 Mar 2014 17:30:36 +0000 (18:30 +0100)] 
Enable popcnt test now when segfault is fixed

The fix was to ghc-prim.

(cherry picked from commit 16d04d902d4720b3137e07a503fbf72c90b9e164)

5 years agoFollow hs_popcntX changes in ghc-prim
Johan Tibell [Sat, 22 Mar 2014 17:29:29 +0000 (18:29 +0100)] 
Follow hs_popcntX changes in ghc-prim

(cherry picked from commit 1a63f17f19a6c83980efe453966eac1cf441b277)

5 years agoRevert "Fix #8745 - GND is now -XSafe compatible."
Austin Seipp [Mon, 24 Mar 2014 04:45:22 +0000 (23:45 -0500)] 
Revert "Fix #8745 - GND is now -XSafe compatible."

See #8827 - for now, we're making GND unsafe again.

This also fixes the tests since they were originally not using the new
unicode quote style we're using.

This reverts commit a8a01e742434df11b830ab99af12d9045dfcbc4b.

(cherry picked from commit 8f7303774237a8b0787d98c5ab6f605e3e897f19)

5 years agoTest Trac #8893
Simon Peyton Jones [Sun, 23 Mar 2014 18:44:43 +0000 (18:44 +0000)] 
Test Trac #8893

(cherry picked from commit 7973bfb87fdbe6e980e64ed5d7b2a90a469effd4)

5 years agoApply the kind subst to the (kinds of the) quanitifed tyvars in deriveTyData
Simon Peyton Jones [Sat, 22 Mar 2014 23:11:10 +0000 (23:11 +0000)] 
Apply the kind subst to the (kinds of the) quanitifed tyvars in deriveTyData

I've elaboated Note [Unify kinds in deriving] to explain
what is going on here.

The change fixes Trac #8893.

(cherry picked from commit ffed708c30f2d1d4b4c5cd08d9c19aeb0bb623ec)

5 years agoMake sure we occurrence-analyse unfoldings (fixes Trac #8892)
Simon Peyton Jones [Tue, 18 Mar 2014 17:10:18 +0000 (17:10 +0000)] 
Make sure we occurrence-analyse unfoldings (fixes Trac #8892)

For DFunUnfoldings we were failing to occurrence-analyse the unfolding,
and that meant that a loop breaker wasn't marked as such, which in turn
meant it was inlined away when it still had occurrence sites.  See
Note [Occurrrence analysis of unfoldings] in CoreUnfold.

This is a pretty long-standing bug, happily nailed by John Lato.

(cherry picked from commit 87bbc69c40d36046492d754c8d7ff02c3be6ce43)

5 years agoTest Trac #8889
Simon Peyton Jones [Mon, 17 Mar 2014 13:50:54 +0000 (13:50 +0000)] 
Test Trac #8889

(cherry picked from commit 0e2155ddb10f4ccf53e50064756cbc3ce7dd8832)

5 years agoUnflatten the constraints of an inferred types (Trac #8889)
Simon Peyton Jones [Fri, 14 Mar 2014 22:51:20 +0000 (22:51 +0000)] 
Unflatten the constraints of an inferred types (Trac #8889)

There was even a comment to warn about this possiblity,
and it finally showed up in practice!  This patch fixes
it quite nicely, with commens to explain.

(cherry picked from commit 7a7af1ffc48f605cf365faf8fcef31ef4f13822b)

5 years agoTest Trac #8856
Simon Peyton Jones [Fri, 7 Mar 2014 17:15:15 +0000 (17:15 +0000)] 
Test Trac #8856

(cherry picked from commit 062391be4f06aa408187582c4a40f1cea80429c3)

5 years agoFix the treatment of lexically scoped kind variables (Trac #8856)
Simon Peyton Jones [Fri, 7 Mar 2014 16:50:17 +0000 (16:50 +0000)] 
Fix the treatment of lexically scoped kind variables (Trac #8856)

The issue here is described in Note [Binding scoped type variables] in
TcPat.  When implementing this fix I was able to make things quite a
bit simpler:
 * The type variables in a type signature now never unify
   with each other, and so can be straightfoward skolems.
 * We only need the SigTv stuff for signatures in patterns,
   and for kind variables.

(cherry picked from commit cf1a0f971966af633fbd932ad012ce716680465b)

5 years agoTrac #8831 is fixed
Simon Peyton Jones [Sun, 23 Mar 2014 18:46:22 +0000 (18:46 +0000)] 
Trac #8831 is fixed

(cherry picked from commit 1a7709ef9b25175566bc040a34b3d479ea8566ed)

Conflicts:
testsuite/tests/ghci/scripts/all.T

5 years agoSimplify handling of the interactive package; fixes Trac #8831
Simon Peyton Jones [Sat, 22 Mar 2014 23:18:14 +0000 (23:18 +0000)] 
Simplify handling of the interactive package; fixes Trac #8831

This patch is really a fix to the big commint
   73c08ab10e4077e18e459a1325996bff110360c3
   Re-work the naming story for the GHCi prompt (Trac #8649)
which introduced the 'interactive' package
See Note [The interactive package] in HscTypes

The original commit set both
  (a) The tcg_mod field of TcGblEnv to 'interactive:Ghci4' (say)
  (b) The thisPackage field of DynFlags to 'interactive'

But the second step interacts badly with linking.  :loaded modules are
in the package set by 'thisPackage' (usually 'main'); if you change
that, then we try to link package 'main', but can't find it, and
that is what happened in #8831.

The fix was simple: do (a) but not (b).

I changed Note [The interactive package] in HscTypes to describe this.

(cherry picked from commit 28e8d878b63d06824001ac3a631254679e0f1960)

5 years agoAlso allow http://github.com (#8824)
Joachim Breitner [Sat, 8 Mar 2014 00:11:42 +0000 (01:11 +0100)] 
Also allow http://github.com (#8824)

(cherry picked from commit d246c62afd7312185aee9433b065ea99e4fa4054)

5 years agoMake sync-all handle all github protocols correctly
Joachim Breitner [Fri, 7 Mar 2014 15:50:43 +0000 (16:50 +0100)] 
Make sync-all handle all github protocols correctly

This fixes #8824.

(cherry picked from commit 3efcb0a7d147e05f86501783144bcd0ad3757e93)

5 years agoCorrectly clone submodules from github
Joachim Breitner [Thu, 6 Feb 2014 09:55:30 +0000 (09:55 +0000)] 
Correctly clone submodules from github

(cherry picked from commit b755c7bd6af9f2bee47427b1eaa6c29c72b2b17a)

5 years agoSwitch to relative URLs in .gitmodules
Herbert Valerio Riedel [Thu, 6 Feb 2014 07:42:27 +0000 (08:42 +0100)] 
Switch to relative URLs in .gitmodules

Previously, the `http://`-protocol part was hardcoded in the URLs, causing
the initial clone process to fall back to `http://` even when the ghc.git repo
was cloned via one of the other 3 supported transport protocols.

This is slightly related to #8545, as it will make it possible to e.g.

    git clone --recursive git://git.haskell.org/ghc

and clone ghc.git including all submodules in one go (i.e. w/o `sync-all`),
and w/o falling back to a different (hardwired) Git transport protocol for
the submodules.

Signed-off-by: Herbert Valerio Riedel <hvr@gnu.org>
(cherry picked from commit ad44e47542a822ac3e02cf514b5d2be52880fc95)

5 years agoadd --with-ar and --with-ranlib configure parameters
Karel Gardas [Sun, 9 Feb 2014 20:58:05 +0000 (21:58 +0100)] 
add --with-ar and --with-ranlib configure parameters

Both --with-ar and --with-ranlib are usable on non-GNU/Linux systems
where GNU tools are usually installed (or possible to install), but
not into standard location nor with standard name. Tested on Solaris 10.

Signed-off-by: Austin Seipp <austin@well-typed.com>
(cherry picked from commit ac24bf45258af701cdd67423d6107357f27bbedf)

5 years agochange deriveConstants to use nm in a POSIX way (fixes #8781)
Karel Gardas [Sat, 22 Mar 2014 21:33:05 +0000 (22:33 +0100)] 
change deriveConstants to use nm in a POSIX way (fixes #8781)

The patch provided by Christian Maeder <Christian.Maeder@dfki.de>

Signed-off-by: Karel Gardas <karel.gardas@centrum.cz>
Signed-off-by: Austin Seipp <austin@well-typed.com>
(cherry picked from commit 045b28033a33a48d31951240a8cb35f2b78345dc)

5 years agoFix #8917.
Richard Eisenberg [Sat, 22 Mar 2014 17:13:26 +0000 (13:13 -0400)] 
Fix #8917.

FamInstEnv.normaliseTcApp should normalise arguments even when
the top-level tycon isn't a type family. This was a regression
from 7.6 -- not sure when it happened, but it was probably my
fault. Fixed now, in any case.

(cherry picked from commit c99941cfeee033fca2df45e9523b65c83be20d31)

5 years agoAdd test case for #8917
Richard Eisenberg [Sat, 22 Mar 2014 16:34:40 +0000 (12:34 -0400)] 
Add test case for #8917

(cherry picked from commit 47796026ca35a2438f7a7dc337add2ec3b14f06c)

5 years agoMark test for #8831 as known-broken
Joachim Breitner [Sat, 22 Mar 2014 10:53:03 +0000 (11:53 +0100)] 
Mark test for #8831 as known-broken

to keep validate working.

(cherry picked from commit 4bc3c8265f988f4456664f502164f52466aab67d)

Conflicts:
testsuite/tests/ghci/scripts/all.T

5 years agotestsuite: add test for #8831
Austin Seipp [Fri, 21 Mar 2014 09:42:32 +0000 (04:42 -0500)] 
testsuite: add test for #8831

Signed-off-by: Austin Seipp <austin@well-typed.com>
(cherry picked from commit f9b6a2bb6574904ab11476d79896491b111ad7cc)

Conflicts:
testsuite/tests/ghci/scripts/all.T

5 years agolinker: Fix indirect calls for x86_64 windows (#2283)
Kyrill Briantsev [Fri, 21 Mar 2014 10:42:48 +0000 (05:42 -0500)] 
linker: Fix indirect calls for x86_64 windows (#2283)

Signed-off-by: Austin Seipp <austin@well-typed.com>
(cherry picked from commit 7a1c85113dd082153cc07f4792216beaf34daeeb)

5 years agoUpdate ghc --help references to --make and a.out (fixes #8600)
ccatalfo [Wed, 12 Mar 2014 02:11:11 +0000 (22:11 -0400)] 
Update ghc --help references to --make and a.out (fixes #8600)

Signed-off-by: Austin Seipp <austin@well-typed.com>
(cherry picked from commit 99ef27913dbe55fa57891bbf97d131e0933733e3)

5 years agoUpdate expected test outputs to match new format of pretty-printing
Dr. ERDI Gergo [Wed, 19 Mar 2014 13:44:38 +0000 (21:44 +0800)] 
Update expected test outputs to match new format of pretty-printing
interface contents

(cherry picked from commit 21028ee6805b896dbbd8a2d46b9690d1adecdcd1)

5 years agoisLexVarSym: check all characters of the name, not just the first one.
Dr. ERDI Gergo [Wed, 19 Mar 2014 12:07:47 +0000 (20:07 +0800)] 
isLexVarSym: check all characters of the name, not just the first one.

This is so that generated names like e.g. workers don't show up as
infix operators when using something like -ddump-simpl.

(cherry picked from commit a3f78e2476e3d4ead86ef3b10ddd4e14e189ada3)

5 years agoAdd test case for #8776
Dr. ERDI Gergo [Fri, 14 Mar 2014 14:34:56 +0000 (22:34 +0800)] 
Add test case for #8776

(cherry picked from commit de32a95ef21970c2db959509861b4f59d1dcbb82)

5 years agoReinstate pretty-printing of AnIds via pprId (#8776)
Dr. ERDI Gergo [Fri, 14 Mar 2014 14:17:45 +0000 (22:17 +0800)] 
Reinstate pretty-printing of AnIds via pprId (#8776)

(cherry picked from commit 52003696ff7a2bbf86fbfccfe29b9f146a1ea549)

5 years agoUse prefix notation in pprIfaceDecl for IfaceIds
Dr. ERDI Gergo [Fri, 14 Mar 2014 13:35:30 +0000 (21:35 +0800)] 
Use prefix notation in pprIfaceDecl for IfaceIds

(cherry picked from commit 5908a7427abd35264f5bafd5bf7bce3a0c9dde8e)

5 years agoHonor Op_PrintExplicitForalls setting in pprIfaceForAllPart
Dr. ERDI Gergo [Fri, 14 Mar 2014 11:50:15 +0000 (19:50 +0800)] 
Honor Op_PrintExplicitForalls setting in pprIfaceForAllPart

(cherry picked from commit f3eeb93529798b80721a9801aa1bf2ea7a1de049)

5 years agoPretty-print the following TyThings via their IfaceDecl counterpart:
Dr. ERDI Gergo [Thu, 13 Mar 2014 13:18:39 +0000 (21:18 +0800)] 
Pretty-print the following TyThings via their IfaceDecl counterpart:
 * AnId
 * ACoAxiom
 * AConLike

(cherry picked from commit 065c35a9d6d48060c8fac8d755833349ce58b35b)

5 years agopprIfaceDecl for IfacePatSyn: use pprPatSynSig
Dr. ERDI Gergo [Wed, 12 Mar 2014 12:38:54 +0000 (20:38 +0800)] 
pprIfaceDecl for IfacePatSyn: use pprPatSynSig

(cherry picked from commit 24eea38c70eae90d166de26d71a178fb0c1ffc30)

5 years agopprIfaceContextArr: print a context including the "=>" arrow
Dr. ERDI Gergo [Wed, 12 Mar 2014 12:38:26 +0000 (20:38 +0800)] 
pprIfaceContextArr: print a context including the "=>" arrow

(cherry picked from commit 23c0f1ec2cf06c0178c2ae7414fe57ea648689e7)

5 years agoAdd OutputableBndr instance for OccName
Dr. ERDI Gergo [Wed, 12 Mar 2014 12:37:22 +0000 (20:37 +0800)] 
Add OutputableBndr instance for OccName

(cherry picked from commit 4d1b7b4a9b986e87755784478b4ea4883a5e203e)

5 years agoTypos
Austin Seipp [Fri, 21 Mar 2014 09:36:23 +0000 (04:36 -0500)] 
Typos

Signed-off-by: Austin Seipp <austin@well-typed.com>
(cherry picked from commit ba0c0123fb2f6942f57636ca458d5a87870f1ecc)

5 years agoFlush after TH in #8884 test case
Joachim Breitner [Fri, 21 Mar 2014 12:46:15 +0000 (13:46 +0100)] 
Flush after TH in #8884 test case

(I recall that this was needed in some cases in the past, and might fix
the validate error on travis.)

(cherry picked from commit df409de9550dc8a07e010964a54112266d809341)

5 years agoAdd some documentation about type-level literals.
Iavor S. Diatchki [Tue, 18 Mar 2014 06:19:16 +0000 (23:19 -0700)] 
Add some documentation about type-level literals.

I moved the "promoted literals" sub-section into a separate section,
as many folks were not finding the docs.  I also added some additional
paragraphs describing the current state of the feature.

(cherry picked from commit 3099e40d2737172c746a6456ddcd34b54e120aa0)

5 years agoRevert ad15c2, which causes Windows seg-faults (Trac #8834)
Simon Peyton Jones [Fri, 14 Mar 2014 22:55:26 +0000 (22:55 +0000)] 
Revert ad15c2, which causes Windows seg-faults (Trac #8834)

We don't yet understand WHY commit ad15c2, which is to do with
CmmSink, causes seg-faults on Windows, but it certainly seems to.  So
reverting it is a stop-gap, but we need to un-block the 7.8 release.

Many thanks to awson for identifying the offending commit.

(cherry picked from commit a79613a75c7da0d3d225850382f0f578a07113b5)

5 years agoUpdate submodule to Win32-2.3.0.2
Herbert Valerio Riedel [Tue, 18 Mar 2014 10:06:57 +0000 (11:06 +0100)] 
Update submodule to Win32-2.3.0.2

Signed-off-by: Herbert Valerio Riedel <hvr@gnu.org>
(cherry picked from commit 696bfc4ba5fce6b75cc91bcb67c5d0a3c9f29bd2)

5 years agoconfig.mk.in: ARM now supports dynamic linking with the LLVM backend
Ben Gamari [Thu, 6 Mar 2014 20:22:28 +0000 (21:22 +0100)] 
config.mk.in: ARM now supports dynamic linking with the LLVM backend

Signed-off-by: Austin Seipp <austin@well-typed.com>
(cherry picked from commit d574fcbba09fd6c9d10a79e19daf5f15bb0a6cde)

5 years agoTest for Trac #8841 now works
Simon Peyton Jones [Thu, 6 Mar 2014 12:13:05 +0000 (12:13 +0000)] 
Test for Trac #8841 now works

(cherry picked from commit bf9bf602399eca30ca522ae5bae52d4f3ec1ab88)

5 years agoAttach the right location to pattern synonym error message (fixes Trac #8841)
Simon Peyton Jones [Thu, 6 Mar 2014 11:32:55 +0000 (11:32 +0000)] 
Attach the right location to pattern synonym error message (fixes Trac #8841)

(cherry picked from commit 96daafc3305a691590b88c1175a8f45e5d327471)

5 years agoRecharacterize test according to discussion in #8851.
Richard Eisenberg [Thu, 13 Mar 2014 19:12:27 +0000 (15:12 -0400)] 
Recharacterize test according to discussion in #8851.

(cherry picked from commit 8ee6162e9a3377cd4c79f49b63f92046b0d5c708)

Conflicts:
testsuite/tests/deriving/should_compile/all.T

5 years agoImprove documentation of standalone deriving (c.f. Trac #8851)
Simon Peyton Jones [Mon, 10 Mar 2014 11:08:37 +0000 (11:08 +0000)] 
Improve documentation of standalone deriving (c.f. Trac #8851)

(cherry picked from commit 9d14262299fe721e49eb0efadebca9d095c834b3)

5 years agoTest #8851.
Richard Eisenberg [Fri, 7 Mar 2014 04:44:57 +0000 (23:44 -0500)] 
Test #8851.

(cherry picked from commit 1ac91146dc3431742eafd33ed4afc552ca17fb64)

Conflicts:
testsuite/tests/deriving/should_compile/all.T

5 years agoDriverPipeline: Ensure -globalopt is passed to LLVM opt
Ben Gamari [Thu, 6 Mar 2014 20:20:02 +0000 (21:20 +0100)] 
DriverPipeline: Ensure -globalopt is passed to LLVM opt

While -O1 and -O2 both include -globalopt, the order in which the passes are
run means that aliases aren't resolved which then causes llc to fall over.
See GHC bug #8855.

Signed-off-by: Austin Seipp <austin@well-typed.com>
(cherry picked from commit b84b5da4430aacd5bf8422b06a861cd0584f99cf)

5 years agodisable shared libs on sparc (linux/solaris) (fixes #8857)
Karel Gardas [Fri, 7 Mar 2014 10:36:37 +0000 (11:36 +0100)] 
disable shared libs on sparc (linux/solaris) (fixes #8857)

Signed-off-by: Austin Seipp <austin@well-typed.com>
(cherry picked from commit 623883f1ed0ee11cc925c4590fb09565403fd231)

5 years agoFix incorrect maxStkSize calculation (#8858)
Kyrill Briantsev [Thu, 13 Mar 2014 22:00:17 +0000 (17:00 -0500)] 
Fix incorrect maxStkSize calculation (#8858)

Signed-off-by: Austin Seipp <austin@well-typed.com>
(cherry picked from commit b99ace39cb2484bfc2d648b55a1a43ed78e4b9a0)

5 years agoUnify, rather than match, in GND processing (fixes Trac #8865)
Simon Peyton Jones [Mon, 10 Mar 2014 11:10:21 +0000 (11:10 +0000)] 
Unify, rather than match, in GND processing (fixes Trac #8865)

Yet another small way in which polymorphic kinds needs a bit of care
See Note [Unify kinds in deriving] in TcDeriv

(cherry picked from commit f521a26cb741409011137115d17232df901c3c94)

Conflicts:
testsuite/tests/deriving/should_compile/all.T

5 years agoExport runTcInteractive from TcRnDriver, and from GHC (Trac #8878)
Simon Peyton Jones [Thu, 13 Mar 2014 12:13:49 +0000 (12:13 +0000)] 
Export runTcInteractive from TcRnDriver, and from GHC (Trac #8878)

(cherry picked from commit 60bbc0af79ddfe977d93e271b57c2bc25d3fcde6)

5 years agoFix #8884.
Richard Eisenberg [Thu, 13 Mar 2014 19:48:56 +0000 (15:48 -0400)] 
Fix #8884.

There were two unrelated errors fixed here:
 1) Make sure that only the *result kind* is reified when reifying
    a type family. Previously, the whole kind was reified, which
    defies the TH spec.

 2) Omit kind patterns in equations.

(cherry picked from commit 8c5ea91d68cdc79b413e05f7dacfd052f5de8c64)

Conflicts:
testsuite/tests/th/all.T

5 years agoDocument Coercible in the user guide
Joachim Breitner [Fri, 14 Mar 2014 11:51:37 +0000 (12:51 +0100)] 
Document Coercible in the user guide

as a subsection of "Equality constraints", containing references to the
module's haddock and to the paper. Fixes #8888

(cherry picked from commit 1e36a386042248523de69ad6b02c43a6631ed5d0)

5 years agoFix incorrect blocksize calculation on Win64
Kyrill Briantsev [Wed, 12 Mar 2014 19:31:21 +0000 (14:31 -0500)] 
Fix incorrect blocksize calculation on Win64

Fixes #8839

Signed-off-by: Austin Seipp <austin@well-typed.com>
(cherry picked from commit b7e5d722c6811f34253d8202540dd9b0ec1b6766)

5 years agoRemove code reporting issues with Safe Haskell and coerce.
Richard Eisenberg [Fri, 14 Mar 2014 19:03:21 +0000 (15:03 -0400)] 
Remove code reporting issues with Safe Haskell and coerce.

This is a followup to the fix for #8827, and should be merged
with that change.

(cherry picked from commit 7602bd4de901e4304a3a45dca08fc630d1bb5bf2)

5 years agoRemove "Safe mode" check for Coercible instances
Richard Eisenberg [Thu, 13 Mar 2014 18:16:37 +0000 (14:16 -0400)] 
Remove "Safe mode" check for Coercible instances

We assume that library authors supply correct role annotations
for their types, and therefore we do not need to check for
the availability of data constructors in Safe mode. See
discussion in #8725. This effectively fixes #8827 and #8826.

(cherry picked from commit 59722295bb8da8f01d37356fbed6aef7321a8195)

5 years agofix SHELL makefile variable to be set by the configure script (fixes #8783)
Karel Gardas [Wed, 12 Mar 2014 15:14:49 +0000 (16:14 +0100)] 
fix SHELL makefile variable to be set by the configure script (fixes #8783)

The patch provided by Christian Maeder <Christian.Maeder@dfki.de>
Signed-off-by: Karel Gardas <karel.gardas@centrum.cz>
Signed-off-by: Austin Seipp <austin@well-typed.com>
(cherry picked from commit a0bcbb54481297f9ff329766529a8343c4853e3f)

5 years agoFix last-minute typo in SetLevels commit ef44a4
Simon Peyton Jones [Tue, 11 Mar 2014 12:47:57 +0000 (12:47 +0000)] 
Fix last-minute typo in SetLevels commit ef44a4

Sorry about that...

(cherry picked from commit 41f803105999ffe51a40d3c72d5994520496b7ea)

5 years agoMake SetLevels do substitution properly (fixes Trac #8714)
Simon Peyton Jones [Tue, 11 Mar 2014 11:13:31 +0000 (11:13 +0000)] 
Make SetLevels do substitution properly (fixes Trac #8714)

Nowadays SetLevels floats case expressions as well as let-bindings,
and case expressions bind type variables.  We need to clone all such
floated binders, to avoid accidental name capture.  But I'd forgotten
to substitute for the cloned type variables, causing #8714.  (In the
olden days only Ids were cloned, from let-bindings.)

This patch fixes the bug and does quite a bit of clean-up refactoring
as well, by putting the context level in the LvlEnv.

There is no effect on performance, except that nofib 'rewrite' improves
allocations by 3%.  On investigation I think it was a fluke to do with
loop-cutting in big letrec nests.  But at least it's a fluke in the
right direction.

        Program           Size    Allocs   Runtime   Elapsed  TotalMem
--------------------------------------------------------------------------------
            Min          -0.4%     -3.0%    -19.4%    -19.4%    -26.7%
            Max          -0.0%     +0.0%    +17.9%    +17.9%      0.0%
 Geometric Mean          -0.1%     -0.0%     -0.7%     -0.7%     -0.4%

(cherry picked from commit ef44a429af4a630a153b5774d0e19dbcad8328d5)

5 years agoRun testcase for 8124 only with threaded ways
Joachim Breitner [Fri, 7 Mar 2014 15:05:39 +0000 (16:05 +0100)] 
Run testcase for 8124 only with threaded ways

(cherry picked from commit 0014fb3dbf4a2096489a4800adf2d79a83a12274)

5 years agofix copy/pasto
Simon Marlow [Sat, 1 Mar 2014 07:16:44 +0000 (07:16 +0000)] 
fix copy/pasto

(cherry picked from commit 176205cf0b89f76d904d381bdcd61e8685116bb7)

5 years agoadd missing files (#8124)
Simon Marlow [Sat, 1 Mar 2014 07:14:47 +0000 (07:14 +0000)] 
add missing files (#8124)

(cherry picked from commit 3fba87599378afbcf425a0fc2a5a61d21e3719d4)

5 years agoUpdate to containers-0.5.5.1
Herbert Valerio Riedel [Fri, 14 Mar 2014 10:13:39 +0000 (11:13 +0100)] 
Update to containers-0.5.5.1

This fixes a wrong #if around role annotations (see #8718)

Signed-off-by: Herbert Valerio Riedel <hvr@gnu.org>
(cherry picked from commit df265b95a2f3640425b43b17993b9ec78a287f60)

5 years agoUpdate time to 1.4.2 release
Herbert Valerio Riedel [Mon, 3 Mar 2014 08:25:45 +0000 (09:25 +0100)] 
Update time to 1.4.2 release

Note: The only visible change in `time-1.4.2` is at the SafeHaskell level

Signed-off-by: Herbert Valerio Riedel <hvr@gnu.org>
(cherry picked from commit afb42a54bc0c5cd0dfb69750d3b5e76bcb66ff5a)

5 years agoUpdate to containers-0.5.5.0
Herbert Valerio Riedel [Thu, 13 Mar 2014 21:09:56 +0000 (22:09 +0100)] 
Update to containers-0.5.5.0

This adds role annotations to Map and Set and therefore addresses #8718

Signed-off-by: Herbert Valerio Riedel <hvr@gnu.org>
(cherry picked from commit e55acf007f5109b42a2e388eaca63445bbbc7376)

5 years agoUpdate `Cabal` to 1.18.1.3 release
Herbert Valerio Riedel [Tue, 4 Mar 2014 21:19:37 +0000 (22:19 +0100)] 
Update `Cabal` to 1.18.1.3 release

Signed-off-by: Herbert Valerio Riedel <hvr@gnu.org>
(cherry picked from commit 01f9ac3e977fb128388467a31f62e84d769e17ec)

5 years agoUpdate to latest Cabal 1.18 branch tip (again)
Herbert Valerio Riedel [Sat, 1 Mar 2014 08:10:32 +0000 (09:10 +0100)] 
Update to latest Cabal 1.18 branch tip (again)

This was already performed in 37d6e2c54f117 but accidentally
reverted as a side-effect of 9976c2ece3aa4.

So this update pulls in the fix into ghc-7.8 for #8266 again.

Signed-off-by: Herbert Valerio Riedel <hvr@gnu.org>
5 years agobinary-dist: when using xz, use extreme compression.
Austin Seipp [Fri, 28 Feb 2014 23:13:21 +0000 (17:13 -0600)] 
binary-dist: when using xz, use extreme compression.

When building a binary distribution with TAR_COMP=xz, using the -9e flag
(extremely high compression) results in substantial savings: for the
Mavericks builds, bzip2 scores in at about 120mb, while xz at level 9
scores about 60mb - a huge reduction!

This of course takes significantly longer - but it does not affect
decompression speed for end users, so it's certainly worth it.

Signed-off-by: Austin Seipp <austin@well-typed.com>
(cherry picked from commit 251b18aba97329ff41b8479ff78d38505cf086f8)

5 years agoNote that we need Cabal-1.18 in the release notes
Austin Seipp [Fri, 28 Feb 2014 22:40:27 +0000 (16:40 -0600)] 
Note that we need Cabal-1.18 in the release notes

Thanks to George Colpitts for helping us remember this!

Signed-off-by: Austin Seipp <austin@well-typed.com>
(cherry picked from commit f9627252fc278ecaafbb1885c31adad7357c0763)

5 years agoFix binary-dist target with xz/gzip
Austin Seipp [Fri, 28 Feb 2014 22:28:28 +0000 (16:28 -0600)] 
Fix binary-dist target with xz/gzip

This was harmless but annoying: we forgot to take the compression
extention into account when copying the binary dist out of bindistprep

Signed-off-by: Austin Seipp <austin@well-typed.com>
(cherry picked from commit 025a66e7fc416ab9ee1df56ad26dfe6232d32900)

5 years agoDocumentation updates for 7.8.1 release
Austin Seipp [Fri, 28 Feb 2014 22:23:17 +0000 (16:23 -0600)] 
Documentation updates for 7.8.1 release

Notably, GND is now usable with Safe Haskell. Also, Coercible now is in
Data.Coerce canonically, and we added some more instances.

Signed-off-by: Austin Seipp <austin@well-typed.com>
(cherry picked from commit 71611523c25bb89b81e789d5a2dd3d5d9754b025)

5 years agoPPC: Fix loads of PIC data with > 16 bit offsets (#7830).
Erik de Castro Lopo [Fri, 28 Feb 2014 07:33:13 +0000 (18:33 +1100)] 
PPC: Fix loads of PIC data with > 16 bit offsets (#7830).

Loads should now handle up to 32 bit offsets.

(cherry picked from commit 67029f200c5512f8ba5b9b7c25a5d1131422ef8e)

5 years agoAdd hs_thread_done() (#8124)
Simon Marlow [Thu, 27 Feb 2014 14:07:29 +0000 (14:07 +0000)] 
Add hs_thread_done() (#8124)

See documentation for details.

(cherry picked from commit af6746fb6b5adb5ba5be6e0f647c4ebe767ce084)

5 years agofix comment on allocate() (#8254)
Simon Marlow [Thu, 27 Feb 2014 12:37:32 +0000 (12:37 +0000)] 
fix comment on allocate() (#8254)

(cherry picked from commit 68c0d8689dd93cb0ce74a288e82f2ed997c31acc)

5 years agoFix a bug in codegen for non-updatable selector thunks (#8817)
Simon Marlow [Thu, 27 Feb 2014 09:41:19 +0000 (09:41 +0000)] 
Fix a bug in codegen for non-updatable selector thunks (#8817)

To evaluate most non-updatable thunks, we can jump directly to the
entry code if we know what it is.  But not for a selector thunk: these
might be updated by the garbage collector, so we have to enter the
closure with an indirect jump through its info pointer.

(cherry picked from commit b1ddec1e6d4695d71d38b59db26829d71ad784e1)

5 years agoFollow-up to 32f41c79
Herbert Valerio Riedel [Wed, 26 Feb 2014 22:51:23 +0000 (23:51 +0100)] 
Follow-up to 32f41c79

These parts were forgotten to be committed together with the rest of
32f41c79960ffc1d04c4573acb37756109d279a5

Signed-off-by: Herbert Valerio Riedel <hvr@gnu.org>
(cherry picked from commit b1ee32edbe9be7b695cce7975450782e0a290c47)

5 years agoMake distribution tarball compression format configurable
Herbert Valerio Riedel [Wed, 26 Feb 2014 21:20:52 +0000 (22:20 +0100)] 
Make distribution tarball compression format configurable

By default, bzip2 compression is selected (which is what has been used
till now). Additionally, by setting the TAR_COMP make variable to one of
the values "bzip2", "gzip", or "xz", an explicit compression format can
be requested for the distribution tarballs. For instance, invoking

  make TAR_COMP=xz sdist-ghc

will result in a tarball `./sdistprep/ghc-7.9.20140226-src.tar.xz`

Signed-off-by: Herbert Valerio Riedel <hvr@gnu.org>
(cherry picked from commit 32f41c79960ffc1d04c4573acb37756109d279a5)

5 years agoIndividual sdist-foo targets
Joachim Breitner [Fri, 31 Jan 2014 23:31:30 +0000 (23:31 +0000)] 
Individual sdist-foo targets

so that one can build a source distribution without downloading the
windows tarballs.

(cherry picked from commit 50e4d40f88c3eee41384efacfd83f73305e2210d)