ghc.git
3 months agogitlab: Add issue template for backport tracking issues wip/backport-issues
Ben Gamari [Thu, 4 Apr 2019 15:23:24 +0000 (11:23 -0400)] 
gitlab: Add issue template for backport tracking issues

[skip ci]

3 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

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

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

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

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

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

3 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

3 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

3 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

3 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

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

3 months agoFix faulty substitutions in StgCse (#11532).
klebinger.andreas@gmx.at [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.

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

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

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

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

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

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

This:
- Hoists part of the condition outside of the initialization loop in
  `stg_newSmallArrayzh`.
- Annotates one of the unlikely branches as unlikely, also in
  `stg_newSmallArrayzh`.
- 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 <michal.terepeta@gmail.com>
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 0.5.4.0 so that we can distinguish
it with `MIN_VERSION_array` (as it introduces some changes to the
`Show` instance for `UArray`).

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

3 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

Whoops.

3 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

3 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

3 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
libraries/Cabal.

See also !539, !606, !618

[ci skip]

3 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

3 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

3 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. https://github.com/jacereda/fsatrace).
Simply use the `--lint-fsatrace` option when running hadrian.
Shake version >= 0.17.7 is required to support linting out of tree build dirs.

3 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

3 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

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

3 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

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

See #16199.

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

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

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

3 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

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

3 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
  checking.

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

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

3 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/user-settings.md`.

3 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
information.

3 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

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

See #16490.

[ci skip]

3 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]
    Old: ghc.haskell.org/trac/ghc/wiki/XxxYyy...
    New: gitlab.haskell.org/ghc/ghc/wikis/xxx-yyy...

2. Manual substitution for URLs containing `#` index
    Old: ghc.haskell.org/trac/ghc/wiki/XxxYyy...#Zzz
    New: gitlab.haskell.org/ghc/ghc/wikis/xxx-yyy...#zzz

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

See also !539

[1]: https://gitlab.haskell.org/bgamari/gitlab-migration/blob/master/wiki-mapping.json

3 months agoRefactor ./hadrian/ghci.sh for better error messages
Matthew Pickering [Wed, 20 Mar 2019 14:12:53 +0000 (14:12 +0000)] 
Refactor ./hadrian/ghci.sh 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.

3 months agoCheck hadrian/ghci.sh script output to determine pass/fail
Matthew Pickering [Sun, 17 Mar 2019 10:24:31 +0000 (10:24 +0000)] 
Check hadrian/ghci.sh 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.

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

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

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

3 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
rather use `origin/$CI_MERGE_REQUEST_TARGET_BRANCH_NAME`.

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

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

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 https://prime.haskell.org/wiki/Libraries/Proposals/MonadFail

Coauthored-by: Ben Gamari <ben@well-typed.com>
3 months agogitlab-ci: Fix linters
Ben Gamari [Fri, 22 Mar 2019 04:46:37 +0000 (00:46 -0400)] 
gitlab-ci: Fix linters

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

3 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

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

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

Due to https://github.com/haskell/cabal/issues/5953.

3 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
```

3 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

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

3 months agoOnly run check-makefiles.py linter in testsuite dir
Matthew Pickering [Wed, 20 Mar 2019 14:17:54 +0000 (14:17 +0000)] 
Only run check-makefiles.py linter in testsuite dir

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

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

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

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

3 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

3 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

3 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:

```haskell
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.

3 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

3 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

3 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`.

3 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

3 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

3 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

3 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

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

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

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

3 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

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

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

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

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

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

3 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
out.

See #16390.

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

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

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

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

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

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

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

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

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

3 months agoSimplify monadic code
Krzysztof Gogolewski [Mon, 18 Mar 2019 18:34:00 +0000 (19:34 +0100)] 
Simplify monadic code

3 months agoFix typos
Krzysztof Gogolewski [Mon, 18 Mar 2019 18:31:19 +0000 (19:31 +0100)] 
Fix typos

3 months agoReplace nOfThem by replicate
Krzysztof Gogolewski [Mon, 18 Mar 2019 18:22:10 +0000 (19:22 +0100)] 
Replace nOfThem by replicate

3 months agousers-guide: Update Wiki URLs to point to GitLab
Takenobu Tani [Mon, 18 Mar 2019 13:07:06 +0000 (22:07 +0900)] 
users-guide: Update Wiki URLs to point to GitLab

The user's guide uses the `ghc-wiki` macro, and substitution rules
are complicated. So I manually edited `.rst` files without sed.

I changed `Commentary/Latedmd` only to a different page.
It is more appropriate as an example.

[ci skip]