ghc.git
3 months agogitlab: Add some simply issue templates wip/gitlab-merge-request-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 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]

3 months agoBump Cabal submodule to 3.0
Ben Gamari [Wed, 13 Mar 2019 20:37:29 +0000 (16:37 -0400)] 
Bump Cabal submodule to 3.0

Metric Increase:
    haddock.Cabal

3 months agoerr: clean up error handler
Tamar Christina [Mon, 31 Dec 2018 22:49:49 +0000 (22:49 +0000)] 
err: clean up error handler

3 months agogitlab-ci: Implement support for i386/Windows bindists
Ben Gamari [Tue, 5 Mar 2019 21:41:55 +0000 (16:41 -0500)] 
gitlab-ci: Implement support for i386/Windows bindists

3 months agogitlab-ci: Implement head.hackage jobs
Ben Gamari [Thu, 28 Feb 2019 04:33:12 +0000 (23:33 -0500)] 
gitlab-ci: Implement head.hackage jobs

3 months agogitlab-ci: Always build fedora27
Ben Gamari [Fri, 1 Mar 2019 15:39:22 +0000 (10:39 -0500)] 
gitlab-ci: Always build fedora27

This ends up being much easier to use than Debian 9 under NixOS.

3 months agoUpdate bug tracker link to point to gitlab instead of deprecated trac
Radosław Rowicki [Fri, 15 Mar 2019 22:20:42 +0000 (18:20 -0400)] 
Update bug tracker link to point to gitlab instead of deprecated trac

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

3 months agoghc-heap: Introduce closureSize
Ben Gamari [Wed, 13 Mar 2019 23:42:47 +0000 (19:42 -0400)] 
ghc-heap: Introduce closureSize

This function allows the user to compute the (non-transitive) size of a
heap object in words. The "closure" in the name is admittedly confusing
but we are stuck with this nomenclature at this point.

3 months agogitlab-ci: Generate source tarballs
Ben Gamari [Tue, 19 Feb 2019 15:00:02 +0000 (10:00 -0500)] 
gitlab-ci: Generate source tarballs

3 months agogitlab-ci: Generate documentation tarball
Ben Gamari [Wed, 6 Mar 2019 11:47:28 +0000 (06:47 -0500)] 
gitlab-ci: Generate documentation tarball

3 months agogitlab-ci: Explicitly set bindist tarball name
Ben Gamari [Wed, 6 Mar 2019 11:46:57 +0000 (06:46 -0500)] 
gitlab-ci: Explicitly set bindist tarball name

3 months agocompiler: Disable atomic renaming on Windows
Ben Gamari [Sat, 16 Mar 2019 12:57:43 +0000 (08:57 -0400)] 
compiler: Disable atomic renaming on Windows

As discussed in #16450, this feature regresses CI on Windows, causing
non-deterministic failures due to missing files.

4 months agoAdd location to the extra-constraints wildcard
Simon Peyton Jones [Wed, 13 Mar 2019 13:09:19 +0000 (13:09 +0000)] 
Add location to the extra-constraints wildcard

The extra-constraints wildcard had lost its location
(issue #16431).

Happily this is easy to fix.  Lots of error improvements.

4 months agoImprove error recovery in the typechecker
Simon Peyton Jones [Wed, 13 Mar 2019 11:15:20 +0000 (11:15 +0000)] 
Improve error recovery in the typechecker

Issue #16418 showed that we were carrying on too eagerly after a bogus
type signature was identified (a bad telescope in fact), leading to a
subsequent crash.

This led me in to a maze of twisty little passages in the typechecker's
error recovery, and I ended up doing some refactoring in TcRnMonad.
Some specfifics

* TcRnMonad.try_m is now called attemptM.

* I switched the order of the result pair in tryTc,
  to make it consistent with other similar functions.

* The actual exception used in the Tc monad is irrelevant so,
  to avoid polluting type signatures, I made tcTryM, a simple
  wrapper around tryM, and used it.

The more important changes are in

* TcSimplify.captureTopConstraints, where we should have been calling
  simplifyTop rather than reportUnsolved, so that levity defaulting
  takes place properly.

* TcUnify.emitResidualTvConstraint, where we need to set the correct
  status for a new implication constraint.  (Previously we ended up
  with an Insoluble constraint wrapped in an Unsolved implication,
  which meant that insolubleWC gave the wrong answer.

4 months agoAdd flavours link
Simon Peyton Jones [Thu, 14 Mar 2019 12:05:28 +0000 (08:05 -0400)] 
Add flavours link

4 months agoPPC NCG: Use liveness information in CmmCall
Peter Trommler [Tue, 11 Dec 2018 15:43:49 +0000 (16:43 +0100)] 
PPC NCG: Use liveness information in CmmCall

We make liveness information for global registers
available on `JMP` and `BCTR`, which were the last instructions
missing. With complete liveness information we do not need to
reserve global registers in `freeReg` anymore. Moreover we
assign R9 and R10 to callee saves registers.

Cleanup by removing `Reg_Su`, which was unused, from `freeReg`
and removing unused register definitions.

The calculation of the number of floating point registers is too
conservative. Just follow X86 and specify the constants directly.

Overall on PowerPC this results in 0.3 % smaller code size in nofib
while runtime is slightly better in some tests.

4 months agoReport better suggestion for GADT data constructor
Simon Peyton Jones [Wed, 13 Mar 2019 13:27:22 +0000 (13:27 +0000)] 
Report better suggestion for GADT data constructor

This addresses issue #16427. An easy fix.

4 months agoUpdate Trac ticket URLs to point to GitLab
Ryan Scott [Tue, 12 Mar 2019 22:15:38 +0000 (18:15 -0400)] 
Update Trac ticket URLs to point to GitLab

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

4 months agoGit ignore .hadrian_ghci (generated by the ./hadrian/ghci.sh)
David Eichmann [Tue, 12 Mar 2019 17:13:12 +0000 (17:13 +0000)] 
Git ignore .hadrian_ghci (generated by the ./hadrian/ghci.sh)

[skip ci]

4 months agoHadrian: remove unneeded rpaths.
David Eichmann [Tue, 12 Mar 2019 17:06:04 +0000 (17:06 +0000)] 
Hadrian: remove unneeded rpaths.

Issue #12770

4 months agoHadrian: remove unneeded imports.
David Eichmann [Tue, 12 Mar 2019 12:00:18 +0000 (12:00 +0000)] 
Hadrian: remove unneeded imports.

4 months agoRemove the GHCi debugger's panicking isUnliftedType check
Ryan Scott [Tue, 12 Mar 2019 14:06:38 +0000 (10:06 -0400)] 
Remove the GHCi debugger's panicking isUnliftedType check

The GHCi debugger has never been that robust in the face of
higher-rank types, or even types that are _interally_ higher-rank,
such as the types of many class methods (e.g., `fmap`). In GHC 8.2,
however, things became even worse, as the debugger would start to
_panic_ when a user tries passing the name of a higher-rank thing
to `:print`. This all ties back to a strange `isUnliftedType` check
in `Debugger` that was mysteriously added 11 years ago
(in commit 4d71f5ee6dbbfedb4a55767e4375f4c0aadf70bb) with no
explanation whatsoever.

After some experimentation, no one is quite sure what this
`isUnliftedType` check is actually accomplishing. The test suite
still passes if it's removed, and I am unable to observe any
differences in debugger before even with data types that _do_ have
fields of unlifted types (e.g., `data T = MkT Int#`). Given that
this is actively causing problems (see #14828), the prudent thing
to do seems to be just removing this `isUnliftedType` check, and
waiting to see if anyone shouts about it. This patch accomplishes
just that.

Note that this patch fix the underlying issues behind #14828, as the
debugger will still print unhelpful info if you try this:

```
λ> f :: (forall a. a -> a) -> b -> b; f g x = g x
λ> :print f
f = (_t1::t1)
```

But fixing this will require much more work, so let's start with the
simple stuff for now.

4 months agotestsuite: Add testcase for #16394
Ben Gamari [Wed, 6 Mar 2019 01:33:51 +0000 (20:33 -0500)] 
testsuite: Add testcase for #16394

4 months agoFix #16411 by making dataConCannotMatch aware of (~~)
Ryan Scott [Sat, 9 Mar 2019 00:02:44 +0000 (19:02 -0500)] 
Fix #16411 by making dataConCannotMatch aware of (~~)

The `dataConCannotMatch` function (which powers the
`-Wpartial-fields` warning, among other things) had special reasoning
for explicit equality constraints of the form `a ~ b`, but it did
not extend that reasoning to `a ~~ b` constraints, leading to #16411.
Easily fixed.

4 months agoHadrian: build (and retrieve) binary distributions in CI
Alp Mestanogullari [Tue, 5 Mar 2019 18:01:54 +0000 (19:01 +0100)] 
Hadrian: build (and retrieve) binary distributions in CI

With all the recent fixes to the binary-dist rule in Hadrian, we can now run
that rule in CI and keep the bindists around in gitlab as artifacts, just like
we do for the make CI jobs.

To get 'autoreconf' to work in the Windows CI, we have to run it through the
shell interpreter, so this commit does that along the way.

4 months 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.

4 months agoRevert: Update ci-images commit
Matthew Pickering [Tue, 12 Mar 2019 13:44:45 +0000 (09:44 -0400)] 
Revert: Update ci-images commit

4 months agoCI: Update ci-images commit
Matthew Pickering [Tue, 12 Mar 2019 13:42:53 +0000 (09:42 -0400)] 
CI: Update ci-images commit

4 months agoAdd regression test for #16347
Ryan Scott [Mon, 11 Mar 2019 13:21:12 +0000 (09:21 -0400)] 
Add regression test for #16347

Commit 1f5cc9dc8aeeafa439d6d12c3c4565ada524b926 ended up
fixing #16347. Let's add a regression test to ensure that it stays
fixed.