[Git][ghc/ghc][wip/test] 122 commits: User's Guide: extensions compatibility

Ben Gamari gitlab at gitlab.haskell.org
Sat Apr 20 15:56:18 UTC 2019



Ben Gamari pushed to branch wip/test at Glasgow Haskell Compiler / GHC


Commits:
d763b2e7 by Haskell-mouse at 2019-03-25T18:02:22Z
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.

- - - - -
200d65ef by Matthew Pickering at 2019-03-25T18:02:25Z
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.

- - - - -
8e07368f by Matthew Pickering at 2019-03-25T18:02:27Z
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.

- - - - -
3769e3a8 by Takenobu Tani at 2019-03-25T18:02:29Z
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

- - - - -
b9da2868 by Ryan Scott at 2019-03-25T18:02:33Z
Correct duplicate 4.12.0.0 entry in base's changelog

See #16490.

[ci skip]

- - - - -
ab41c1b4 by Andrey Mokhov at 2019-03-27T11:20:03Z
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

- - - - -
646f2e79 by Andrey Mokhov at 2019-03-27T11:20:03Z
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.

- - - - -
fb12f53c by Alp Mestanogullari at 2019-03-27T11:20:05Z
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`.

- - - - -
3dec527a by David Eichmann at 2019-03-27T11:20:09Z
Hadrian: don't use -zorigin on darwin.

- - - - -
5730f863 by Ömer Sinan Ağacan at 2019-03-27T11:20:10Z
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.

- - - - -
4acdb769 by Chaitanya Koparkar at 2019-03-27T11:20:11Z
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.

- - - - -
97ad5cfb by Artem Pelenitsyn at 2019-03-29T18:18:12Z
Add some tips to the Troubleshooting section of README

- - - - -
8a20bfc2 by Michael Peyton Jones at 2019-03-29T18:18:14Z
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.

- - - - -
754b5455 by Artem Pelenitsyn at 2019-03-29T18:18:20Z
docs: make nfib compute the Fibonacci sequence [skipci]
- - - - -
1a567133 by Ben Gamari at 2019-03-29T18:18:20Z
ci: Check that changelogs don't contain "TBA"

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

- - - - -
6e15ca54 by Ben Gamari at 2019-03-29T18:18:22Z
Bump transformers to 0.5.6.2

See #16199.

- - - - -
6f7115df by Ben Gamari at 2019-03-30T11:42:38Z
ci: Ensure index.html is preserved in documentation tarball

- - - - -
33173a51 by Alexandre at 2019-04-01T07:32:28Z
    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.

- - - - -
a3971b4e by Alexandre at 2019-04-01T07:32:28Z
Bump ghc-prim's version where needed

- - - - -
061276ea by Michael Sloan at 2019-04-01T07:32:30Z
Remove unnecessary uses of UnboxedTuples pragma (see #13101 / #15454)

Also removes a couple unnecessary MagicHash pragmas

- - - - -
e468c613 by David Eichmann at 2019-04-01T07:32:34Z
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.

- - - - -
1e9e4197 by Ben Gamari at 2019-04-01T07:32:34Z
gitlab: Add merge request template for backports for 8.8

- - - - -
55650d14 by Ben Gamari at 2019-04-01T07:32:34Z
gitlab: Add some simply issue templates

- - - - -
27b99ed8 by Takenobu Tani at 2019-04-01T07:32:36Z
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]

- - - - -
18d1555d by Adam Sandberg Eriksson at 2019-04-01T07:32:38Z
configure: document the use of the LD variable

- - - - -
10352efa by Ben Gamari at 2019-04-01T22:22:34Z
gitlab: Add feature request MR template

- - - - -
1e52054b by Ben Gamari at 2019-04-01T23:16:21Z
gitlab: Move feature request template to issue_templates

Whoops.

- - - - -
e5c21ca9 by Ben Gamari at 2019-04-01T23:16:25Z
gitlab: Mention ~"user facing" label

- - - - -
39282422 by Ryan Scott at 2019-04-02T00:01:38Z
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`).

- - - - -
7cf5ba3d by Michal Terepeta at 2019-04-02T00:07:49Z
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 at gmail.com>

- - - - -
dd9c82ef by David Eichmann at 2019-04-02T00:13:55Z
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.

- - - - -
345306d3 by Alexandre Baldé at 2019-04-02T16:34:30Z
Fix formatting issue in ghc-prim's changelog [skip ci]

- - - - -
f54b5124 by David Eichmann at 2019-04-02T16:40:39Z
Hadrian: traceAllow deep dependencies when compilling haskell object files.

- - - - -
d132b30a by David Eichmann at 2019-04-02T16:40:39Z
Hadrian: lint ignore autom4te and ghc-pkg cache files.

- - - - -
bf734195 by Simon Marlow at 2019-04-02T16:46:46Z
Add myself to libraries/ghci
- - - - -
5a75ccd0 by klebinger.andreas at gmx.at at 2019-04-03T04:34:57Z
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.

- - - - -
2ec749b5 by Nathan Collins at 2019-04-03T04:41:05Z
users-guide: Fix typo

- - - - -
ea192a09 by Andrew Martin at 2019-04-03T04:41:05Z
base: Add documentation that liftA2 used to not be a typeclass method

- - - - -
733f1b52 by Frank Steffahn at 2019-04-03T04:41:05Z
users-guide: Typo in Users Guide, Glasgow Exts

- - - - -
3364def0 by Ben Gamari at 2019-04-03T04:41:05Z
integer-gmp: Write friendlier documentation for Integer

- - - - -
dd3a3d08 by Ben Gamari at 2019-04-03T04:41:05Z
integer-simple: Add documentation for Integer type

- - - - -
722fdddf by Chris Martin at 2019-04-03T04:41:05Z
Correct two misspellings of "separately"

- - - - -
bf6dbe3d by Chris Martin at 2019-04-03T04:41:05Z
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.

- - - - -
7b090b53 by Ben Gamari at 2019-04-03T07:57:40Z
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].

- - - - -
4626cf21 by Sebastian Graf at 2019-04-03T08:03:47Z
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.

- - - - -
6f13e7b1 by Ben Gamari at 2019-04-03T12:12:26Z
gitlab-ci: Build hyperlinked sources for releases

Fixes #16445.

- - - - -
895394c2 by Ben Gamari at 2019-04-03T12:15:06Z
gitlab: Fix label names in issue templates

- - - - -
75abaaea by Yuriy Syrovetskiy at 2019-04-04T08:23:19Z
Replace git.haskell.org with gitlab.haskell.org (#16196)

- - - - -
25c02ea1 by Ryan Scott at 2019-04-04T08:29:29Z
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.

- - - - -
51fd3571 by Ryan Scott at 2019-04-04T08:35:39Z
Use funPrec, not topPrec, to parenthesize GADT argument types

A simple oversight. Fixes #16527.

- - - - -
6c0dd085 by Ben Gamari at 2019-04-04T12:12:24Z
testsuite: Add testcase for #16111

- - - - -
cbb88865 by klebinger.andreas at gmx.at at 2019-04-04T12:12:25Z
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.

- - - - -
33b0a291 by Ryan Scott at 2019-04-04T12:12:28Z
Tweak error messages for narrowly-kinded assoc default decls

This program, from #13971, currently has a rather confusing error
message:

```hs
class C a where
  type T a :: k
  type T a = Int
```
```
    • Kind mis-match on LHS of default declaration for ‘T’
    • In the default type instance declaration for ‘T’
      In the class declaration for ‘C’
```

It's not at all obvious why GHC is complaining about the LHS until
you realize that the default, when printed with
`-fprint-explicit-kinds`, is actually `type T @{k} @* a = Int`.
That is to say, the kind of `a` is being instantiated to `Type`,
whereas it ought to be a kind variable. The primary thrust of this
patch is to weak the error message to make this connection
more obvious:

```
    • Illegal argument ‘*’ in:
        ‘type T @{k} @* a = Int’
        The arguments to ‘T’ must all be type variables
    • In the default type instance declaration for ‘T’
      In the class declaration for ‘C’
```

Along the way, I performed some code cleanup suggested by @rae in
https://gitlab.haskell.org/ghc/ghc/issues/13971#note_191287. Before,
we were creating a substitution from the default declaration's type
variables to the type family tycon's type variables by way of
`tcMatchTys`. But this is overkill, since we already know (from the
aforementioned validity checking) that all the arguments in a default
declaration must be type variables anyway. Therefore, creating the
substitution is as simple as using `zipTvSubst`. I took the
opportunity to perform this refactoring while I was in town.

Fixes #13971.

- - - - -
3a38ea44 by Eric Crockett at 2019-04-07T19:21:59Z
Fix #16282.

Previously, -W(all-)missed-specs was created with 'NoReason',
so no information about the flag was printed along with the warning.
Now, -Wall-missed-specs is listed as the Reason if it was set,
otherwise -Wmissed-specs is listed as the reason.

- - - - -
63b7d5fb by Michal Terepeta at 2019-04-08T18:29:34Z
Generate straightline code for inline array allocation

GHC has an optimization for allocating arrays when the size is
statically known -- it'll generate the code allocating and initializing
the array inline (instead of a call to a procedure from
`rts/PrimOps.cmm`).

However, the generated code uses a loop to do the initialization. Since
we already check that the requested size is small (we check against
`maxInlineAllocSize`), we can generate faster straightline code instead.
This brings about 15% improvement for `newSmallArray#` in my testing and
slightly simplifies the code in GHC.

Signed-off-by: Michal Terepeta <michal.terepeta at gmail.com>

- - - - -
2b3f4718 by Phuong Trinh at 2019-04-08T18:35:43Z
Fix #16500: look for interface files in -hidir flag in OneShot mode

We are currently ignoring options set in the hiDir field of hsc_dflags
when looking for interface files while compiling in OneShot mode. This
is inconsistent with the behaviour of other directory redirecting fields
(such as objectDir or hieDir). It is also inconsistent with the
behaviour of compilation in CompManager mode (a.k.a `ghc --make`) which
looks for interface files in the directory set in hidir flag. This
changes Finder.hs so that we use the value of hiDir while looking for
interface in OneShot mode.

- - - - -
97502be8 by Yuriy Syrovetskiy at 2019-04-08T18:41:51Z
Add `-optcxx` option (#16477)

- - - - -
97d3d546 by Ben Gamari at 2019-04-08T18:47:54Z
testsuite: Unmark T16190 as broken

Was broken via #16389 yet strangely it has started passing despite the
fact that the suggested root cause has not changed.

- - - - -
a42d206a by Yuriy Syrovetskiy at 2019-04-08T18:54:02Z
Fix whitespace style

- - - - -
4dda2270 by Matthew Pickering at 2019-04-08T19:00:08Z
Use ./hadrian/ghci.sh in .ghcid

- - - - -
d236d9d0 by Sebastian Graf at 2019-04-08T19:06:15Z
Make `singleConstructor` cope with pattern synonyms

Previously, `singleConstructor` didn't handle singleton `COMPLETE` sets
of a single pattern synonym, resulting in incomplete pattern warnings
in #15753.

This is fixed by making `singleConstructor` (now named
`singleMatchConstructor`) query `allCompleteMatches`, necessarily making
it effectful. As a result, most of this patch is concerned with
threading the side-effect through to `singleMatchConstructor`.

Unfortunately, this is not enough to completely fix the original
reproduction from #15753 and #15884, which are related to function
applications in pattern guards being translated too conservatively.

- - - - -
1085090e by Ömer Sinan Ağacan at 2019-04-08T19:12:22Z
Skip test ArithInt16 and ArithWord16 in GHCi way

These tests use unboxed tuples, which GHCi doesn't support

- - - - -
7287bb9e by Ömer Sinan Ağacan at 2019-04-08T19:18:33Z
testsuite: Show exit code of GHCi tests on failure

- - - - -
f5604d37 by John Ericson at 2019-04-08T19:24:43Z
settings.in: Reformat

We're might be about to switch to generating it in Hadrian/Make. This
reformat makes it easier to programmingmatically generate and end up
with the exact same thing, which is good for diffing to ensure no
regressions.

I had this as part of !712, but given the difficulty of satisfying CI, I
figured I should break things up even further.

- - - - -
cf9e1837 by Ryan Scott at 2019-04-08T19:30:51Z
Bump hpc submodule

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

- - - - -
36d38047 by Ben Gamari at 2019-04-09T14:23:47Z
users-guide: Document how to disable package environments

As noted in #16309 this somehow went undocumented.

- - - - -
af4cea7f by Artem Pyanykh at 2019-04-09T14:30:13Z
codegen: fix memset unroll for small bytearrays, add 64-bit sets

Fixes #16052

When the offset in `setByteArray#` is statically known, we can provide
better alignment guarantees then just 1 byte.

Also, memset can now do 64-bit wide sets.

The current memset intrinsic is not optimal however and can be
improved for the case when we know that we deal with

(baseAddress at known alignment) + offset

For instance, on 64-bit

`setByteArray# s 1# 23# 0#`

given that bytearray is 8 bytes aligned could be unrolled into
`movb, movw, movl, movq, movq`; but currently it is
`movb x23` since alignment of 1 is all we can embed into MO_Memset op.

- - - - -
bd2de4f0 by Artem Pyanykh at 2019-04-09T14:30:13Z
codegen: use newtype for Alignment in BasicTypes

- - - - -
14a78707 by Artem Pyanykh at 2019-04-09T14:30:13Z
docs: add a note about changes in memset unrolling to 8.10.1-notes

- - - - -
fe40ddd9 by Sylvain Henry at 2019-04-09T16:50:15Z
Hadrian: fix library install paths in bindist Makefile (#16498)

GHC now works out-of-the-box (i.e. without any wrapper script) by
assuming that @bin@ and @lib@ directories sit next to each other. In
particular, its RUNPATH uses $ORIGIN-based relative path to find the
libraries.

However, to be good citizens we want to support the case where @bin@ and
@lib@ directories (respectively BINDIR and LIBDIR) don't sit next to
each other or are renamed. To do that the install script simply creates
GHC specific @bin@ and @lib@ siblings directories into:

   LIBDIR/ghc-VERSION/{bin,lib}

Then it installs wrapper scripts into BINDIR that call the appropriate
programs into LIBDIR/ghc-VERSION/bin/.

The issue fixed by this patch is that libraries were not installed into
LIBDIR/ghc-VERSION/lib but directly into LIBDIR.

- - - - -
9acdc4c0 by Ben Gamari at 2019-04-09T16:56:38Z
gitlab: Bump cabal-install version used by Windows builds to 2.4

Hopefully fixes Windows Hadrian build.

- - - - -
fc3f421b by Joachim Breitner at 2019-04-10T03:17:37Z
GHC no longer ever defines TABLES_NEXT_TO_CODE on its own

It should be entirely the responsibility of make/Hadrian to ensure that
everything that needs this flag gets it. GHC shouldn't be hardcoded to
assist with bootstrapping since it builds other things besides itself.

Reviewers:

Subscribers: TerrorJack, rwbarton, carter

GHC Trac Issues: #15548 -- progress towards but not fix

Differential Revision: https://phabricator.haskell.org/D5082 -- extract
from that

- - - - -
be0dde8e by Ryan Scott at 2019-04-10T03:23:50Z
Use ghc-prim < 0.7, not <= 0.6.1, as upper version bounds

Using `ghc-prim <= 0.6.1` is somewhat dodgy from a PVP point of view,
as it makes it awkward to support new minor releases of `ghc-prim`.
Let's instead use `< 0.7`, which is the idiomatic way of expressing
PVP-compliant upper version bounds.

- - - - -
42504f4a by Carter Schonwald at 2019-04-11T00:28:41Z
removing x87 register support from native code gen

* simplifies registers to have GPR, Float and Double, by removing the SSE2 and X87 Constructors
* makes -msse2 assumed/default for x86 platforms, fixing a long standing nondeterminism in rounding
behavior in 32bit haskell code
* removes the 80bit floating point representation from the supported float sizes
* theres still 1 tiny bit of x87 support needed,
for handling float and double return values in FFI calls  wrt the C ABI on x86_32,
but this one piece does not leak into the rest of NCG.
* Lots of code thats not been touched in a long time got deleted as a
consequence of all of this

all in all, this change paves the way towards a lot of future further
improvements in how GHC handles floating point computations, along with
making the native code gen more accessible to a larger pool of contributors.

- - - - -
c401f8a4 by Sylvain Henry at 2019-04-11T23:51:24Z
Hadrian: fix binary-dir with --docs=none

Hadrian's "binary-dist" target must check that the "docs" directory
exists (it may not since we can disable docs generation).

- - - - -
091195a4 by Ömer Sinan Ağacan at 2019-04-11T23:57:38Z
Remove unused remilestoning script

- - - - -
fa0ccbb8 by Ömer Sinan Ağacan at 2019-04-11T23:57:38Z
Update a panic message

Point users to the right URL

- - - - -
beaa07d2 by Sylvain Henry at 2019-04-12T17:17:21Z
Hadrian: fix ghci wrapper script generation (#16508)

- - - - -
e05df3e1 by Ben Gamari at 2019-04-12T17:23:30Z
gitlab-ci: Ensure that version number has three components

- - - - -
885d2e04 by klebinger.andreas at gmx.at at 2019-04-12T18:40:04Z
Add -ddump-stg-final to dump stg as it is used for codegen.

Intermediate STG does not contain free variables which can be useful
sometimes. So adding a flag to dump that info.

- - - - -
3c759ced by Alp Mestanogullari at 2019-04-12T18:46:54Z
Hadrian: add a --test-accept/-a flag, to mimic 'make accept'

When -a or --test-accept is passed, and if one runs the 'test' target, then
any test failing because of mismatching output and which is not expected to
fail will have its expected output adjusted by the test driver, effectively
considering the new output correct from now on.

When this flag is passed, hadrian's 'test' target becomes sensitive to the
PLATFORM and OS environment variable, just like the Make build system:
- when the PLATFORM env var is set to "YES", when accepting a result, accept it
  for the current platform;
- when the OS env var is set to "YES", when accepting a result, accept it
  for all wordsizes of the current operating system.

This can all be combined with `--only="..."` and `TEST="..." to only accept
the new output of a subset of tests.

- - - - -
f4b5a6c0 by Alp Mestanogullari at 2019-04-12T18:46:54Z
Hadrian: document -a/--test-accept

- - - - -
30a0988d by Ben Gamari at 2019-04-12T19:41:07Z
gitlab: Disable windows-hadrian job

Not only is it reliably failing due to #16574 but all of the quickly
failing builds also causes the Windows runners to run out of disk space.

- - - - -
8870a51b by Ben Gamari at 2019-04-12T19:41:07Z
gitlab: Don't run lint-submods job on Marge branches

This broke Marge by creating a second pipeline (consisting of only the
`lint-submods` job). Marge then looked at this pipeline and concluded
that CI for her merge branch passed. However, this is ignores the fact
that the majority of the CI jobs are triggered on `merge_request` and
are therefore in another pipeline.

- - - - -
7876d088 by Ben Gamari at 2019-04-13T13:51:59Z
linters: Fix check-version-number

This should have used `grep -E`, not `grep -e`
- - - - -
2e7b2e55 by Ara Adkins at 2019-04-13T14:00:02Z
[skip ci] Update CI badge in readme

This trivial MR updates the CI badge in the readme to point to the
new CI on gitlab, rather than the very out-of-date badge from
Travis.

- - - - -
40848a43 by Ben Gamari at 2019-04-13T14:02:36Z
base: Better document implementation implications of Data.Timeout

As noted in #16546 timeout uses asynchronous exceptions internally, an
implementation detail which can leak out in surprising ways.  Note this
fact.

Also expose the `Timeout` tycon.

[skip ci]

- - - - -
5f183081 by David Eichmann at 2019-04-14T05:08:15Z
Hadrian: add rts shared library symlinks for backwards compatability

Fixes test T3807 when building with Hadrian.

Trac #16370

- - - - -
9b142c53 by Sylvain Henry at 2019-04-14T05:14:23Z
Hadrian: add binary-dist-dir target

This patch adds an Hadrian target "binary-dist-dir". Compared to
"binary-dist", it only builds a binary distribution directory without
creating the Tar archive. It makes the use/test of the bindist
installation script easier.

- - - - -
6febc444 by Krzysztof Gogolewski at 2019-04-14T05:20:29Z
Fix assertion failures reported in #16533

- - - - -
edcef7b3 by Artem Pyanykh at 2019-04-14T05:26:35Z
codegen: unroll memcpy calls for small bytearrays

- - - - -
6094d43f by Artem Pyanykh at 2019-04-14T05:26:35Z
docs: mention memcpy optimization for ByteArrays in 8.10.1-notes

- - - - -
d2271fe4 by Simon Jakobi at 2019-04-14T12:43:17Z
Ord docs: Add explanation on 'min' and 'max' operator interactions

[ci skip]

- - - - -
e7cad16c by Krzysztof Gogolewski at 2019-04-14T12:49:23Z
Add a safeguard to Core Lint

Lint returns a pair (Maybe a, WarnsAndErrs). The Maybe monad
allows to handle an unrecoverable failure.
In case of such a failure, the error should be added to the second
component of the pair. If this is not done, Lint will silently
accept bad programs. This situation actually happened during
development of linear types. This adds a safeguard.

- - - - -
c54a093f by Ben Gamari at 2019-04-14T12:55:29Z
CODEOWNERS: Add simonmar as owner of rts/linker

I suspect this is why @simonmar wasn't notified of !706.

[skip ci]

- - - - -
1825f50d by Alp Mestanogullari at 2019-04-14T13:01:38Z
Hadrian: don't accept p_dyn for executables, to fix --flavour=prof

- - - - -
b024e289 by Giles Anderson at 2019-04-15T10:20:29Z
Document how -O3 is handled by GHC

    -O2 is the highest value of optimization.
    -O3 will be reverted to -O2.

- - - - -
4b1ef06d by Giles Anderson at 2019-04-15T10:20:29Z
Apply suggestion to docs/users_guide/using-optimisation.rst
- - - - -
71cf94db by Fraser Tweedale at 2019-04-15T10:26:37Z
GHCi: fix load order of .ghci files

Directives in .ghci files in the current directory ("local .ghci")
can be overridden by global files.  Change the order in which the
configs are loaded: global and $HOME/.ghci first, then local.

Also introduce a new field to GHCiState to control whether local
.ghci gets sourced or ignored.  This commit does not add a way to
set this value (a subsequent commit will add this), but the .ghci
sourcing routine respects its value.

Fixes: https://gitlab.haskell.org/ghc/ghc/issues/14689
Related: https://gitlab.haskell.org/ghc/ghc/issues/6017
Related: https://gitlab.haskell.org/ghc/ghc/issues/14250

- - - - -
5c06b60d by Fraser Tweedale at 2019-04-15T10:26:38Z
users-guide: update startup script order

Update users guide to match the new startup script order.  Also
clarify that -ignore-dot-ghci does not apply to scripts specified
via the -ghci-script option.

Part of: https://gitlab.haskell.org/ghc/ghc/issues/14689

- - - - -
aa490b35 by Fraser Tweedale at 2019-04-15T10:26:38Z
GHCi: add 'local-config' setting

Add the ':set local-config { source | ignore }' setting to control
whether .ghci file in current directory will be sourced or not.  The
directive can be set in global config or $HOME/.ghci, which are
processed before local .ghci files.

The default is "source", preserving current behaviour.

Related: https://gitlab.haskell.org/ghc/ghc/issues/6017
Related: https://gitlab.haskell.org/ghc/ghc/issues/14250

- - - - -
ed94d345 by Fraser Tweedale at 2019-04-15T10:26:38Z
users-guide: document :set local-config

Document the ':set local-config' command and add a warning about
sourcing untrusted local .ghci scripts.

Related: https://gitlab.haskell.org/ghc/ghc/issues/6017
Related: https://gitlab.haskell.org/ghc/ghc/issues/14250

- - - - -
be05bd81 by Gabor Greif at 2019-04-15T21:19:03Z
asm-emit-time IND_STATIC elimination

When a new closure identifier is being established to a
local or exported closure already emitted into the same
module, refrain from adding an IND_STATIC closure, and
instead emit an assembly-language alias.

Inter-module IND_STATIC objects still remain, and need to be
addressed by other measures.

Binary-size savings on nofib are around 0.1%.

- - - - -
57eb5bc6 by erthalion at 2019-04-16T19:40:36Z
Show dynamic object files (#16062)

Closes #16062. When -dynamic-too is specified, reflect that in the
progress message, like:

$ ghc Main.hs -dynamic-too
[1 of 1] Compiling Lib              ( Main.hs, Main.o, Main.dyn_o )

instead of:

$ ghc Main.hs -dynamic-too
[1 of 1] Compiling Lib              ( Main.hs, Main.o )

- - - - -
894ec447 by Andrey Mokhov at 2019-04-16T19:46:44Z
Hadrian: Generate GHC wrapper scripts

This is a temporary workaround for #16534. We generate wrapper scripts
<build-root>/ghc-stage1 and <build-root>/ghc-stage2 that can be used to
run Stage1 and Stage2 GHCs with the right arguments.

See https://gitlab.haskell.org/ghc/ghc/issues/16534.

- - - - -
e142ec99 by Sven Tennie at 2019-04-18T03:19:00Z
Typeset Big-O complexities with Tex-style notation (#16090)

E.g. use `\(\mathcal{O}(n^2)\)` instead of `/O(n^2)/`.

- - - - -
f0f495f0 by klebinger.andreas at gmx.at at 2019-04-18T03:25:10Z
Add an Outputable instance for SDoc with ppr = id.

When printf debugging this can be helpful.

- - - - -
e28706ea by Sylvain Henry at 2019-04-18T12:12:07Z
Gitlab: allow execution of CI pipeline from the web interface
[skip ci]

- - - - -
4c8a67a4 by Alp Mestanogullari at 2019-04-18T12:18:18Z
Hadrian: fix ghcDebugged and document it

- - - - -
5988f17a by Alp Mestanogullari at 2019-04-19T02:46:12Z
Hadrian: fix the value we pass to the test driver for config.compiler_debugged

We used to pass YES/NO, while that particular field is set to True/False. This
happens to fix an unexpected pass, T9208.

- - - - -
57cf1133 by Alec Theriault at 2019-04-19T02:52:25Z
TH: make `Lift` and `TExp` levity-polymorphic

Besides the obvious benefits of being able to manipulate `TExp`'s of
unboxed types, this also simplified `-XDeriveLift` all while making
it more capable.

  * `ghc-prim` is explicitly depended upon by `template-haskell`

  * The following TH things are parametrized over `RuntimeRep`:

      - `TExp(..)`
      - `unTypeQ`
      - `unsafeTExpCoerce`
      - `Lift(..)`

  * The following instances have been added to `Lift`:

      - `Int#`, `Word#`, `Float#`, `Double#`, `Char#`, `Addr#`
      - unboxed tuples of lifted types up to arity 7
      - unboxed sums of lifted types up to arity 7

    Ideally we would have levity-polymorphic _instances_ of unboxed
    tuples and sums.

  * The code generated by `-XDeriveLift` uses expression quotes
    instead of generating large amounts of TH code and having
    special hard-coded cases for some unboxed types.

- - - - -
fdfd9731 by Alec Theriault at 2019-04-19T02:52:25Z
Add test case for #16384

Now that `TExp` accepts unlifted types, #16384 is fixed. Since the real
issue there was GHC letting through an ill-kinded type which
`-dcore-lint` rightly rejected, a reasonable regression test is that
the program from #16384 can now be accepted without `-dcore-lint`
complaining.

- - - - -
eb2a4df8 by Michal Terepeta at 2019-04-20T03:32:08Z
StgCmmPrim: remove an unnecessary instruction in doNewArrayOp

Previously we would generate a local variable pointing after the array
header and use it to initialize the array elements. But we already use
stores with offset, so it's easy to just add the header to those offsets
during compilation and avoid generating the local variable (which would
become a LEA instruction when using native codegen; LLVM already
optimizes it away).

Signed-off-by: Michal Terepeta <michal.terepeta at gmail.com>

- - - - -
fcef26b6 by klebinger.andreas at gmx.at at 2019-04-20T03:38:16Z
Don't indent single alternative case expressions for STG.

Makes the width of STG dumps slightly saner.
Especially for things like unboxing.

Fixes #16580

- - - - -
e7280c93 by Vladislav Zavialov at 2019-04-20T03:44:24Z
Tagless final encoding of ExpCmdI in the parser

Before this change, we used a roundabout encoding:

1. a GADT (ExpCmdG)
2. a class to pass it around (ExpCmdI)
3. helpers to match on it (ecHsApp, ecHsIf, ecHsCase, ...)

It is more straightforward to turn these helpers into class methods,
removing the need for a GADT.

- - - - -
99dd5d6b by Alec Theriault at 2019-04-20T03:50:29Z
Haddock: support strict GADT args with docs

Rather than massaging the output of the parser to re-arrange docs and
bangs, it is simpler to patch the two places in which the strictness
info is needed (to accept that the `HsBangTy` may be inside an
`HsDocTy`).

Fixes #16585.

- - - - -
10776562 by Andrey Mokhov at 2019-04-20T03:56:38Z
Hadrian: Drop old/unused CI scripts

- - - - -
37b1a6da by Ben Gamari at 2019-04-20T15:55:20Z
gitlab-ci: Improve error message on failure of doc-tarball job

Previously the failure was quite nondescript.

- - - - -
e3fe2601 by Ben Gamari at 2019-04-20T15:55:35Z
gitlab-ci: Allow doc-tarball job to fail

Due to allowed failure of Windows job.

- - - - -
bd3872df by Ben Gamari at 2019-04-20T15:55:38Z
gitlab-ci: Only run release notes lint on release tags

- - - - -
2145b738 by Ben Gamari at 2019-04-20T15:55:38Z
gitlab-ci: Add centos7 release job

- - - - -
983c53c3 by Ben Gamari at 2019-04-20T15:55:38Z
gitlab-ci: Do not build profiled libraries on 32-bit Windows

Due to #15934.

- - - - -


30 changed files:

- .circleci/config.yml
- .ghcid
- .gitlab-ci.yml
- + .gitlab/issue_templates/bug.md
- + .gitlab/issue_templates/feature_request.md
- + .gitlab/linters/check-version-number.sh
- + .gitlab/merge_request_templates/backport-for-8.8.md
- .gitlab/merge_request_templates/merge-request.md
- .gitlab/win32-init.sh
- .mailmap
- ANNOUNCE
- CODEOWNERS
- HACKING.md
- INSTALL.md
- MAKEHELP.md
- Makefile
- README.md
- aclocal.m4
- bindisttest/Makefile
- bindisttest/ghc.mk
- boot
- compiler/Makefile
- compiler/basicTypes/BasicTypes.hs
- compiler/basicTypes/MkId.hs
- compiler/basicTypes/Module.hs
- compiler/basicTypes/RdrName.hs
- compiler/basicTypes/Unique.hs
- compiler/cmm/CLabel.hs
- compiler/cmm/CmmCallConv.hs
- compiler/cmm/CmmExpr.hs


The diff was not included because it is too large.


View it on GitLab: https://gitlab.haskell.org/ghc/ghc/compare/3c6be20ef4d58e475863ae79bd09de43ff7e0e01...983c53c3da7a2e4e9c91f21adbd93c68a7922bae

-- 
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/compare/3c6be20ef4d58e475863ae79bd09de43ff7e0e01...983c53c3da7a2e4e9c91f21adbd93c68a7922bae
You're receiving this email because of your account on gitlab.haskell.org.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.haskell.org/pipermail/ghc-commits/attachments/20190420/e3c67f5d/attachment-0001.html>


More information about the ghc-commits mailing list