4 weeks agoFix #16517 by bumping the TcLevel for method sigs wip/backport-MR951
Richard Eisenberg [Wed, 5 Jun 2019 22:02:13 +0000 (18:02 -0400)] 
Fix #16517 by bumping the TcLevel for method sigs

There were actually two bugs fixed here:

1. candidateQTyVarsOfType needs to be careful that it does not
   try to zap metavariables from an outer scope as "naughty"
   quantification candidates. This commit adds a simple check
   to avoid doing so.

2. We weren't bumping the TcLevel in kcHsKindSig, which was used
   only for class method sigs. This mistake led to the acceptance

     class C a where
       meth :: forall k. Proxy (a :: k) -> ()

   Note that k is *locally* quantified. This patch fixes the
   problem by using tcClassSigType, which correctly bumps the
   level. It's a bit inefficient because tcClassSigType does other
   work, too, but it would be tedious to repeat much of the code
   there with only a few changes. This version works well and is

And, while updating comments, etc., I noticed that tcRnType was
missing a pushTcLevel, leading to #16767, which this patch also
fixes, by bumping the level. In the refactoring here, I also
use solveEqualities. This initially failed ghci/scripts/T15415,
but that was fixed by teaching solveEqualities to respect

This patch also cleans up some Notes around error generation that
came up in conversation.

Test case: typecheck/should_fail/T16517, ghci/scripts/T16767

(cherry picked from commit a22e51ea6f7a046c87d57ce30d143eef6abee9ff)

5 weeks agotestsuite: Mark threadstatus-T9333 as fragile in ghci way wip/backport-fragile
Ben Gamari [Mon, 8 Apr 2019 14:35:51 +0000 (10:35 -0400)] 
testsuite: Mark threadstatus-T9333 as fragile in ghci way

As noted in #16555.

(cherry picked from commit 64b1684da09ddb3dc480bd0370adc7b002657a39)

5 weeks agotestsuite: Fix fragile_for test modifier
Ben Gamari [Sat, 6 Apr 2019 13:37:52 +0000 (09:37 -0400)] 
testsuite: Fix fragile_for test modifier

(cherry picked from commit 658199cce0aabeed77f3bbbbde6abc0c5c3cc83d)

5 weeks agotestsuite: Mark T13167 as fragile in threaded2
Ben Gamari [Fri, 5 Apr 2019 02:25:23 +0000 (22:25 -0400)] 
testsuite: Mark T13167 as fragile in threaded2

As noted in #16536.

(cherry picked from commit b351004702c1a595bcedfa3ffeb4f816d5fd8503)

5 weeks agobase: Mark CPUTime001 as fragile
Ben Gamari [Thu, 30 May 2019 13:29:37 +0000 (09:29 -0400)] 
base: Mark CPUTime001 as fragile

As noted in #16224, CPUTime001 has been quite problematic, reporting
non-monotonic timestamps in CI. Unfortunately I've been unable to
reproduce this locally.

(cherry picked from commit 1a3420cabdcf6d7d90c154681230f1150604c097)

5 weeks agotestsuite: Mark heapprof001 as fragile on all platforms
Ben Gamari [Sat, 2 Mar 2019 03:57:55 +0000 (22:57 -0500)] 
testsuite: Mark heapprof001 as fragile on all platforms

See #15382.

(cherry picked from commit 23fc615679072a6fa433460a92f597af2ae388b2)

5 weeks agotestsuite: Mark heapprof001 as fragile on i386
Ben Gamari [Tue, 26 Feb 2019 15:14:02 +0000 (10:14 -0500)] 
testsuite: Mark heapprof001 as fragile on i386

(cherry picked from commit 910185a3eb5fd2148e42d39f6374ab03d098b682)

5 weeks agotestsuite: Introduce fragile modifier
Ben Gamari [Tue, 26 Feb 2019 15:13:44 +0000 (10:13 -0500)] 
testsuite: Introduce fragile modifier

Now since we have been a bit more stringent in testsuite cleanliness we
have been marking a lot of tests as fragile using the `skip` modifier.
However, this unfortunately means that we lose the association with the
ticket number documenting the fragility.

Here we introduce `fragile` and `fragile_for` to retain this

(cherry picked from commit 4ca271d1880a6f4c5f49869de7f1920a2073adb6)

5 weeks agoBump binary to
Ben Gamari [Fri, 7 Jun 2019 21:34:16 +0000 (17:34 -0400)] 
Bump binary to

5 weeks agoBump Cabal submodule
Ben Gamari [Wed, 5 Jun 2019 00:37:31 +0000 (20:37 -0400)] 
Bump Cabal submodule

6 weeks agoBump time submodule to 1.9.3
Ben Gamari [Wed, 5 Jun 2019 00:34:27 +0000 (20:34 -0400)] 
Bump time submodule to 1.9.3

6 weeks agoBump terminfo to
Ben Gamari [Wed, 5 Jun 2019 00:31:38 +0000 (20:31 -0400)] 
Bump terminfo to

6 weeks agoHaddock for hiefile-header
Ben Gamari [Tue, 4 Jun 2019 22:59:31 +0000 (18:59 -0400)] 
Haddock for hiefile-header

6 weeks agoFix ghc-in-ghci
Ben Gamari [Tue, 4 Jun 2019 22:59:24 +0000 (18:59 -0400)] 
Fix ghc-in-ghci

6 weeks agoMerge branch '8.8-haddock-release' of into wip...
Ben Gamari [Tue, 4 Jun 2019 22:54:55 +0000 (18:54 -0400)] 
Merge branch '8.8-haddock-release' of into wip/ghc-8.8-merges

6 weeks agoAdd missing import
Ben Gamari [Tue, 4 Jun 2019 22:18:44 +0000 (18:18 -0400)] 
Add missing import

Missing from f8d24178f30b7837b35a9ea328bc6f520092ff08.

6 weeks agoMerge branch 'hiefile-header-8.8' of into wip...
Ben Gamari [Tue, 4 Jun 2019 22:07:26 +0000 (18:07 -0400)] 
Merge branch 'hiefile-header-8.8' of into wip/ghc-8.8-merges

6 weeks agoMerge branch 'wip/8-8-ghci' of into wip/ghc-8.8-merges
Ben Gamari [Tue, 4 Jun 2019 22:06:59 +0000 (18:06 -0400)] 
Merge branch 'wip/8-8-ghci' of into wip/ghc-8.8-merges

6 weeks agoMerge branch 'cherry-pick-e172a6d1' of into wip/ghc-8...
Ben Gamari [Tue, 4 Jun 2019 22:04:04 +0000 (18:04 -0400)] 
Merge branch 'cherry-pick-e172a6d1' of into wip/ghc-8.8-merges

6 weeks agoMerge branch 'wip/backport-ecc9366a0e0db107c286935130837b2222e2dd82' of https://gitla...
Ben Gamari [Tue, 4 Jun 2019 22:03:41 +0000 (18:03 -0400)] 
Merge branch 'wip/backport-ecc9366a0e0db107c286935130837b2222e2dd82' of into wip/ghc-8.8-merges

6 weeks agoMerge branch 'hie-backports-8.8' of into wip...
Ben Gamari [Tue, 4 Jun 2019 22:03:03 +0000 (18:03 -0400)] 
Merge branch 'hie-backports-8.8' of into wip/ghc-8.8-merges

6 weeks agoMerge remote-tracking branch 'osa1/port_16449_ghc_8_8' into wip/ghc-8.8-merges
Ben Gamari [Tue, 4 Jun 2019 22:02:11 +0000 (18:02 -0400)] 
Merge remote-tracking branch 'osa1/port_16449_ghc_8_8' into wip/ghc-8.8-merges

6 weeks agoMerge remote-tracking branch 'origin/cherry-pick-43a43a33' into wip/ghc-8.8-merges
Ben Gamari [Tue, 4 Jun 2019 22:01:54 +0000 (18:01 -0400)] 
Merge remote-tracking branch 'origin/cherry-pick-43a43a33' into wip/ghc-8.8-merges

6 weeks agoMerge remote-tracking branch 'osa1/backport_t16066' into wip/ghc-8.8-merges
Ben Gamari [Tue, 4 Jun 2019 22:00:59 +0000 (18:00 -0400)] 
Merge remote-tracking branch 'osa1/backport_t16066' into wip/ghc-8.8-merges

6 weeks agotestsuite: Mark concprog001 as fragile
Ben Gamari [Fri, 26 Apr 2019 04:54:21 +0000 (00:54 -0400)] 
testsuite: Mark concprog001 as fragile

Due to #16604.

6 weeks agoUse datatype for unboxed returns when loading ghc into ghci wip/8-8-ghci
Michael Sloan [Fri, 15 Mar 2019 00:26:51 +0000 (17:26 -0700)] 
Use datatype for unboxed returns when loading ghc into ghci

See #13101 and #15454

(cherry picked from commit 64959e51bf17a9f991cc345476a40515e7b32d81)

6 weeks agoExtract out use of UnboxedTuples from GHCi.Leak
Michael Sloan [Thu, 14 Mar 2019 23:12:09 +0000 (16:12 -0700)] 
Extract out use of UnboxedTuples from GHCi.Leak

See #13101 + #15454 for motivation.  This change reduces the number of
modules that need to be compiled to object code when loading GHC into

(cherry picked from commit c01d5af31c8feb634fc3dffc84e6e7ece61ba190)

6 weeks agoRemove unnecessary uses of UnboxedTuples pragma (see #13101 / #15454)
Michael Sloan [Thu, 14 Mar 2019 23:01:44 +0000 (16:01 -0700)] 
Remove unnecessary uses of UnboxedTuples pragma (see #13101 / #15454)

Also removes a couple unnecessary MagicHash pragmas

(cherry picked from commit 061276ea5d265eb3c23a3698f0a10f6a764ff4b4)

6 weeks agoAdd PlainPanic for throwing exceptions without depending on pprint
Michael Sloan [Thu, 14 Mar 2019 22:47:44 +0000 (15:47 -0700)] 
Add PlainPanic for throwing exceptions without depending on pprint

This commit splits out a subset of GhcException which do not depend on
pretty printing (SDoc), as a new datatype called
PlainGhcException. These exceptions can be caught as GhcException,
because 'fromException' will convert them.

The motivation for this change is that that the Panic module
transitively depends on many modules, primarily due to pretty printing
code.  It's on the order of about 130 modules.  This large set of
dependencies has a few implications:

1. To avoid cycles / use of boot files, these dependencies cannot
throw GhcException.

2. There are some utility modules that use UnboxedTuples and also use
`panic`. This means that when loading GHC into GHCi, about 130
additional modules would need to be compiled instead of
interpreted. Splitting the non-pprint exception throwing into a new
module resolves this issue. See #13101

(cherry picked from commit fe9034e9b4820214a8c703bd8a3146ce6eed37b8)

6 weeks agoHave GHCi use object code for UnboxedTuples modules #15454
Michael Sloan [Thu, 14 Mar 2019 06:04:41 +0000 (23:04 -0700)] 
Have GHCi use object code for UnboxedTuples modules #15454

The idea is to automatically enable -fobject-code for modules that use
UnboxedTuples, along with all the modules they depend on. When looking
into how to solve this, I was pleased to find that there was already
highly similar logic for enabling code generation when -fno-code is
specified but TemplateHaskell is used.

The state before this patch was that if you used unboxed tuples then you
had to enable `-fobject-code` globally rather than on a per module

6 weeks agoBump Haddock submodule to 2.23 release
Alec Theriault [Mon, 27 May 2019 14:28:47 +0000 (10:28 -0400)] 
Bump Haddock submodule to 2.23 release

This commit of Haddock is (hopefully) going to be the one corresponding
to a Hackage release of Haddock 2.23.

6 weeks agoMake header human readable
Zubin Duggal [Sat, 25 May 2019 18:08:35 +0000 (23:38 +0530)] 
Make header human readable

6 weeks agoFix and enforce validation of header for .hie files
Zubin Duggal [Thu, 23 May 2019 11:43:33 +0000 (17:13 +0530)] 
Fix and enforce validation of header for .hie files

Implements #16686

automatically generate hieVersion from ghc version

6 weeks agoHandle hs-boot files in -Wmissing-home-modules (#16551) cherry-pick-43a43a33
Krzysztof Gogolewski [Tue, 9 Apr 2019 11:51:29 +0000 (11:51 +0000)] 
Handle hs-boot files in -Wmissing-home-modules (#16551)

(cherry picked from commit 43a43a3319d68c1692df6acdf283109cb5c030d8)

6 weeks agoFix arity type of coerced types in CoreArity
Ömer Sinan Ağacan [Wed, 29 May 2019 10:18:58 +0000 (13:18 +0300)] 
Fix arity type of coerced types in CoreArity

Previously if we had

    f |> co

where `f` had arity type `ABot N` and `co` had arity M and M < N,
`arityType` would return `ABot M` which is wrong, because `f` is only
known to diverge when applied to `N` args, as described in Note

    If at = ABot n, then (f x1..xn) definitely diverges. Partial
    applications to fewer than n args may *or may not* diverge.

This caused incorrect eta expansion in the simplifier, causing #16066.

We now return `ATop M` for the same expression so the simplifier can't
assume partial applications of `f |> co` is divergent.

A regression test T16066 is also added.

6 weeks agoFix rewriting invalid shifts to errors
Ömer Sinan Ağacan [Fri, 24 May 2019 08:23:01 +0000 (11:23 +0300)] 
Fix rewriting invalid shifts to errors

Fixes #16449.

5341edf3 removed a code in rewrite rules for bit shifts, which broke the
"silly shift guard", causing generating invalid bit shifts or heap
overflow in compile time while trying to evaluate those invalid bit

The "guard" is explained in Note [Guarding against silly shifts] in

More specifically, this was the breaking change:

    --- a/compiler/prelude/PrelRules.hs
    +++ b/compiler/prelude/PrelRules.hs
    @@ -474,12 +474,11 @@ shiftRule shift_op
            ; case e1 of
                _ | shift_len == 0
                  -> return e1
    -             | shift_len < 0 || wordSizeInBits dflags < shift_len
    -             -> return (mkRuntimeErrorApp rUNTIME_ERROR_ID wordPrimTy
    -                                        ("Bad shift length" ++ show shift_len))

This patch reverts this change.

Two new tests added:

- T16449_1: The original reproducer in #16449. This was previously
  casing a heap overflow in compile time when CmmOpt tries to evaluate
  the large (invalid) bit shift in compile time, using `Integer` as the
  result type. Now it builds as expected. We now generate an error for
  the shift as expected.

- T16449_2: Tests code generator for large (invalid) bit shifts.

6 weeks agoImprove targetContents code docs
Daniel Gröber [Tue, 28 May 2019 13:59:26 +0000 (15:59 +0200)] 
Improve targetContents code docs

6 weeks agoAdd depanalPartial to make getting a partial modgraph easier
Daniel Gröber [Sun, 26 May 2019 09:28:34 +0000 (11:28 +0200)] 
Add depanalPartial to make getting a partial modgraph easier

As per @mpickering's suggestion on IRC this is to make the partial
module-graph more easily accessible for API clients which don't intend to
re-implementing depanal.

6 weeks agoPartialDownsweep: Add test for import errors
Daniel Gröber [Sun, 26 May 2019 09:24:47 +0000 (11:24 +0200)] 
PartialDownsweep: Add test for import errors

6 weeks agoCatch preprocessor errors in downsweep
Daniel Gröber [Sat, 25 May 2019 11:57:45 +0000 (13:57 +0200)] 
Catch preprocessor errors in downsweep

This changes the way preprocessor failures are presented to the
user. Previously the user would simply get an unlocated message on stderr
such as:

    `gcc' failed in phase `C pre-processor'. (Exit code: 1)

Now at the problematic source file is mentioned:

    A.hs:1:1: error:
        `gcc' failed in phase `C pre-processor'. (Exit code: 1)

This also makes live easier for GHC API clients as the preprocessor error
is now thrown as a SourceError exception.

6 weeks agoMake downsweep return all errors per-module instead of throwing some
Daniel Gröber [Sat, 25 May 2019 09:27:22 +0000 (11:27 +0200)] 
Make downsweep return all errors per-module instead of throwing some

This enables API clients to handle such errors instead of immideately
crashing in the face of some kinds of user errors, which is arguably quite
bad UX.

Fixes #10887

6 weeks agoRefactor summarise{File,Module} to extract checkSummaryTimestamp
Daniel Gröber [Fri, 24 May 2019 13:02:45 +0000 (15:02 +0200)] 
Refactor summarise{File,Module} to extract checkSummaryTimestamp

This introduces a slight change of behaviour in the interrest of keeping
the code simple: Previously summariseModule would not call
addHomeModuleToFinder for summaries that are being re-used but now we do.

We're forced to to do this in summariseFile because the file being
summarised might not even be on the regular search path! So if GHC is to
find it at all we have to pre-populate the cache with its location. For
modules however the finder cache is really just a cache so we don't have to
pre-populate it with the module's location.

As straightforward as that seems I did almost manage to introduce a bug (or
so I thought) because the call to addHomeModuleToFinder I copied from
summariseFile used to use `ms_location old_summary` instead of the
`location` argument to checkSummaryTimestamp. If this call were to
overwrite the existing entry in the cache that would have resulted in us
using the old location of any module even if it was, say, moved to a
different directory between calls to 'depanal'.

However it turns out the cache just ignores the location if the module is
already in the cache. Since summariseModule has to search for the module,
which has the side effect of populating the cache, everything would have
been fine either way.

Well I'm adding a test for this anyways: tests/depanal/OldModLocation.hs.

6 weeks agoRefactor summarise{File,Module} to reduce code duplication
Daniel Gröber [Fri, 24 May 2019 11:51:16 +0000 (13:51 +0200)] 
Refactor summarise{File,Module} to reduce code duplication

6 weeks agoRefactor downsweep to allow returning multiple errors per module
Daniel Gröber [Fri, 24 May 2019 07:57:39 +0000 (09:57 +0200)] 
Refactor downsweep to allow returning multiple errors per module

6 weeks agoMove throwErrors to HscTypes
Daniel Gröber [Sat, 1 Jun 2019 15:11:35 +0000 (17:11 +0200)] 
Move throwErrors to HscTypes

This, among other things, happened in 1ffee940a0 ("Fix warnings and fatal
parsing errors") on master.

6 weeks agoAdd failing test for #10887
Daniel Gröber [Sat, 25 May 2019 09:42:45 +0000 (11:42 +0200)] 
Add failing test for #10887

6 weeks agoExport GhcMake.downsweep
Daniel Gröber [Fri, 24 May 2019 13:03:02 +0000 (15:03 +0200)] 
Export GhcMake.downsweep

This is to enable #10887 as well as to make it possible to test downsweep
on its own in the testsuite.

6 weeks agodownsweep: Allow TargetFile not to exist when a buffer is given
Daniel Gröber [Mon, 20 May 2019 10:17:36 +0000 (12:17 +0200)] 
downsweep: Allow TargetFile not to exist when a buffer is given

Currently 'getRootSummary' will fail with an exception if a 'TargetFile' is
given but it does not exist even if an input buffer is passed along for
this target.

In this case it is not necessary for the file to exist since the buffer
will be used as input for the compilation pipeline instead of the file

6 weeks agoAllow using tagetContents for modules needing preprocessing
Daniel Gröber [Mon, 20 May 2019 09:58:55 +0000 (11:58 +0200)] 
Allow using tagetContents for modules needing preprocessing

This allows GHC API clients, most notably tooling such as
Haskell-IDE-Engine, to pass unsaved files to GHC more easily.

Currently when targetContents is used but the module requires preprocessing
'preprocessFile' simply throws an error because the pipeline does not
support passing a buffer.

This change extends `runPipeline` to allow passing the input buffer into
the pipeline. Before proceeding with the actual pipeline loop the input
buffer is immediately written out to a new tempfile.

I briefly considered refactoring the pipeline at large to pass around
in-memory buffers instead of files, but this seems needlessly complicated
since no pipeline stages other than Hsc could really support this at the

6 weeks agoAdd hPutStringBuffer utility
Daniel Gröber [Mon, 20 May 2019 04:03:49 +0000 (06:03 +0200)] 
Add hPutStringBuffer utility

6 weeks agoRTS: Fix restrictive cast
Alec Theriault [Mon, 13 May 2019 22:31:56 +0000 (15:31 -0700)] 
RTS: Fix restrictive cast

Commit e75a9afd2989e0460f9b49fa07c1667299d93ee9 added an `unsigned` cast
to account for OSes that have signed `rlim_t` signed. Unfortunately,
the `unsigned` cast has the unintended effect of narrowing `rlim_t` to
only 4 bytes. This leads to some spurious out of memory crashes
(in particular: Haddock crashes with OOM whenn building docs of

In this case, `W_` is a better type to cast to: we know it will be
unsigned too and it has the same type as `*len` (so we don't suffer from
accidental narrowing).

6 weeks agoEnable external interpreter when TH is requested but no internal interpreter is available cherry-pick-e172a6d1
Alp Mestanogullari [Fri, 3 May 2019 10:21:44 +0000 (10:21 +0000)] 
Enable external interpreter when TH is requested but no internal interpreter is available

(cherry picked from commit e172a6d127a65b945b31306ff7b6c43320debfb4)

6 weeks agoFix optSemi type in Parser.y
Vladislav Zavialov [Wed, 6 Feb 2019 01:01:36 +0000 (20:01 -0500)] 
Fix optSemi type in Parser.y

The definition of 'optSemi' claimed it had type

([Located a],Bool)

Note that its production actually returns ([Located Token],Bool):

  : ';' { ([$1],True) }   -- $1 :: Located Token

Due to an infelicity in the implementation of 'happy -c', it effectively
resulted in 'unsafeCoerce :: Token -> a'.

If any consumer of 'optSemi' tried to instantiate 'a' to something not
representationally equal to 'Token', they would experience a segfault.

In addition to that, this definition made it impossible to compile Parser.y
without the -c flag (as it's reliant on this bug to cast 'Token' to 'forall
a. a').

2 months agoFix #16603 by documenting some important changes in changelogs
Ryan Scott [Sat, 4 May 2019 15:05:20 +0000 (11:05 -0400)] 
Fix #16603 by documenting some important changes in changelogs

This addresses some glaring omissions from
`libraries/base/` and
`docs/users_guide/8.8.1-notes.rst`, fixing #16603 in the process.

2 months agogitlab-ci: Reintroduce DWARF-enabled bindists
Ben Gamari [Thu, 25 Apr 2019 21:13:58 +0000 (17:13 -0400)] 
gitlab-ci: Reintroduce DWARF-enabled bindists

It seems that this was inadvertently dropped in

2 months agousers-guide: Mention profiling break on 32-bit Windows
Ben Gamari [Thu, 25 Apr 2019 23:13:43 +0000 (19:13 -0400)] 
users-guide: Mention profiling break on 32-bit Windows

Due to #15934.

2 months agousers-guide: Drop old release notes
Ben Gamari [Thu, 25 Apr 2019 23:03:31 +0000 (19:03 -0400)] 
users-guide: Drop old release notes

2 months agoUpdate autoconf scripts ghc-8.8.1-alpha1
Ben Gamari [Wed, 24 Apr 2019 17:10:54 +0000 (13:10 -0400)] 
Update autoconf scripts

Scripts taken from autoconf a8d79c3130da83c7cacd6fee31b9acc53799c406

2 months agoGive it a three-component version number
Ben Gamari [Wed, 24 Apr 2019 17:26:42 +0000 (13:26 -0400)] 
Give it a three-component version number

2 months agogitlab-ci: Fix CI image names
Ben Gamari [Wed, 24 Apr 2019 16:39:52 +0000 (12:39 -0400)] 
gitlab-ci: Fix CI image names

2 months agogitlab-ci: Disable PDF building on Debian 8
Ben Gamari [Wed, 24 Apr 2019 05:14:32 +0000 (01:14 -0400)] 
gitlab-ci: Disable PDF building on Debian 8

2 months agogitlab-ci: Set LANG in centos7 build
Ben Gamari [Wed, 24 Apr 2019 04:42:30 +0000 (00:42 -0400)] 
gitlab-ci: Set LANG in centos7 build

Let's see if this fixes the testsuite failures.

2 months agogitlab-ci: Allow centos7 job to fail
Ben Gamari [Wed, 24 Apr 2019 04:42:21 +0000 (00:42 -0400)] 
gitlab-ci: Allow centos7 job to fail

2 months agogitlab-ci: Further tighten linter release tag condition
Ben Gamari [Tue, 23 Apr 2019 00:01:27 +0000 (20:01 -0400)] 
gitlab-ci: Further tighten linter release tag condition

2 months agotemplate-haskell: Fix TBAs in changelog
Ben Gamari [Mon, 22 Apr 2019 16:58:14 +0000 (12:58 -0400)] 
template-haskell: Fix TBAs in changelog

2 months agogitlab-ci: Only run release notes lint on release tags
Ben Gamari [Fri, 12 Apr 2019 15:10:48 +0000 (11:10 -0400)] 
gitlab-ci: Only run release notes lint on release tags

2 months agogitlab-ci: Add centos7 release job
Ben Gamari [Thu, 11 Apr 2019 22:22:51 +0000 (18:22 -0400)] 
gitlab-ci: Add centos7 release job

2 months agogitlab-ci: Do not build profiled libraries on 32-bit Windows
Ben Gamari [Fri, 19 Apr 2019 04:16:57 +0000 (00:16 -0400)] 
gitlab-ci: Do not build profiled libraries on 32-bit Windows

Due to #15934.

2 months agoFix error message for './configure' regarding '--with-ghc' [skip ci]
Alexandre Baldé [Tue, 9 Apr 2019 00:19:16 +0000 (01:19 +0100)] 
Fix error message for './configure' regarding '--with-ghc' [skip ci]

(cherry picked from commit 00245f7777854e9be1eeb4c7363e254d5ad7f25f)

2 months agoFix two bugs in stg_ap_0_fast in profiling runtime
Ömer Sinan Ağacan [Fri, 18 Jan 2019 19:35:37 +0000 (22:35 +0300)] 
Fix two bugs in stg_ap_0_fast in profiling runtime

This includes two bug fixes in profiling version of stg_ap_0_fast:

- PAPs allocated by stg_ap_0_fast are now correctly tagged. This
  invariant is checked in Sanity.c:checkPAP.

  (This was originally implemented in 2693eb11f5, later reverted with
  ab55b4ddb7 because it revealed the bug below, but it wasn't clear at
  the time whether the bug was the one below or something in the commit)

- The local variable `untaggedfun` is now marked as a pointer so it
  survives GC.

With this we finally fix all known bugs caught in #15508. `concprog001`
now works reliably with prof+threaded and prof runtimes (with and
without -debug).

(cherry picked from commit 908b4b8659713f0b7a1704ce33c7fa30e3e0ffc3)

2 months agousers-guide: Document how to disable package environments
Ben Gamari [Sun, 31 Mar 2019 20:22:04 +0000 (16:22 -0400)] 
users-guide: Document how to disable package environments

As noted in #16309 this somehow went undocumented.

(cherry picked from commit 36d380475d9056fdf93305985be3def00aaf6cf7)

2 months agoosReserveHeapMemory: handle signed rlim_t
Fraser Tweedale [Mon, 8 Apr 2019 07:27:06 +0000 (17:27 +1000)] 
osReserveHeapMemory: handle signed rlim_t

rlim_t is a signed type on FreeBSD, and the build fails with a
sign-compare error.  Add explicit (unsigned) cast to handle this

(cherry picked from commit 0fbad68df0171809bddb48e9753955cc232099eb)

3 months agogitlab: Remove doc-tarball job
Ben Gamari [Sat, 13 Apr 2019 13:31:41 +0000 (09:31 -0400)] 
gitlab: Remove doc-tarball job

3 months agoAllow unregisterised build to fail
Ben Gamari [Tue, 9 Apr 2019 20:20:08 +0000 (16:20 -0400)] 
Allow unregisterised build to fail

3 months agogitlab-ci: Allow failing build jobs to fail
Ben Gamari [Sun, 7 Apr 2019 01:55:37 +0000 (21:55 -0400)] 
gitlab-ci: Allow failing build jobs to fail

3 months agousers-guide: Add pretty to package list
Ben Gamari [Sat, 6 Apr 2019 16:26:38 +0000 (12:26 -0400)] 
users-guide: Add pretty to package list

3 months agogitlab-ci: Backport from master
Ben Gamari [Thu, 4 Apr 2019 15:14:03 +0000 (11:14 -0400)] 
gitlab-ci: Backport from master

3 months agoHadrian: introduce ways to skip some documentation targets
Alp Mestanogullari [Wed, 27 Feb 2019 16:23:48 +0000 (17:23 +0100)] 
Hadrian: introduce ways to skip some documentation targets

The initial motivation for this is to have a chance to run the binary
distribution rules in our Windows CI without having to install
sphinx-build and xelatex there, while retaining the ability to
generate haddocks. I just ended up extending this idea a little bit so
as to have control over whether we build haddocks, (sphinx) HTML manuals,
(sphinx) PDF manuals and (sphinx) manpages.

(cherry picked from commit 8442103aa575dc1cd25cb3231e729c6365dc1b5c)

3 months agoAdd werror function to Flavour.hs
Matthew Pickering [Thu, 31 Jan 2019 11:01:04 +0000 (11:01 +0000)] 
Add werror function to Flavour.hs

This function makes it easy to turn on `-Werror` in the correct manner
to mimic how CI turns on -Werror.

(cherry picked from commit 8dcd00cef7782c64b5484b106f4fd77c8c87e40a)

3 months agoconfigure: Always use AC_LINK_ELSEIF when testing against assembler
Ben Gamari [Sun, 31 Mar 2019 20:00:34 +0000 (16:00 -0400)] 
configure: Always use AC_LINK_ELSEIF when testing against assembler

This fixes #16440, where the build system incorrectly concluded that the
`.subsections_via_symbols` assembler directive was supported on a Linux
system. This was caused by the fact that gcc was invoked with `-flto`;
when so-configured gcc does not call the assembler but rather simply
serialises its AST for compilation during the final link.

This is described in Note [autoconf assembler checks and -flto].

(cherry picked from commit 7b090b53fea065d2cfd967ea919426af9ba8d737)

3 months agoRestore Xmm registers properly in StgCRun.c [Mon, 1 Apr 2019 14:17:41 +0000 (16:17 +0200)] 
Restore Xmm registers properly in StgCRun.c

This fixes #16514: Xmm6-15 was restored based off rax instead of rsp.
The code was introduced in the fix for #14619.

(cherry picked from commit 9b131500371a07626e33edc56700c12322364560)

3 months agoBump hpc submodule
Ryan Scott [Fri, 5 Apr 2019 15:24:12 +0000 (11:24 -0400)] 
Bump hpc submodule

Currently, the `hpc` submodule is pinned against the `wip/final-mfp`
branch, not against `master`. This pins it back against `master`.

3 months agoUse funPrec, not topPrec, to parenthesize GADT argument types
Ryan Scott [Wed, 3 Apr 2019 16:37:10 +0000 (12:37 -0400)] 
Use funPrec, not topPrec, to parenthesize GADT argument types

A simple oversight. Fixes #16527.

3 months agobase: Remove `Monad(fail)` method and reexport `MonadFail(fail)` instead
Herbert Valerio Riedel [Sat, 10 Nov 2018 00:12:52 +0000 (01:12 +0100)] 
base: Remove `Monad(fail)` method and reexport `MonadFail(fail)` instead

As per

Coauthored-by: Ben Gamari <>
3 months agoUpdate parallel submodule
Herbert Valerio Riedel [Mon, 11 Feb 2019 22:32:38 +0000 (23:32 +0100)] 
Update parallel submodule

3 months agoUpdate directory submodule
Herbert Valerio Riedel [Fri, 1 Feb 2019 21:48:07 +0000 (22:48 +0100)] 
Update directory submodule

3 months agoUpdate filepath submodule
Herbert Valerio Riedel [Fri, 1 Feb 2019 21:48:40 +0000 (22:48 +0100)] 
Update filepath submodule

3 months agoUpdate hpc submodule
Herbert Valerio Riedel [Sun, 27 Jan 2019 21:35:35 +0000 (22:35 +0100)] 
Update hpc submodule

3 months agoUpdate terminfo submodule
Herbert Valerio Riedel [Sun, 27 Jan 2019 21:35:35 +0000 (22:35 +0100)] 
Update terminfo submodule

3 months agoUpdate stm submodule
Herbert Valerio Riedel [Sun, 27 Jan 2019 21:35:35 +0000 (22:35 +0100)] 
Update stm submodule

3 months agoUpdate process submodule
Herbert Valerio Riedel [Sun, 27 Jan 2019 21:35:35 +0000 (22:35 +0100)] 
Update process submodule

3 months agoUpdate parsec submodule
Herbert Valerio Riedel [Sun, 27 Jan 2019 21:35:35 +0000 (22:35 +0100)] 
Update parsec submodule

3 months agoUpdate haskeline submodule
Herbert Valerio Riedel [Sun, 27 Jan 2019 21:35:36 +0000 (22:35 +0100)] 
Update haskeline submodule

3 months agoUpdate deepseq submodule
Herbert Valerio Riedel [Sun, 27 Jan 2019 21:35:36 +0000 (22:35 +0100)] 
Update deepseq submodule

3 months agoUpdate unix submodule
Herbert Valerio Riedel [Sun, 27 Jan 2019 21:35:35 +0000 (22:35 +0100)] 
Update unix submodule

3 months agoUpdate text submodule
Herbert Valerio Riedel [Sun, 27 Jan 2019 21:35:35 +0000 (22:35 +0100)] 
Update text submodule

3 months agoUpdate binary submodule to latest master branch tip
Herbert Valerio Riedel [Wed, 23 Jan 2019 22:26:49 +0000 (23:26 +0100)] 
Update binary submodule to latest master branch tip

3 months agoBump array submodule
Ryan Scott [Tue, 26 Mar 2019 14:55:10 +0000 (10:55 -0400)] 
Bump array submodule

This bumps `array` to version so that we can distinguish
it with `MIN_VERSION_array` (as it introduces some changes to the
`Show` instance for `UArray`).

3 months agoBump transformers to
Ben Gamari [Thu, 17 Jan 2019 14:53:23 +0000 (09:53 -0500)] 
Bump transformers to

See #16199.

3 months agoCorrect duplicate entry in base's changelog
Ryan Scott [Sun, 24 Mar 2019 14:35:21 +0000 (10:35 -0400)] 
Correct duplicate entry in base's changelog

See #16490.

[ci skip]