5 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.

5 months agotestsuite: Add testcase for #16111
Ben Gamari [Fri, 29 Mar 2019 21:26:05 +0000 (17:26 -0400)] 
testsuite: Add testcase for #16111

5 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.

5 months agoFix #16518 with some more kind-splitting smarts
Ryan Scott [Tue, 2 Apr 2019 00:36:31 +0000 (20:36 -0400)] 
Fix #16518 with some more kind-splitting smarts

This patch corrects two simple oversights that led to #16518:

1. `HsUtils.typeToLHsType` was taking visibility into account in the
   `TyConApp` case, but not the `AppTy` case. I've factored out the
   visibility-related logic into its own `go_app` function and now
   invoke `go_app` from both the `TyConApp` and `AppTy` cases.
2. `Type.fun_kind_arg_flags` did not properly split kinds with
   nested `forall`s, such as
   `(forall k. k -> Type) -> (forall k. k -> Type)`. This was simply
   because `fun_kind_arg_flags`'s `FunTy` case always bailed out and
   assumed all subsequent arguments were `Required`, which clearly
   isn't the case for nested `forall`s. I tweaked the `FunTy` case
   to recur on the result kind.

5 months agoReplace with (#16196)
Yuriy Syrovetskiy [Mon, 1 Apr 2019 18:03:41 +0000 (21:03 +0300)] 
Replace with (#16196)

5 months agogitlab: Fix label names in issue templates
Ben Gamari [Wed, 3 Apr 2019 12:15:06 +0000 (08:15 -0400)] 
gitlab: Fix label names in issue templates

5 months agogitlab-ci: Build hyperlinked sources for releases
Ben Gamari [Sun, 31 Mar 2019 18:32:01 +0000 (14:32 -0400)] 
gitlab-ci: Build hyperlinked sources for releases

Fixes #16445.

5 months agoFix Uncovered set of literal patterns
Sebastian Graf [Mon, 1 Apr 2019 17:59:45 +0000 (19:59 +0200)] 
Fix Uncovered set of literal patterns

Issues #16289 and #15713 are proof that the pattern match checker did
an unsound job of estimating the value set abstraction corresponding to
the uncovered set.

The reason is that the fix from #11303 introducing `NLit` was
incomplete: The `LitCon` case desugared to `Var` rather than `LitVar`,
which would have done the necessary case splitting analogous to the
`ConVar` case.

This patch rectifies that by introducing the fresh unification variable
in `LitCon` in value abstraction position rather than pattern postition,
recording a constraint equating it to the constructor expression rather
than the literal. Fixes #16289 and #15713.

5 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].

5 months agoInline the definition of 'ap' in the Monad laws
Chris Martin [Wed, 27 Mar 2019 20:23:57 +0000 (14:23 -0600)] 
Inline the definition of 'ap' in the Monad laws

The law as it is currently written is meaningless, because nowhere have
we defined the implementation of 'ap'. The reader of the Control.Monad
documentation is provided with only a type signature,

> ap :: Monad m => m (a -> b) -> m a -> m b

an informal description,

> In many situations, the liftM operations can be replaced by uses of
> ap, which promotes function application.

and a relationship between 'ap' and the 'liftM' functions

> return f `ap` x1 `ap` ... `ap` xn
> is equivalent to
> liftMn f x1 x2 ... xn

Without knowing how 'ap' is defined, a law involving 'ap' cannot
provide any guidance for how to write a lawful Monad instance, nor can
we conclude anything from the law.

I suspect that a reader equipped with the understanding that 'ap' was
defined prior to the invention of the Applicative class could deduce
that 'ap' must be defined in terms of (>>=), but nowhere as far as I can
tell have we written this down explicitly for readers without the
benefit of historical context.

If the law is meant to express a relationship among (<*>), (>>=), and
'return', it seems that it is better off making this statement directly,
sidestepping 'ap' altogether.

5 months agoCorrect two misspellings of "separately"
Chris Martin [Tue, 12 Feb 2019 21:38:19 +0000 (14:38 -0700)] 
Correct two misspellings of "separately"

5 months agointeger-simple: Add documentation for Integer type
Ben Gamari [Tue, 2 Apr 2019 21:00:22 +0000 (17:00 -0400)] 
integer-simple: Add documentation for Integer type

5 months agointeger-gmp: Write friendlier documentation for Integer
Ben Gamari [Tue, 2 Apr 2019 20:59:29 +0000 (16:59 -0400)] 
integer-gmp: Write friendlier documentation for Integer

5 months agousers-guide: Typo in Users Guide, Glasgow Exts
Frank Steffahn [Mon, 7 Jan 2019 21:33:53 +0000 (22:33 +0100)] 
users-guide: Typo in Users Guide, Glasgow Exts

5 months agobase: Add documentation that liftA2 used to not be a typeclass method
Andrew Martin [Fri, 4 Jan 2019 17:01:25 +0000 (12:01 -0500)] 
base: Add documentation that liftA2 used to not be a typeclass method

5 months agousers-guide: Fix typo
Nathan Collins [Thu, 20 Dec 2018 18:27:01 +0000 (10:27 -0800)] 
users-guide: Fix typo

5 months agoFix faulty substitutions in StgCse (#11532). [Tue, 2 Apr 2019 12:20:12 +0000 (14:20 +0200)] 
Fix faulty substitutions in StgCse (#11532).

`substBndr` should rename bindings which shadow existing ids.
However while it was renaming the bindings it was not adding proper substitutions
for renamed bindings.
Instead of adding a substitution of the form `old -> new` for renamed
bindings it mistakenly added `old -> old` if no replacement had taken
place while adding none if `old` had been renamed.

As a byproduct this should improve performance, as we no longer add
useless substitutions for unshadowed bindings.

5 months agoAdd myself to libraries/ghci
Simon Marlow [Tue, 2 Apr 2019 10:13:54 +0000 (06:13 -0400)] 
Add myself to libraries/ghci

5 months agoHadrian: lint ignore autom4te and ghc-pkg cache files.
David Eichmann [Tue, 2 Apr 2019 09:59:12 +0000 (10:59 +0100)] 
Hadrian: lint ignore autom4te and ghc-pkg cache files.

5 months agoHadrian: traceAllow deep dependencies when compilling haskell object files.
David Eichmann [Tue, 2 Apr 2019 09:57:24 +0000 (10:57 +0100)] 
Hadrian: traceAllow deep dependencies when compilling haskell object files.

5 months agoFix formatting issue in ghc-prim's changelog [skip ci]
Alexandre Baldé [Tue, 2 Apr 2019 00:05:23 +0000 (01:05 +0100)] 
Fix formatting issue in ghc-prim's changelog [skip ci]

5 months agoHadrian: correct deps for ghc builder.
David Eichmann [Fri, 29 Mar 2019 12:30:54 +0000 (12:30 +0000)] 
Hadrian: correct deps for ghc builder.

Previously, when needing ghc as a builder, the ghcDeps (Files
the GHC binary depends on) for the current stage were needed.
This is incorrect as the previous stage's ghc is used for building.
This commit fixes the issue, needing the previous stage's ghcDeps.

5 months agoImprove performance of newSmallArray#
Michal Terepeta [Sun, 24 Mar 2019 12:58:53 +0000 (13:58 +0100)] 
Improve performance of newSmallArray#

- Hoists part of the condition outside of the initialization loop in
- Annotates one of the unlikely branches as unlikely, also in
- Adds a couple of annotations to `allocateMightFail` indicating which
  branches are likely to be taken.

Together this gives about 5% improvement.

Signed-off-by: Michal Terepeta <>
5 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`).

5 months agogitlab: Mention ~"user facing" label
Ben Gamari [Mon, 1 Apr 2019 23:15:48 +0000 (19:15 -0400)] 
gitlab: Mention ~"user facing" label

5 months agogitlab: Move feature request template to issue_templates
Ben Gamari [Mon, 1 Apr 2019 23:13:51 +0000 (19:13 -0400)] 
gitlab: Move feature request template to issue_templates


5 months agogitlab: Add feature request MR template
Ben Gamari [Mon, 1 Apr 2019 21:47:21 +0000 (17:47 -0400)] 
gitlab: Add feature request MR template

5 months agoconfigure: document the use of the LD variable
Adam Sandberg Eriksson [Sun, 31 Mar 2019 16:36:13 +0000 (17:36 +0100)] 
configure: document the use of the LD variable

5 months agoClean up URLs to point to GitLab
Takenobu Tani [Sat, 30 Mar 2019 02:42:14 +0000 (11:42 +0900)] 
Clean up URLs to point to GitLab

This moves URL references to old Trac to their corresponding
GitLab counterparts.

This patch does not update the submodule library, such as

See also !539, !606, !618

[ci skip]

5 months agogitlab: Add some simply issue templates
Ben Gamari [Fri, 29 Mar 2019 20:11:58 +0000 (16:11 -0400)] 
gitlab: Add some simply issue templates

5 months agogitlab: Add merge request template for backports for 8.8
Ben Gamari [Fri, 29 Mar 2019 19:59:02 +0000 (15:59 -0400)] 
gitlab: Add merge request template for backports for 8.8

5 months agoSupport Shake's --lint-fsatrace feature.
David Eichmann [Thu, 7 Mar 2019 17:35:09 +0000 (17:35 +0000)] 
Support Shake's --lint-fsatrace feature.

Using this feature requires fsatrace (e.g.
Simply use the `--lint-fsatrace` option when running hadrian.
Shake version >= 0.17.7 is required to support linting out of tree build dirs.

5 months 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

5 months agoBump ghc-prim's version where needed
Alexandre [Thu, 28 Mar 2019 16:28:42 +0000 (16:28 +0000)] 
Bump ghc-prim's version where needed

5 months ago Add support for bitreverse primop
Alexandre [Thu, 28 Mar 2019 16:21:35 +0000 (16:21 +0000)] 
Add support for bitreverse primop

    This commit includes the necessary changes in code and
    documentation to support a primop that reverses a word's
    bits. It also includes a test.

5 months agoci: Ensure index.html is preserved in documentation tarball
Ben Gamari [Mon, 25 Mar 2019 21:41:13 +0000 (17:41 -0400)] 
ci: Ensure index.html is preserved in documentation tarball

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

See #16199.

5 months agoci: Check that changelogs don't contain "TBA"
Ben Gamari [Mon, 25 Mar 2019 16:57:08 +0000 (12:57 -0400)] 
ci: Check that changelogs don't contain "TBA"

This ensures that the release dates in the library changelogs are
properly set.

5 months agodocs: make nfib compute the Fibonacci sequence [skipci]
Artem Pelenitsyn [Sat, 23 Mar 2019 17:18:12 +0000 (13:18 -0400)] 
docs: make nfib compute the Fibonacci sequence [skipci]

5 months agoVisibility: handle multiple units with the same name
Michael Peyton Jones [Wed, 13 Mar 2019 11:46:56 +0000 (11:46 +0000)] 
Visibility: handle multiple units with the same name

Fixes #16228. The included test case is adapted from the reproduction in
the issue, and fails without this patch.


We compute an initial visilibity mapping for units based on what is
present in the package databases. To seed this, we compute a set of all
the package configs to add visibilities for.

However, this set was keyed off the unit's *package name*. This is
correct, since we compare packages across databases by version. However,
we would only ever consider a single, most-preferable unit from the
database in which it was found.

The effect of this was that only one of the libraries in a Cabal package
would be added to this initial set. This would cause attempts to use
modules from the omitted libraries to fail, claiming that the package
was hidden (even though `ghc-pkg` would correctly show it as visible).

A solution is to do the selection of the most preferable packages
separately, and then be sure to consider exposing all units in the
same package in the same package db. We can do this by picking a
most-preferable unit for each package name, and then considering
exposing all units that are equi-preferable with that unit.


Why wasn't this bug apparent to all people trying to use sub-libraries
in Cabal? The answer is that Cabal explicitly passes `-package` and
`-package-id` flags for all the packages it wants to use, rather than
relying on the state of the package database. So this bug only really
affects people who are trying to use package databases produced by Cabal
outside of Cabal itself.

One particular example of this is the way that the
Nixpkgs Haskell infrastructure provides wrapped GHCs: typically these
are equipped with a package database containing all the needed
package dependencies, and the user is not expected to pass
`-package` flags explicitly.

5 months agoAdd some tips to the Troubleshooting section of README
Artem Pelenitsyn [Mon, 11 Mar 2019 17:40:48 +0000 (13:40 -0400)] 
Add some tips to the Troubleshooting section of README

5 months agoFix a few broken Trac links [skip ci]
Chaitanya Koparkar [Fri, 22 Mar 2019 18:42:27 +0000 (14:42 -0400)] 
Fix a few broken Trac links [skip ci]

This patch only attempts to fix links that don't automatically re-direct to the correct URL.

5 months agoMinor refactoring in copy array primops:
Ömer Sinan Ağacan [Fri, 22 Mar 2019 07:06:37 +0000 (10:06 +0300)] 
Minor refactoring in copy array primops:

- `emitCopySmallArray` now checks size before generating code and
  doesn't generate any code when size is 0. `emitCopyArray` already does
  this so this makes small/large array cases the same in argument

- In both `emitCopySmallArray` and `emitCopyArray` read the `dflags`
  after checking the argument.

5 months agoHadrian: don't use -zorigin on darwin.
David Eichmann [Tue, 19 Mar 2019 11:42:27 +0000 (11:42 +0000)] 
Hadrian: don't use -zorigin on darwin.

5 months agoHadrian: introduce an easy way for users to build with -split-sections
Alp Mestanogullari [Fri, 15 Mar 2019 20:35:59 +0000 (21:35 +0100)] 
Hadrian: introduce an easy way for users to build with -split-sections

Any user can now trivially build any number of Haskell packages with
`-split-sections` by using `splitSections`/`splitSectionsIf` on any
existing or new flavour:

    -- build all packages but the ghc library with -split-sections
    splitSections :: Flavour -> Flavour

    -- build all packages that satisfy the given predicate
    -- with --split-sections
    splitSectionsIf :: (Package -> Bool) -> Flavour -> Flavour

See the new section in `doc/`.

5 months agoHadrian: trace the execution of expensive Cabal calls
Andrey Mokhov [Thu, 14 Mar 2019 14:12:20 +0000 (14:12 +0000)] 
Hadrian: trace the execution of expensive Cabal calls

We use Cabal to parse, configure, register and copy packages, which are
expensive operations that are currently not visible to Shake's profiling
infrastructure. By using `traced` we tell Shake to add these IO actions
to the profiling report, helping us to identify performance bottlenecks.

We use short tracing keys, as recommended in Shake docs: the name of the
current target is already available in the rest of the profiling

5 months agoHadrian: Bump Shake to 0.17.6
Andrey Mokhov [Thu, 14 Mar 2019 11:40:08 +0000 (11:40 +0000)] 
Hadrian: Bump Shake to 0.17.6

The new release of Shake comes with these relevant features:

* use symlinks for --shared
* add --compact for a Bazel/Buck style output

5 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]

5 months agoUpdate Wiki URLs to point to GitLab
Takenobu Tani [Thu, 21 Mar 2019 07:06:39 +0000 (16:06 +0900)] 
Update Wiki URLs to point to GitLab

This moves all URL references to Trac Wiki to their corresponding
GitLab counterparts.

This substitution is classified as follows:

1. Automated substitution using sed with Ben's mapping rule [1]

2. Manual substitution for URLs containing `#` index

3. Manual substitution for strings starting with `Commentary`
    Old: Commentary/XxxYyy...
    New: commentary/xxx-yyy...

See also !539


5 months agoRefactor ./hadrian/ for better error messages
Matthew Pickering [Wed, 20 Mar 2019 14:12:53 +0000 (14:12 +0000)] 
Refactor ./hadrian/ for better error messages

By separating these two lines, if the first command fails then `ghci` is
not loaded. Before it would still load ghci but display lots of errors
about not being able to find modules.

5 months agoCheck hadrian/ script output to determine pass/fail
Matthew Pickering [Sun, 17 Mar 2019 10:24:31 +0000 (10:24 +0000)] 
Check hadrian/ script output to determine pass/fail

ghci always exits with exit code 0 so you have to check the output
to see if the modules loaded succesfully.

5 months agoUser's Guide: extensions compatibility
Haskell-mouse [Thu, 28 Feb 2019 17:26:16 +0000 (20:26 +0300)] 
User's Guide: extensions compatibility

Adds the mention that extensions "AllowAmbiguousTypes" and "RankNTypes"
are not always compatible with each other.
Specifies the conditions and causes of failing in resolving
of ambiguity.

5 months agogitlab-ci: Allow linters to fail for now
Ben Gamari [Sun, 24 Mar 2019 12:46:13 +0000 (08:46 -0400)] 
gitlab-ci: Allow linters to fail for now

They are broken and I don't have time to fix them at the moment.

5 months agogitlab-ci: Explicitly fetch target branch
Ben Gamari [Sat, 23 Mar 2019 00:53:32 +0000 (20:53 -0400)] 
gitlab-ci: Explicitly fetch target branch

`git fetch`, which we used previously, doesn't update the remote
tracking branches.

5 months agogitlab-ci: Compute merge base against remote tracking branch
Ben Gamari [Fri, 22 Mar 2019 22:49:34 +0000 (18:49 -0400)] 
gitlab-ci: Compute merge base against remote tracking branch

Previously we would use the local branch with the name
`$CI_MERGE_REQUEST_TARGET_BRANCH_NAME` to compute the merge base when
linting. However, this branch isn't necessarily up-to-date. We should

5 months agogitlab-ci: Fix YAML syntax
Ben Gamari [Fri, 22 Mar 2019 22:38:11 +0000 (18:38 -0400)] 
gitlab-ci: Fix YAML syntax

5 months agogitlab-ci: Clean up linter
Ben Gamari [Fri, 22 Mar 2019 22:33:08 +0000 (18:33 -0400)] 
gitlab-ci: Clean up linter

I'm not sure why these steps were done but they seem counterproductive
and unnecessary.

5 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 <>
5 months agogitlab-ci: Fix linters
Ben Gamari [Fri, 22 Mar 2019 04:46:37 +0000 (00:46 -0400)] 
gitlab-ci: Fix linters

5 months agoForce LF line ending for md5sum [skip-ci]
Tamar Christina [Thu, 21 Mar 2019 19:47:06 +0000 (19:47 +0000)] 
Force LF line ending for md5sum [skip-ci]

5 months agogitlab: Deploy documentation snapshot via GitLab Pages
Ben Gamari [Thu, 21 Mar 2019 16:59:11 +0000 (12:59 -0400)] 
gitlab: Deploy documentation snapshot via GitLab Pages

5 months agoCI: Allow failure in packaging step
Matthew Pickering [Thu, 21 Mar 2019 08:27:55 +0000 (08:27 +0000)] 
CI: Allow failure in packaging step

This depends on the windows build which is still allowed to fail. If
that job fails then the packaging job will also fail.

5 months agoBump cabal submodule
Ben Gamari [Wed, 20 Mar 2019 13:39:31 +0000 (09:39 -0400)] 
Bump cabal submodule

Due to

5 months agogitlab-ci: Pass --target explicitly to configure on Windows
Ben Gamari [Thu, 21 Mar 2019 03:45:26 +0000 (23:45 -0400)] 
gitlab-ci: Pass --target explicitly to configure on Windows

Otherwise configure fails in the 32-bit case with
This GHC (c:/GitLabRunner/builds/8fc0e283/0/ghc/ghc/toolchain/bin/ghc) does not generate code for the build platform
   GHC target platform    : x86_64-unknown-mingw32
   Desired build platform : i386-unknown-mingw32

5 months agogitlab-ci: Do full `perf` build when building Windows releases
Ben Gamari [Fri, 8 Mar 2019 15:05:45 +0000 (10:05 -0500)] 
gitlab-ci: Do full `perf` build when building Windows releases

5 months agoRun linters on merge requests
Matthew Pickering [Mon, 18 Feb 2019 17:28:39 +0000 (17:28 +0000)] 
Run linters on merge requests

It seems that it has failed to execute at all since it was implemented.

We now run the linters on merge requests.

5 months agoOnly run linter in testsuite dir
Matthew Pickering [Wed, 20 Mar 2019 14:17:54 +0000 (14:17 +0000)] 
Only run linter in testsuite dir

5 months agoFix typo [skip ci]
Alexandre Esteves [Fri, 15 Mar 2019 22:42:50 +0000 (18:42 -0400)] 
Fix typo [skip ci]

5 months agoFix specification of load_load_barrier [skip-ci]
Peter Trommler [Wed, 20 Mar 2019 15:02:44 +0000 (16:02 +0100)] 
Fix specification of load_load_barrier [skip-ci]

5 months agoRemove unused XArrApp and XArrForm extension points
Ryan Scott [Wed, 20 Mar 2019 13:41:00 +0000 (09:41 -0400)] 
Remove unused XArrApp and XArrForm extension points

!301 removed the `HsArrApp` and `HsArrForm` constructors, which
renders the corresponding extension points `XArrApp` and `XArrForm`
useless. This patch finally rips them out.

5 months agobase: Depend upon shlwapi on Windows
Ben Gamari [Wed, 20 Mar 2019 13:16:15 +0000 (09:16 -0400)] 
base: Depend upon shlwapi on Windows

As noted in #16466, `System.Environment.getExecutablePath` depends upon
`PathFileExistsW` which is defined by `shlwapi`.

Fixes #16466.

5 months agoCheck.hs: Fix a few typos
Simon Jakobi [Tue, 19 Mar 2019 18:54:58 +0000 (19:54 +0100)] 
Check.hs: Fix a few typos

5 months agoPrint test suite results ("unexpected failures" etc.) in sorted order
Ömer Sinan Ağacan [Tue, 19 Mar 2019 09:53:51 +0000 (12:53 +0300)] 
Print test suite results ("unexpected failures" etc.) in sorted order

Fixes #16425

5 months agoReject nested predicates in impredicativity checking
Ryan Scott [Sun, 17 Mar 2019 13:37:27 +0000 (09:37 -0400)] 
Reject nested predicates in impredicativity checking

When GHC attempts to unify a metavariable with a type containing
foralls, it will be rejected as an occurrence of impredicativity.
GHC was /not/ extending the same treatment to predicate types, such
as in the following (erroneous) example from #11514:

foo :: forall a. (Show a => a -> a) -> ()
foo = undefined

This will attempt to instantiate `undefined` at
`(Show a => a -> a) -> ()`, which is impredicative. This patch
catches impredicativity arising from predicates in this fashion.

Since GHC is pickier about impredicative instantiations, some test
cases needed to be updated to be updated so as not to fall afoul of
the new validity check. (There were a surprising number of
impredicative uses of `undefined`!) Moreover, the `T14828` test case
now has slightly less informative types shown with `:print`. This is
due to a a much deeper issue with the GHCi debugger (see #14828).

Fixes #11514.

5 months agoAdd a bench flavour to Hadrian
Sebastian Graf [Fri, 15 Mar 2019 16:06:21 +0000 (17:06 +0100)] 
Add a bench flavour to Hadrian

5 months agoci: Add some descriptions of the stages
Ben Gamari [Fri, 15 Mar 2019 14:48:51 +0000 (10:48 -0400)] 
ci: Add some descriptions of the stages

5 months agoci: Move validate-x86_64-linux-deb9 to full-build stage
Ben Gamari [Fri, 15 Mar 2019 14:45:44 +0000 (10:45 -0400)] 
ci: Move validate-x86_64-linux-deb9 to full-build stage

The `build` stage is meant to be a minimal smoke test to weed out broken
commits. The `validate-x86_64-linux-deb9` build will generally catch a
subset of issues caught by `validate-x86_64-linux-deb9-debug` so only
the latter should be in `build`.

5 months agoGracefully handle error condition in Mach-O relocateSection
Artem Pyanykh [Sat, 16 Mar 2019 15:32:00 +0000 (18:32 +0300)] 
Gracefully handle error condition in Mach-O relocateSection

5 months agoDirectly test section alignment, fix internal reloc probing length
Artem Pyanykh [Sat, 16 Mar 2019 15:12:00 +0000 (18:12 +0300)] 
Directly test section alignment, fix internal reloc probing length

5 months agoAdd missing levels to SegmentProt enum
Artem Pyanykh [Mon, 25 Feb 2019 15:46:42 +0000 (18:46 +0300)] 
Add missing levels to SegmentProt enum

5 months agoAdd a linker test re: section alignment
Artem Pyanykh [Mon, 11 Feb 2019 11:05:34 +0000 (14:05 +0300)] 
Add a linker test re: section alignment

5 months agoAddress some todos and fixmes
Artem Pyanykh [Mon, 11 Feb 2019 11:05:30 +0000 (14:05 +0300)] 
Address some todos and fixmes

5 months agoUse segments for section layout
Artem Pyanykh [Mon, 11 Feb 2019 11:05:26 +0000 (14:05 +0300)] 
Use segments for section layout

5 months agoAdjust section placement and relocation logic for Mach-O
Artem Pyanykh [Thu, 21 Feb 2019 09:10:38 +0000 (12:10 +0300)] 
Adjust section placement and relocation logic for Mach-O

1. Place each section on a separate page to ensure required
alignment (wastes lots ot space, needs to be improved).
2. Unwire relocation logic from macho sections (the most fiddly part
is adjusting internal relocations).

Other todos:
0. Add a test for section alignment.
1. Investigate 32bit relocations!
2. Fix memory leak in ZEROPAGE section allocation.
3. Fix creating redundant jump islands for GOT.
4. Investigate more compact section placement.

5 months agotestsuite: Display observed exit code on failure due to bad exit code
Ben Gamari [Thu, 7 Mar 2019 15:13:13 +0000 (10:13 -0500)] 
testsuite: Display observed exit code on failure due to bad exit code

5 months agoTry again
Ben Gamari [Thu, 7 Mar 2019 04:34:52 +0000 (23:34 -0500)] 
Try again

5 months agotestsuite: Don't mark T5836 as broken
Ben Gamari [Wed, 6 Mar 2019 03:47:59 +0000 (22:47 -0500)] 
testsuite: Don't mark T5836 as broken

I believe removing __mingw_vsnwprintf from RtsSymbols fixed #16387.

5 months agoDon't mark cabal09 as broken
Ben Gamari [Wed, 6 Mar 2019 03:47:28 +0000 (22:47 -0500)] 
Don't mark cabal09 as broken

It doesn't fail reliably.

5 months agorts/RtsSymbols: Drop __mingw_vsnwprintf
Ben Gamari [Tue, 5 Mar 2019 16:58:18 +0000 (11:58 -0500)] 
rts/RtsSymbols: Drop __mingw_vsnwprintf

As described in #16387, this is already defined by mingw and
consequently defining it in the RTS as well leads to multiple definition
errors from the RTS linker at runtime.

5 months agotestsuite/plugins: Increase compile timeout on Windows
Ben Gamari [Tue, 5 Mar 2019 16:30:57 +0000 (11:30 -0500)] 
testsuite/plugins: Increase compile timeout on Windows

I think the linker is routinely eating through the timeout,
leading to many spurious failures.

5 months agotestsuite: Mark T10672 as broken
Ben Gamari [Tue, 5 Mar 2019 00:16:09 +0000 (19:16 -0500)] 
testsuite: Mark T10672 as broken

This test, which is only run on Windows, seems to be reliably timing

See #16390.

5 months agotestsuite/plugins: Add multi_cpu_race modifier on Windows
Ben Gamari [Tue, 5 Mar 2019 00:01:43 +0000 (19:01 -0500)] 
testsuite/plugins: Add multi_cpu_race modifier on Windows

A few tests previously failed with various failure modes. For instance,
  `plugin-recomp-change` fails with:

Wrong exit code for plugin-recomp-change()(expected 0 , actual 2 )
Stderr ( plugin-recomp-change ):
Simple Plugin Passes Queried
Got options:
Simple Plugin Pass Run
C://GitLabRunner//builds//8fc0e283//0//ghc//ghc//inplace//mingw//bin/ld.exe: cannot find -lHSplugin-recompilation-0.1-CPeObcGoBuvHdwBnpK9jQq
collect2.exe: error: ld returned 1 exit status
`gcc.exe' failed in phase `Linker'. (Exit code: 1)
make[2]: *** [Makefile:112: plugin-recomp-change] Error 1
*** unexpected failure for plugin-recomp-change(normal)

It's unclear whether the ghc-pkg concurrency issue mentioned in all.T is
the culprit but the set of tests that fail overlaps strongly with the
set of tests that lack the `multi_cpu_race` modifier. Let's see if
adding it fixes them.

5 months agotestsuite: Mark T16190 as broken on Windows
Ben Gamari [Mon, 4 Mar 2019 23:58:55 +0000 (18:58 -0500)] 
testsuite: Mark T16190 as broken on Windows

There seems to be some filepath funniness due to TH embedding going on
here. See #16389.

5 months agotestsuite: Mark T15904 as broken on Windows
Ben Gamari [Mon, 4 Mar 2019 23:52:59 +0000 (18:52 -0500)] 
testsuite: Mark T15904 as broken on Windows

It seems to look for some sort of manifest file. See #16388.

5 months agotestsuite: Mark T5836 as broken on Windows
Ben Gamari [Mon, 4 Mar 2019 23:49:01 +0000 (18:49 -0500)] 
testsuite: Mark T5836 as broken on Windows

See #16387.

5 months agotestsuite: Fix expected output on Windows for various ghci tests
Ben Gamari [Mon, 4 Mar 2019 23:43:35 +0000 (18:43 -0500)] 
testsuite: Fix expected output on Windows for various ghci tests

Broke as -Wimplicit-kind-vars no longer exists. Specifically ghci024,
ghci057 and T9293.

5 months agotestsuite: Mark T16219 and cabal09 as broken on Windows
Ben Gamari [Mon, 4 Mar 2019 23:40:48 +0000 (18:40 -0500)] 
testsuite: Mark T16219 and cabal09 as broken on Windows

See #16386.

5 months agoUpdate .gitlab-ci.yml
Matthew Pickering [Tue, 19 Mar 2019 10:02:07 +0000 (06:02 -0400)] 
Update .gitlab-ci.yml

5 months agogitlab-ci: Bump docker images
Ben Gamari [Tue, 19 Mar 2019 03:51:35 +0000 (23:51 -0400)] 
gitlab-ci: Bump docker images

To install lndir and un-break the source distribution job.

5 months agoRemove deprecated reinitializeGlobals
Krzysztof Gogolewski [Mon, 18 Mar 2019 18:36:26 +0000 (19:36 +0100)] 
Remove deprecated reinitializeGlobals