3 years agoKill varSetElems try_tyvar_defaulting
Bartosz Nitka [Tue, 26 Apr 2016 16:51:26 +0000 (09:51 -0700)] 
Kill varSetElems try_tyvar_defaulting

`varSetElems` introduces unnecessary nondeterminism and we can do
the same thing deterministically for the same price.

Test Plan: ./validate

Reviewers: goldfire, austin, simonmar, bgamari, simonpj

Reviewed By: simonpj

Subscribers: thomie

Differential Revision:

GHC Trac Issues: #4012

(cherry picked from commit 94320e1d34d14017cc9b38226ea78205a0a76a2b)

3 years agoKill varSetElems in TcErrors
Bartosz Nitka [Tue, 26 Apr 2016 15:47:21 +0000 (08:47 -0700)] 
Kill varSetElems in TcErrors

The uses of varSetElems in these places are unnecessary and while it
doesn't intruduce non-determinism in the ABI the plan is to get
rid of all varSetElems to get some compile time guarantees.

Test Plan: ./validate

Reviewers: austin, simonmar, bgamari, goldfire, simonpj

Reviewed By: simonpj

Subscribers: thomie

Differential Revision:

GHC Trac Issues: #4012

(cherry picked from commit 2dc5b92e070132114ea1a37f5bd82ab905ff7889)

3 years agoKill varSetElemsWellScoped in quantifyTyVars
Bartosz Nitka [Tue, 26 Apr 2016 12:58:24 +0000 (05:58 -0700)] 
Kill varSetElemsWellScoped in quantifyTyVars

varSetElemsWellScoped introduces unnecessary non-determinism in
inferred type signatures.
Removing this instance required changing the representation of
TcDepVars to use deterministic sets.
This is the last occurence of varSetElemsWellScoped, allowing me to
finally remove it.

Test Plan:
I will update the expected outputs when commiting, some reordering
of type variables in types is expected.

Reviewers: goldfire, simonpj, austin, bgamari

Reviewed By: simonpj

Subscribers: thomie, simonmar

Differential Revision:

GHC Trac Issues: #4012

(cherry picked from commit c9bcaf3165586ac214fa694e61c55eb45eb131ab)

3 years agoMake benign non-determinism in pretty-printing more obvious
Bartosz Nitka [Mon, 18 Apr 2016 14:32:03 +0000 (07:32 -0700)] 
Make benign non-determinism in pretty-printing more obvious

This change takes us one step closer to being able to remove
`varSetElemsWellScoped`. The end goal is to make every source
of non-determinism obvious at the source level, so that when
we achieve determinism it doesn't get broken accidentally.

Test Plan: compile GHC

Reviewers: simonmar, goldfire, simonpj, austin, bgamari

Reviewed By: simonpj

Subscribers: thomie

Differential Revision:

GHC Trac Issues: #4012

(cherry picked from commit 0f96686b10fd36d479a54c71a6e1753193e85347)

3 years agoFix two buglets in 17eb241 noticed by Richard
Simon Peyton Jones [Wed, 20 Apr 2016 14:56:44 +0000 (15:56 +0100)] 
Fix two buglets in 17eb241 noticed by Richard

These are corner cases in
   17eb241 Refactor computing dependent type vars
and I couldn't even come up with a test case

* In TcSimplify.simplifyInfer, in the promotion step, be sure
  to promote kind variables as well as type variables.

* In TcType.spiltDepVarsOfTypes, the CoercionTy case, be sure
  to get the free coercion variables too.

(cherry picked from commit 61191deee82d315a9279f11615e379d7c231dc51)

3 years agoRefactor computing dependent type vars
Simon Peyton Jones [Mon, 18 Apr 2016 14:01:13 +0000 (15:01 +0100)] 
Refactor computing dependent type vars

There should be no change in behaviour here

* Move splitDepVarsOfType(s) from Type to TcType

* Define data type TcType.TcDepVars, document what it means,
  and use it where appropriate, notably in splitDepVarsOfType(s)

* Use it in TcMType.quantifyTyVars and friends

(cherry picked from commit 17eb2419c42c70d7436b6b8cff0cef705353bb4e)

3 years agoGet rid of varSetElemsWellScoped in abstractFloats
Bartosz Nitka [Fri, 22 Apr 2016 16:47:30 +0000 (09:47 -0700)] 
Get rid of varSetElemsWellScoped in abstractFloats

It's possible to get rid of this use site in a local way
and it introduces unneccessary nondeterminism.

Test Plan: ./validate

Reviewers: simonmar, goldfire, austin, bgamari, simonpj

Reviewed By: simonpj

Subscribers: thomie

Differential Revision:

GHC Trac Issues: #4012

(cherry picked from commit 03006f5ef2daedbbb7b0932b2c0e265f097cf2bf)

3 years agoRemove mysterious varSetElemsWellScoped in tidyFreeTyCoVars
Bartosz Nitka [Thu, 21 Apr 2016 10:49:30 +0000 (03:49 -0700)] 
Remove mysterious varSetElemsWellScoped in tidyFreeTyCoVars

Richard isn't sure why it's there and removing it didn't change

(cherry picked from commit 7c6585af9e9c83f2d87cb9728d9b8cb456e3d543)

3 years agoRename FV related functions
Bartosz Nitka [Wed, 20 Apr 2016 16:51:05 +0000 (09:51 -0700)] 
Rename FV related functions

This is from Simon's suggestion:

* `tyCoVarsOfTypesAcc` is a terrible name for a function with a
  perfectly decent type `[Type] -> FV`. Maybe `tyCoFVsOfTypes`?
  Similarly others

* `runFVList` is also terrible, but also has a decent type.
  Maybe just `fvVarList` (and `fvVarSet` for `runFVSet`).

* `someVars` could be `mkFVs :: [Var] -> FV`.

(cherry picked from commit 2e33320a24e5a7b837b4c217f95ca428cd6e5482)

3 years agoKill unnecessary varSetElemsWellScoped in deriveTyData
Bartosz Nitka [Wed, 20 Apr 2016 15:54:10 +0000 (08:54 -0700)] 
Kill unnecessary varSetElemsWellScoped in deriveTyData

varSetElemsWellScoped introduces unnecessary non-determinism and it's possible
to do the same thing deterministically for the same price.

Test Plan: ./validate

Reviewers: austin, simonmar, bgamari, simonpj

Reviewed By: simonpj

Subscribers: thomie

Differential Revision:

GHC Trac Issues: #4012

(cherry picked from commit 687c77808b82e8cf8c77fba2c0ed2fe003c907cf)

3 years agoRemove some gratitious varSetElemsWellScoped
Bartosz Nitka [Fri, 15 Apr 2016 11:48:45 +0000 (04:48 -0700)] 
Remove some gratitious varSetElemsWellScoped

`varSetElemsWellScoped` uses `varSetElems` under the hood which
introduces unnecessary nondeterminism.
This does the same thing, possibly cheaper, while preserving

Test Plan: ./validate

Reviewers: simonmar, goldfire, austin, bgamari, simonpj

Reviewed By: simonpj

Subscribers: thomie, RyanGlScott

Differential Revision:

GHC Trac Issues: #4012

(cherry picked from commit 31e49746a5f2193e3a2161ea6e279e95b9068048)

3 years agoKill some unnecessary varSetElems
Bartosz Nitka [Fri, 15 Apr 2016 11:46:21 +0000 (04:46 -0700)] 
Kill some unnecessary varSetElems

When you do `varSetElems (tyCoVarsOfType x)` it's equivalent to
`tyCoVarsOfTypeList x`.

Why? If you look at the implementation:
tyCoVarsOfTypeList ty = runFVList $ tyCoVarsOfTypeAcc ty
tyCoVarsOfType ty = runFVSet $ tyCoVarsOfTypeAcc ty
they use the same helper function. The helper function returns a
deterministically ordered list and a set. The only difference
between the two is which part of the result they take. It is redundant
to take the set and then immediately convert it to a list.

This helps with determinism and we eventually want to replace the uses
of `varSetElems` with functions that don't leak the values of uniques.
This change gets rid of some instances that are easy to kill.

I chose not to annotate every place where I got rid of `varSetElems`
with a comment about non-determinism, because once we get rid of
`varSetElems` it will not be possible to do the wrong thing.

Test Plan: ./validate

Reviewers: goldfire, austin, simonmar, bgamari, simonpj

Reviewed By: simonpj

Subscribers: thomie

Differential Revision:

GHC Trac Issues: #4012

(cherry picked from commit 928d74733975fe4677e2b558d031779f58a0883c)

3 years agonativeGen: Allow -fregs-graph to be used
Ben Gamari [Mon, 20 Jun 2016 07:24:41 +0000 (09:24 +0200)] 
nativeGen: Allow -fregs-graph to be used

Previously the flag was silently ignored due the #7679 and #8657. This,
however, seems unnecessarily brutal and makes experimentation unduly
difficult for users.

Test Plan: Validate

Reviewers: austin, simonmar

Subscribers: thomie

Differential Revision:

GHC Trac Issues: #7679, #8657

(cherry picked from commit 6a5d13c4ade5bbb84873970065a1acd1546f6c31)

3 years agoghc-pkg: Drop trailing slashes in computing db paths
Ben Gamari [Mon, 20 Jun 2016 07:25:05 +0000 (09:25 +0200)] 
ghc-pkg: Drop trailing slashes in computing db paths

Test Plan: Validate, try tests in ticket

Reviewers: austin

Subscribers: thomie

Differential Revision:

GHC Trac Issues: #12194

(cherry picked from commit f68d40cbfc832a1dfc7742d02f76129ed80506e4)

3 years agoFix check_uniques in non-unicode locale
Thomas Miedema [Thu, 30 Jun 2016 08:32:00 +0000 (10:32 +0200)] 
Fix check_uniques in non-unicode locale

Testcase: `LC_ALL=C make -C utils/checkUniques`. Works with python2 and

Reviewed by: bgamari

Differential Revision:

(cherry picked from commit b65363d3eaffd453ca0790b34a5a4dc4354e176a)

3 years agorules/ stop xelatex on error
Markus Rothe [Sun, 26 Jun 2016 09:28:36 +0000 (11:28 +0200)] 
rules/ stop xelatex on error

This avoids the interactive prompt of xelatex on error.

(cherry picked from commit 6ba4197e006b6d6bc2657141d4c10c91bd806cb3)

3 years agoPrelInfo: Ensure that tuple promoted datacon names are in knownKeyNames
Ben Gamari [Fri, 3 Jun 2016 20:19:17 +0000 (22:19 +0200)] 
PrelInfo: Ensure that tuple promoted datacon names are in knownKeyNames

Previously the promoted datacons of the boxed tuple types were not
included in knownKeyNames, which lead to #12132.

Test Plan: Test with included TypeOf testcase

Reviewers: austin, simonpj

Reviewed By: simonpj

Subscribers: thomie

Differential Revision:

GHC Trac Issues: #12132

(cherry picked from commit 4aa299db6b1025822673713a110b17c002ddcfaf)

3 years agorel-notes: Fix Trac reference
Ben Gamari [Sat, 21 May 2016 18:56:32 +0000 (20:56 +0200)] 
rel-notes: Fix Trac reference

3 years agoRework ANNOUNCE
Ben Gamari [Sat, 21 May 2016 11:47:34 +0000 (13:47 +0200)] 

3 years agousers-guide: Fix index in PDF output
Ben Gamari [Sat, 21 May 2016 11:20:15 +0000 (13:20 +0200)] 
users-guide: Fix index in PDF output

The madness that is latex never ceases to amaze.

3 years agorules/sphinx: Add missing dependency on for pdf rule
Ben Gamari [Sat, 21 May 2016 11:13:26 +0000 (13:13 +0200)] 
rules/sphinx: Add missing dependency on for pdf rule

3 years agousers-guide: Vector version of Thomson-Wheeler logo
Ben Gamari [Sat, 21 May 2016 10:49:27 +0000 (12:49 +0200)] 
users-guide: Vector version of Thomson-Wheeler logo

3 years agoghc-boot(-th): Fix incorrect 'expose'-property and relax cabal-version
Herbert Valerio Riedel [Sat, 21 May 2016 14:15:10 +0000 (16:15 +0200)] 
ghc-boot(-th): Fix incorrect 'expose'-property and relax cabal-version

This is a follow-up to e303d93fecdcb748cd341ca69f803b8201a84f51

3 years agoAvoid double error on out-of-scope identifier
Simon Peyton Jones [Thu, 21 Apr 2016 13:34:07 +0000 (14:34 +0100)] 
Avoid double error on out-of-scope identifier

Trac #11941 demonstrated a case where an out-of-scope error also
gave rise to a (bogus and confusing) stage restriction message.

It's caused by the fact that out-of-scope errors do not stop
renaming, but rather return an "unbound name".  We need to
detect this in the stage-restriction test to avoid the double
error.  Easy fix.

(cherry picked from commit c2b7a3d9f6ad946a2cb2773e96a377cc2216cb5b)

3 years agoGive lifted primitive types a representation
Ben Gamari [Thu, 19 May 2016 19:05:30 +0000 (21:05 +0200)] 
Give lifted primitive types a representation

As of D1774 everything in GHC.Prim has a representation generated for it
by TcTypeable (see #11120). Unfortunately I evidently missed propagating
this change to lifted primitive types. This patch fixes this (#12082).

Test Plan: Validate

Reviewers: austin

Subscribers: thomie

Differential Revision:

GHC Trac Issues: #12082

(cherry picked from commit a88bb1b1518389817583290acaebfd6454aa3cec)

3 years agotestsuite: Add a TypeRep test
Ben Gamari [Thu, 19 May 2016 19:05:22 +0000 (21:05 +0200)] 
testsuite: Add a TypeRep test

Test Plan: Validate

Reviewers: goldfire, austin

Subscribers: thomie

Differential Revision:

GHC Trac Issues: #12082, #11120

(cherry picked from commit 2e6433af56a97ad9c501648afa5e1d8c6c17f82a)

3 years agoSet RELEASE=NO
Ben Gamari [Sat, 21 May 2016 09:20:10 +0000 (11:20 +0200)] 

3 years agorules/build-prog: Ensure programs depend upon their transitive deps ghc-8.0.1-release
Ben Gamari [Tue, 17 May 2016 16:05:24 +0000 (18:05 +0200)] 
rules/build-prog: Ensure programs depend upon their transitive deps

Previously programs only depended upon the direct dependencies; while I
would have thought that this would be sufficient, somehow we were
getting to the link step of building `ghc-pkg` before `ghc-boot-th` was
built (despite the fact that `ghc-boot` has a direct dependency on

See #12078.

(cherry picked from commit 5d80d14196ef048ffe037b2d92af2e9af0cb9e19)

3 years agorules: Fix name of ghc-boot-th library
Ben Gamari [Tue, 17 May 2016 13:18:37 +0000 (15:18 +0200)] 
rules: Fix name of ghc-boot-th library

There was a missing `#`. Hadrian couldn't come soon enough.

(cherry picked from commit a54d87a9e69746446adfe84a38d888861b3ec02b)

3 years agotestsuite: Bump expected 32-bit perf numbers for haddock.base
Ben Gamari [Tue, 17 May 2016 12:10:32 +0000 (14:10 +0200)] 
testsuite: Bump expected 32-bit perf numbers for haddock.base

3 years agoAdd ghc-boot-th to rules/foreachLibrary
Ben Gamari [Tue, 17 May 2016 07:53:00 +0000 (09:53 +0200)] 
Add ghc-boot-th to rules/foreachLibrary

This may have been the cause of various build failures on FreeBSD and

(cherry picked from commit 770d7085d6e3f3e74e3ffe318aeaf135cf3aea72)

3 years agoOne more update to haddock submodule
Ben Gamari [Mon, 16 May 2016 19:04:40 +0000 (21:04 +0200)] 
One more update to haddock submodule

Remove html_theme declaration.

3 years agoCache the size of part_list/scavd_list (#11783)
Simon Marlow [Tue, 12 Apr 2016 02:29:14 +0000 (19:29 -0700)] 
Cache the size of part_list/scavd_list (#11783)

After a parallel GC, it is possible to have a long list of blocks in
ws->part_list, if we did a lot of work stealing but didn't fill up the
blocks we stole.  These blocks persist until the next load-balanced GC,
which might be a long time, and during every GC we were traversing this
list to find its size.  The fix is to maintain the size all the time, so
we don't have to compute it.

(cherry picked from commit 5c4cd0e44657d52f7ca5fee63f8765d17f1fbe85)

3 years agoBump haddock submodule
Ben Gamari [Mon, 16 May 2016 15:03:21 +0000 (17:03 +0200)] 
Bump haddock submodule

This will be the 2.17.2 haddock release.

3 years agoDescribe ghc-boot-th in the release notes
Ben Gamari [Mon, 16 May 2016 15:49:52 +0000 (17:49 +0200)] 
Describe ghc-boot-th in the release notes

3 years agoghc-boot: Don't use reexported-modules
Ben Gamari [Mon, 16 May 2016 14:14:07 +0000 (16:14 +0200)] 
ghc-boot: Don't use reexported-modules

This isn't supported by GHC 7.8

3 years agoMove Extension type to ghc-boot-th
Ben Gamari [Mon, 16 May 2016 13:21:34 +0000 (15:21 +0200)] 
Move Extension type to ghc-boot-th

This creates a new package, `ghc-boot-th`, to contain the `Extension`
type, which now lives in `GHC.LanguageExtension.Type`. This ensures that
the transitive dependency set of the `template-haskell` package remains

The `GHC.LanguageExtensions.Type` module is also re-exported by
`ghc-boot`, which provides an orphan `binary` instance as well.

Test Plan: Validate

Reviewers: goldfire, thomie, hvr, austin

Reviewed By: thomie

Subscribers: RyanGlScott, thomie, erikd, ezyang

Differential Revision:

(cherry picked from commit eed820b672e6c3d23106cd151b1e31ce29326e32)

3 years agotestsuite/ImpSafe03: Normalize version of bytestring
Ben Gamari [Mon, 16 May 2016 13:56:09 +0000 (15:56 +0200)] 
testsuite/ImpSafe03: Normalize version of bytestring

(cherry picked from commit d78faa135921dfe7a6b92f908171af1a2cdce512)

3 years agoPPC: Implement SMP primitives using gcc built-ins
Peter Trommler [Mon, 16 May 2016 13:19:09 +0000 (15:19 +0200)] 
PPC: Implement SMP primitives using gcc built-ins

The SMP primitives were missing appropriate memory barriers
(sync, isync instructions) on all PowerPCs.

Use the built-ins _sync_* provided by gcc and clang. This
reduces code size significantly.

Remove broken mark for concprog001 on powerpc64. The referenced
ticket number (11259) was wrong.

Test Plan: validate on powerpc and ARM

Reviewers: erikd, austin, simonmar, bgamari, hvr

Reviewed By: bgamari, hvr

Subscribers: thomie

Differential Revision:

GHC Trac Issues: #12070

(cherry picked from commit 563a4857abcee4a6e43c68323274309c58f42aa0)

3 years agoPPC NCG: Fix pretty printing of st[wd]ux instr.
Peter Trommler [Mon, 16 May 2016 13:16:49 +0000 (15:16 +0200)] 
PPC NCG: Fix pretty printing of st[wd]ux instr.

Printing STU was mixed up. The tab character must appear
after the 'x'.

Test Plan: validate on powerpc

Reviewers: bgamari, austin, erikd

Reviewed By: austin, erikd

Subscribers: thomie

Differential Revision:

GHC Trac Issues: #12054

(cherry picked from commit 2dbdc79bb9e2760394ebfe630908813b630146c7)

3 years agoBump bytestring submodule to
Ben Gamari [Mon, 16 May 2016 13:19:39 +0000 (15:19 +0200)] 
Bump bytestring submodule to

3 years agoAnother haddock submodule bump
Ben Gamari [Sat, 14 May 2016 07:59:12 +0000 (09:59 +0200)] 
Another haddock submodule bump

This resolves #12058.

Thanks to P├íli for tidentifying this issue so clearly.

3 years agoBump haddock submodule
Ben Gamari [Wed, 11 May 2016 21:16:46 +0000 (23:16 +0200)] 
Bump haddock submodule

Fixes `make clean`.

3 years agoBump haddock submodule
Ben Gamari [Wed, 11 May 2016 21:16:46 +0000 (23:16 +0200)] 
Bump haddock submodule

Ensures that haddock documentation is built as part of the `all` target.

3 years Prepare for 8.0.1 release
Ben Gamari [Tue, 10 May 2016 21:48:38 +0000 (23:48 +0200)] Prepare for 8.0.1 release

3 years agoHandle promotion failures when scavenging a WEAK (#11108)
Takano Akio [Wed, 11 May 2016 12:45:29 +0000 (14:45 +0200)] 
Handle promotion failures when scavenging a WEAK (#11108)

Previously, we ignored promotion failures when evacuating fields of
a WEAK object. When a failure happens, this resulted in an WEAK object
pointing to another object in a younger generation, causing crashes.

I used the test case from #11746 to check that the fix is working.
However I haven't managed to produce a test case that quickly reproduces
the issue.

Test Plan: ./validate

Reviewers: austin, bgamari, simonmar

Reviewed By: simonmar

Subscribers: thomie

Differential Revision:

GHC Trac Issues: #11108

(cherry picked from commit 9363f04d0ff22f3d898af35bb5432c4287e6dc9a)

3 years agorelnotes: Fix ticket number yet again
Ben Gamari [Wed, 11 May 2016 08:10:04 +0000 (10:10 +0200)] 
relnotes: Fix ticket number yet again

3 years agorelnotes: Fix typo in ticket number
Ben Gamari [Tue, 10 May 2016 21:38:41 +0000 (23:38 +0200)] 
relnotes: Fix typo in ticket number

Thanks Mikhail!

3 years agorelnotes: Update submodule versions
Ben Gamari [Tue, 10 May 2016 21:36:49 +0000 (23:36 +0200)] 
relnotes: Update submodule versions

3 years agousers-guide: Fix former base version number
Ben Gamari [Tue, 10 May 2016 21:28:57 +0000 (23:28 +0200)] 
users-guide: Fix former base version number

3 years agousers-guide: Add -Wnoncanonical-semigroup-instances to relnotes
Ben Gamari [Tue, 10 May 2016 21:27:01 +0000 (23:27 +0200)] 
users-guide: Add -Wnoncanonical-semigroup-instances to relnotes

3 years agousers-guide: Note #11995 in release notes
Ben Gamari [Tue, 10 May 2016 20:58:27 +0000 (22:58 +0200)] 
users-guide: Note #11995 in release notes

3 years agoBump haddock submodule
Ben Gamari [Tue, 10 May 2016 16:24:34 +0000 (18:24 +0200)] 
Bump haddock submodule

3 years agoRdrHsSyn: Only suggest `type` qualification when appropriate
Ben Gamari [Tue, 10 May 2016 09:02:19 +0000 (11:02 +0200)] 
RdrHsSyn: Only suggest `type` qualification when appropriate

This suggestion only applies to operators.

3 years agoForbid variables to be parents in import lists.
Matthew Pickering [Tue, 10 May 2016 06:41:46 +0000 (08:41 +0200)] 
Forbid variables to be parents in import lists.

In the long discussion on #11432, it was decided that when a type
constructor is parsed as a variable ((--.->) is one example) then in
order to export the type constructor then the user should be required to
use the ExplicitNamespaces keyword.

This was implemented in quite an indirect manner in the renamer. It
is much more direct to enforce this in the parser at the expense of
slighty worse error messages. Further to this, the check in the
renamer was actually slightly wrong. If the variable was in scope
then no error was raised, this was causing panics, see #12026 for an

Reviewers: austin, bgamari

Subscribers: davean, skvadrik, thomie

Differential Revision:

GHC Trac Issues: #12026

3 years agorel-notes: Group together warning-related items, add
Ben Gamari [Sat, 7 May 2016 08:55:31 +0000 (10:55 +0200)] 
rel-notes: Group together warning-related items, add

Mention -fshow-warning-groups, etc.

3 years agorelnotes: Note portability improvements
Ben Gamari [Sat, 7 May 2016 08:43:19 +0000 (10:43 +0200)] 
relnotes: Note portability improvements

3 years agobase: Add release date to changelog
Ben Gamari [Sat, 7 May 2016 07:30:20 +0000 (09:30 +0200)] 
base: Add release date to changelog

3 years agousers-guide/relnotes: Document -Weverything and -Wdefault
Ben Gamari [Sat, 7 May 2016 07:29:41 +0000 (09:29 +0200)] 
users-guide/relnotes: Document -Weverything and -Wdefault

3 years agousers-guide: Document
Ben Gamari [Sat, 7 May 2016 07:16:28 +0000 (09:16 +0200)] 
users-guide: Document

3 years agousers-guide: Clean up version numbers and TODOs
Ben Gamari [Sat, 7 May 2016 07:09:39 +0000 (09:09 +0200)] 
users-guide: Clean up version numbers and TODOs

3 years agoghc-boot: Bump version number in changelog
Ben Gamari [Sat, 7 May 2016 07:09:27 +0000 (09:09 +0200)] 
ghc-boot: Bump version number in changelog

3 years agoUpdate time submodule to release tag
Herbert Valerio Riedel [Sat, 7 May 2016 06:41:54 +0000 (08:41 +0200)] 
Update time submodule to release tag

(cherry picked from commit 633b099cb683b3d2e9bb2776ecaa7a83e5736de7)

3 years agoBump Win32 submodule to
Ben Gamari [Thu, 5 May 2016 12:57:48 +0000 (14:57 +0200)] 
Bump Win32 submodule to

3 years agoBump time submodule
Ben Gamari [Thu, 5 May 2016 09:44:30 +0000 (11:44 +0200)] 
Bump time submodule

This isn't quite a valid release yet but at least it's closer.

3 years agoUpdate bytestring submodule to release tag
Herbert Valerio Riedel [Tue, 3 May 2016 22:45:43 +0000 (00:45 +0200)] 
Update bytestring submodule to release tag

(cherry picked from commit 4466ae6451b9d4ecf5fbb6851c41b00c60ec7d5c)

3 years agoUpdate libraries/hpc submodule to v0.6.0.3 release tag
Herbert Valerio Riedel [Tue, 3 May 2016 20:11:59 +0000 (22:11 +0200)] 
Update libraries/hpc submodule to v0.6.0.3 release tag

(cherry picked from commit 0051ac1786ccdf0fb9babf188a9f9bc0da2ce520)

3 years agoUpdate Cabal submodule to v1.24.0.0 releas tag
Herbert Valerio Riedel [Tue, 3 May 2016 20:16:36 +0000 (22:16 +0200)] 
Update Cabal submodule to v1.24.0.0 releas tag

3 years agoderiveConstants: Fix nm advice one last time
Ben Gamari [Sun, 1 May 2016 16:05:28 +0000 (18:05 +0200)] 
deriveConstants: Fix nm advice one last time

Missing a close paren.

3 years agoBump haddock submodule
Ben Gamari [Sun, 1 May 2016 11:23:20 +0000 (13:23 +0200)] 
Bump haddock submodule

Fixes documentation installation.

3 years agousers-guide: Add index entry for "environment file"
Ben Gamari [Sun, 1 May 2016 11:21:55 +0000 (13:21 +0200)] 
users-guide: Add index entry for "environment file"

(cherry picked from commit 5a7149711a7c15a3434dd8e19bea77c57ff9879d)

3 years agoRecommend more reliable recourse for broken nm
Ben Gamari [Thu, 28 Apr 2016 08:11:13 +0000 (10:11 +0200)] 
Recommend more reliable recourse for broken nm

xcrun --find seems like the appropriate choice here. Thanks to Brandon
Allbery for suggesting this.

(cherry picked from commit a0e10510c64182c7126ff426127ea8fd78c07d00)

3 years agoDocument -fmax-pmcheck-iterations a bit better
Ben Gamari [Wed, 27 Apr 2016 07:57:41 +0000 (09:57 +0200)] 
Document -fmax-pmcheck-iterations a bit better

(cherry picked from commit 5adf8f3b74a4ee11d594b9993493bed4e3521ce2)

3 years agoderiveConstants: Fix nm-classic error message
Ben Gamari [Sun, 24 Apr 2016 09:31:51 +0000 (11:31 +0200)] 
deriveConstants: Fix nm-classic error message

Thanks to George Colpitts for the suggestion.

(cherry picked from commit 28503fe984dbc00f687f0579967d583eebb9afcb)

3 years agoAdjust error check for class method types ghc-8.0.1-rc4
Simon Peyton Jones [Fri, 15 Apr 2016 10:49:23 +0000 (11:49 +0100)] 
Adjust error check for class method types

Fixes Trac #11793.  Nothing deep here.

(cherry picked from commit e24b3b1eeba91bd5b127261652b48eae2d4751b1)

3 years agoBump bytestring submodule
Ben Gamari [Thu, 21 Apr 2016 21:17:18 +0000 (23:17 +0200)] 
Bump bytestring submodule

3 years agoRevert "rts/timer: use timerfd_* on Linux instead of alarm signals"
Ben Gamari [Thu, 21 Apr 2016 11:30:45 +0000 (13:30 +0200)] 
Revert "rts/timer: use timerfd_* on Linux instead of alarm signals"

This reverts commit bbdc52f3a6e6a28e209fb8f65699121d4ef3a4e3.

3 years agoRevert "rtx/posix/Itimer.c: Handle return value of `read`"
Ben Gamari [Thu, 21 Apr 2016 11:30:43 +0000 (13:30 +0200)] 
Revert "rtx/posix/Itimer.c: Handle return value of `read`"

This reverts commit fd3e581b7c9142247601774afc98e49f63b8af45.

3 years agoRevert "rts/posix/Itimer.c: Handle EINTR when reading timerfd"
Ben Gamari [Thu, 21 Apr 2016 11:30:41 +0000 (13:30 +0200)] 
Revert "rts/posix/Itimer.c: Handle EINTR when reading timerfd"

This reverts commit 37936e2b23e58b8a855b7ece5a375b930d1a29bc.

3 years agoMove DFunUnfolding generation to TcInstDcls
Simon Peyton Jones [Wed, 23 Mar 2016 15:37:50 +0000 (15:37 +0000)] 
Move DFunUnfolding generation to TcInstDcls

The desugarer had a fragile case to generate the Unfolding for a
DFun. This patch moves the unfolding generation to TcInstDcls, where
all the pieces are to hand.

Fixes Trac #11742

(cherry picked from commit db9e4eb4e3fe916df7a69da1b211083ad6068aff)

3 years agoBump Cabal submodule
Ben Gamari [Wed, 20 Apr 2016 21:06:19 +0000 (23:06 +0200)] 
Bump Cabal submodule

3 years agoEnsure Typeable declarations end up in boot interface files
Ben Gamari [Wed, 20 Apr 2016 10:05:13 +0000 (12:05 +0200)] 
Ensure Typeable declarations end up in boot interface files

Previously we neglected to emit Typeable TyCon and Module declarations
when typechecking boot interface files. This resulted in #11824.

Ultimately we'll likely want to do a bit of cleaning in this area but in
the interest of getting some sort of fix in I'm merging this. Further
clean-ups to come.

Test Plan: Validate

Reviewers: simonpj, austin

Subscribers: thomie

Differential Revision:

GHC Trac Issues: #11824

(cherry picked from commit 048d6187b5892502e9bc75abfb21f9bd848a29cb)

3 years agoBump haddock submodule
Ben Gamari [Wed, 20 Apr 2016 09:47:31 +0000 (11:47 +0200)] 
Bump haddock submodule

Install files needed for --hyperlinked-source. Fixes #11949.

3 years agoUpdate unix submodule to v2.7.2.0 release
Herbert Valerio Riedel [Tue, 19 Apr 2016 21:40:52 +0000 (23:40 +0200)] 
Update unix submodule to v2.7.2.0 release

(cherry picked from commit 81b14c141dc385dbb0de00ea72217185cfa22a09)

3 years agoUpdate binary submodule to release
Herbert Valerio Riedel [Tue, 19 Apr 2016 20:33:58 +0000 (22:33 +0200)] 
Update binary submodule to release

(cherry picked from commit ff290b86ad237d1a5517ad9414a22840f6e749da)

3 years agoUpdate deepseq submodule to latest snapshot
Herbert Valerio Riedel [Tue, 19 Apr 2016 17:16:01 +0000 (19:16 +0200)] 
Update deepseq submodule to latest snapshot

NB: this needs 91ee5090f1e3f43e9e803cf7005a7f3357e58377
(cherry picked from commit 96e1bb4536a6f130c9242e3c25566c7d2e71ee97)

3 years agoMark GHC.Stack.Types Trustworthy
Herbert Valerio Riedel [Tue, 19 Apr 2016 16:32:29 +0000 (18:32 +0200)] 
Mark GHC.Stack.Types Trustworthy

GHC can't infer this module safe due to the `GHC.Types (Char, Int)`
and the  (dummy) `GHC.Integer ()` import.

If only `GHC.Types` was marked Trustworthy or Safe...

(cherry picked from commit 91ee5090f1e3f43e9e803cf7005a7f3357e58377)

3 years agoUpdate hsc2hs submodule
Herbert Valerio Riedel [Tue, 19 Apr 2016 11:56:54 +0000 (13:56 +0200)] 
Update hsc2hs submodule

This bumps the hsc2hs version to 0.68

(cherry picked from commit 81e227929c15ad82f6f67a7390ee140da85eefdb)

3 years agoUpdate `directory` submodule to v1.2.6.2 release
Herbert Valerio Riedel [Tue, 19 Apr 2016 07:00:54 +0000 (09:00 +0200)] 
Update `directory` submodule to v1.2.6.2 release

The v1.2.6.1 release uploaded to Hackage is broken, we don't
want to bundle a release that's non-installable from Hackage

(cherry picked from commit 8556f56b71f979f70f503e1d23a822b21947f7ab)

3 years agorts: Don't use strndup
Ben Gamari [Mon, 18 Apr 2016 20:32:59 +0000 (22:32 +0200)] 
rts: Don't use strndup

Reviewers: austin

Subscribers: thomie

Differential Revision:

(cherry picked from commit d1ce35d2271ac8b79cb5e37677b1a989749e611c)

3 years agorts: Limit maximum backtrace depth
Ben Gamari [Sun, 10 Apr 2016 22:49:06 +0000 (00:49 +0200)] 
rts: Limit maximum backtrace depth

This prevents us from entering an infinite loop in the event of a
hitting bad unwinding information.

(cherry picked from commit 350ffc3e4c6b3aefd6ae621991564cc28f585d46)

3 years agoMake it easy to get hyperlinked sources
Bartosz Nitka [Mon, 18 Apr 2016 13:29:37 +0000 (06:29 -0700)] 
Make it easy to get hyperlinked sources

The version of `haddock` that ghc has as a submodule has an option
for generating linkified sources. I don't think it hurts to have this
and they are great for exploring the codebase.

I'd be nice if harbormaster or travis published them somewhere, but
I don't know how to do that yet.

Test Plan:
uncomment, run `make` and look at the
nicely linkified sources in `compiler/stage2/doc/html/ghc/`

Reviewers: hvr, austin, bgamari

Reviewed By: bgamari

Subscribers: thomie, simonmar

Differential Revision:

(cherry picked from commit 3dac53fa3ede70e86ddb6f40e1e96feb61301754)

3 years agorelnotes: Add note about #11744 and workaround
Ben Gamari [Mon, 18 Apr 2016 13:13:41 +0000 (15:13 +0200)] 
relnotes: Add note about #11744 and workaround

Test Plan: Read it

Reviewers: hvr, austin

Subscribers: carter, thomie

Differential Revision:

GHC Trac Issues: #11744

(cherry picked from commit 03d1fd63914bd0c769fa0444d3ef1a5ddfee220d)

3 years agoUpdate haskeline submodule to release
Herbert Valerio Riedel [Sun, 17 Apr 2016 18:42:43 +0000 (20:42 +0200)] 
Update haskeline submodule to release

(cherry picked from commit 8a75bb5874070bc879818bba572a94632cf079d5)

3 years agoSilence unused-import warning introduced by 93d85af9fec968b
Herbert Valerio Riedel [Sun, 17 Apr 2016 16:39:36 +0000 (18:39 +0200)] 
Silence unused-import warning introduced by 93d85af9fec968b

(cherry picked from commit dd920e43b887bf5288ec364fd416f5e593c693e6)

3 years agoUpdate `directory` submodule to v1.2.6.1 release
Herbert Valerio Riedel [Sun, 17 Apr 2016 15:39:13 +0000 (17:39 +0200)] 
Update `directory` submodule to v1.2.6.1 release

This fixes a build-failure on OSX

(cherry picked from commit 93d85af9fec968b43452891ec7b10382a4a99a38)

3 years agoResolve symlinks when attempting to find GHC's lib folder on Windows
Tamar Christina [Sun, 17 Apr 2016 15:11:02 +0000 (17:11 +0200)] 
Resolve symlinks when attempting to find GHC's lib folder on Windows

Systools makes some pretty hard assumptions about where GHC is on Windows.
One of these is that ghc be in a folder named `bin` and that `../lib` exists.

This pattern doesn't hold for symlinks as a link `C:\ghc-bin\`
pointing to `C:\ghc\ghc-7.10.3\bin` will break this assumption.

This patch resolves symlinks by finding where they point to and uses that location
as the base for GHC.

This uses an API that's been introduced in Vista. For older systems it falls back to
the current behavior of not resolving symlinks.

Test Plan:
1) Create symlink to GHC's bin folder.
2) Run GHC from that folder.

Reviewers: austin, bgamari

Reviewed By: austin

Subscribers: #ghc_windows_task_force, thomie

Differential Revision:

GHC Trac Issues: #11759

(cherry picked from commit a3922083e8f41fc236972564dc2978f2a2d4ec13)

3 years agoCheck CCS tree for pointers into shared object during checkUnload
Andrew Farmer [Sun, 17 Apr 2016 12:43:24 +0000 (14:43 +0200)] 
Check CCS tree for pointers into shared object during checkUnload

Prevent shared objects from being unloaded if cost centre stacks point
at the object. This will prevent segfault in #11776, but also prevents
objects from ever being unloaded when profiling. Pruning CCS tree will
enable that in another diff.

Test Plan: make TEST=linker_profiled, examine

Reviewers: austin, simonmar, bgamari

Reviewed By: simonmar, bgamari

Subscribers: thomie

Differential Revision:

GHC Trac Issues: #11776

(cherry picked from commit 36a0b6dc27ae0ee2022afbef5d3cd49dfde9e82b)

3 years agovalidate: Note existence of config_args variable
Ben Gamari [Sun, 17 Apr 2016 11:25:05 +0000 (13:25 +0200)] 
validate: Note existence of config_args variable

(cherry picked from commit 07dc330736103eee4b94607ef488b3578155f82b)

3 years agousers-guide: Fix typo
Ben Gamari [Sun, 17 Apr 2016 11:21:07 +0000 (13:21 +0200)] 
users-guide: Fix typo

(cherry picked from commit 7a1c07314c0955db822b84108aba0670adb0f9a5)