[Git][ghc/ghc][wip/inferred-vars] 44 commits: Restore the --coerce option in 'happy' configuration

Krzysztof Gogolewski gitlab at gitlab.haskell.org
Tue May 28 22:14:29 UTC 2019



Krzysztof Gogolewski pushed to branch wip/inferred-vars at Glasgow Haskell Compiler / GHC


Commits:
684dc290 by Vladislav Zavialov at 2019-05-14T20:41:19Z
Restore the --coerce option in 'happy' configuration

happy-1.19.10 has been released with a fix for --coerce in the presence
of higher rank types. This should result in about 10% performance
improvement in the parser.

- - - - -
a416ae26 by Alp Mestanogullari at 2019-05-14T20:41:20Z
Hadrian: 'need' source files for various docs in Rules.Documentation

Previously, changing one of the .rst files from the user guide would not cause
the user guide to be rebuilt. This patch take a first stab at declaring the
documentation source files that our documentation rules depend on, focusing
on the .rst files only for now.

We eventually might want to rebuild docs when we, say, change the haddock style
file, but this level of tracking isn't really necessary for now.

This fixes #16645.

- - - - -
7105fb66 by Ben Gamari at 2019-05-16T16:47:59Z
rts: Explicit state that CONSTR tag field is zero-based

This was a bit unclear as we use both one-based and zero-based
tags in GHC.

[skip ci]
- - - - -
5bb80cf2 by David Eichmann at 2019-05-20T14:41:55Z
Improve test runner logging when calculating performance metric baseline #16662

We attempt to get 75 commit hashes via `git log`, but this only gave 10
hashes in a CI run (see #16662). Better logging may help solve this
error if it occurs again in the future.

- - - - -
b46efa2b by David Eichmann at 2019-05-20T18:45:56Z
Recalculate Performance Test Baseline T9630 #16680

Metric Decrease:
    T9630

- - - - -
54095bbd by Takenobu Tani at 2019-05-21T20:54:00Z
users-guide: Fix directive errors on 8.10

The following sections are not displayed due to a directive error:

  * -Wunused-record-wildcards
  * -Wredundant-record-wildcards

I changed the location of the `since` directive.

[skip ci]

- - - - -
8fc654c3 by David Eichmann at 2019-05-21T20:57:37Z
Include CPP preprocessor dependencies in -M output

Issue #16521

- - - - -
0af519ac by David Eichmann at 2019-05-21T21:01:16Z
Refactor Libffi and RTS rules

This removes a hack that copies libffi files to the rts
build directory. This was done in a libffi rule, but now
an rts rule correctly needs and copies the relevant
files from the libffi build dir to the rts build dir.

Issues: #16272 #16304

- - - - -
9342b1fa by Kirill Elagin at 2019-05-21T21:04:54Z
users-guide: Fix -rtsopts default
- - - - -
d0142f21 by Javran Cheng at 2019-05-21T21:08:29Z
Fix doc for Data.Function.fix.

Doc-only change.

- - - - -
ddd905b4 by Shayne Fletcher at 2019-05-21T21:12:07Z
Update resolver for for happy 1.19.10

- - - - -
e32c30ca by Alp Mestanogullari at 2019-05-21T21:15:45Z
distrib/configure.ac.in: remove mention to 'settings', since settings.in is gone

Otherwise, when `./configure`ing a GHC bindist, produced by either Make or
Hadrian, we would try to generate the `settings` file from the `settings.in`
template that we used to have around but which has been gone since d37d91e9.
That commit generates the settings file using the build systems instead, but
forgot to remove this mention to the `settings` file.

- - - - -
4a6c8436 by Ryan Scott at 2019-05-21T21:19:22Z
Fix #16666 by parenthesizing contexts in Convert

Most places where we convert contexts in `Convert` are actually in
positions that are to the left of some `=>`, such as in superclasses
and instance contexts. Accordingly, these contexts need to be
parenthesized at `funPrec`. To accomplish this, this patch changes
`cvtContext` to require a precedence argument for the purposes of
calling `parenthesizeHsContext` and adjusts all `cvtContext` call
sites accordingly.

- - - - -
c32f64e5 by Ben Gamari at 2019-05-21T21:23:01Z
gitlab-ci: Allow Windows Hadrian build to fail

Due to #16574.
- - - - -
412a1f39 by Ben Gamari at 2019-05-21T21:23:01Z
Update .gitlab-ci.yml
- - - - -
0dc79856 by Julian Leviston at 2019-05-22T00:55:44Z
Allow for multiple linker instances. Fixes Haskell portion of #3372.

- - - - -
21272670 by Michael Sloan at 2019-05-22T20:37:57Z
Have GHCi use object code for UnboxedTuples modules #15454

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

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

- - - - -
ddae344e by Michael Sloan at 2019-05-22T20:41:31Z
Use datatype for unboxed returns when loading ghc into ghci

See #13101 and #15454

- - - - -
78c3f330 by Kevin Buhr at 2019-05-22T20:45:08Z
Add regression test for old Word32 arithmetic issue (#497)

- - - - -
ecc9366a by Alec Theriault at 2019-05-22T20:48:45Z
RTS: Fix restrictive cast

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

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

- - - - -
2c15b85e by Alp Mestanogullari at 2019-05-22T20:52:22Z
Hadrian: add --test-root-dirs, to only run specific directories of tests

We can specify several of those, by using the flag multiple times or
just once but combining the directories with ':'.

Along the way, this patch also fixes the testsuite-related --only flag,
so that we can use it many times instead of being force to specify a
space-separated list of test in a single --only flag.

- - - - -
6efe04de by Ryan Scott at 2019-05-22T20:56:01Z
Use HsTyPats in associated type family defaults

Associated type family default declarations behave strangely in a
couple of ways:

1. If one tries to bind the type variables with an explicit `forall`,
   the `forall`'d part will simply be ignored. (#16110)
2. One cannot use visible kind application syntax on the left-hand
   sides of associated default equations, unlike every other form
   of type family equation. (#16356)

Both of these issues have a common solution. Instead of using
`LHsQTyVars` to represent the left-hand side arguments of an
associated default equation, we instead use `HsTyPats`, which is what
other forms of type family equations use. In particular, here are
some highlights of this patch:

* `FamEqn` is no longer parameterized by a `pats` type variable, as
  the `feqn_pats` field is now always `HsTyPats`.
* The new design for `FamEqn` in chronicled in
  `Note [Type family instance declarations in HsSyn]`.
* `TyFamDefltEqn` now becomes the same thing as `TyFamInstEqn`. This
  means that many of `TyFamDefltEqn`'s code paths can now reuse the
  code paths for `TyFamInstEqn`, resulting in substantial
  simplifications to various parts of the code dealing with
  associated type family defaults.

Fixes #16110 and #16356.

- - - - -
4ba73e00 by Luite Stegeman at 2019-05-22T20:59:39Z
fix Template Haskell cross compilation on 64 bit compiler with 32 bit target

- - - - -
535a26c9 by David Eichmann at 2019-05-23T17:26:37Z
Revert "Add Generic tuple instances up to 15-tuple" #16688

This reverts commit 5eb9445444c4099fc9ee0803ba45db390900a80f.
It has caused an increase in variance of performance test T9630,
causing CI to fail.

- - - - -
04b4b984 by Alp Mestanogullari at 2019-05-24T02:32:15Z
add an --hadrian mode to ./validate

When the '--hadrian' flag is passed to the validate script, we use hadrian
to build GHC, package it up in a binary distribution and later on run GHC's
testsuite against the said bindist, which gets installed locally in the process.

Along the way, this commit fixes a typo, an omission (build iserv binaries
before producing the bindist archive) and moves the Makefile that enables
'make install' on those bindists from being a list of strings in the code to
an actual file (it was becoming increasingly annoying to work with).

Finally, the Settings.Builders.Ghc part of this patch is necessary for being
able to use the installed binary distribution, in 'validate'.

- - - - -
0b449d34 by Ömer Sinan Ağacan at 2019-05-24T02:35:54Z
Add a test for #16597

- - - - -
59f4cb6f by Iavor Diatchki at 2019-05-24T02:39:35Z
Add a `NOINLINE` pragma on `someNatVal` (#16586)

This fixes #16586, see `Note [NOINLINE someNatVal]` for details.

- - - - -
6eedbd83 by Ryan Scott at 2019-05-24T02:43:12Z
Some forall-related cleanup in deriving code

* Tweak the parser to allow `deriving` clauses to mention explicit
  `forall`s or kind signatures without gratuitous parentheses.
  (This fixes #14332 as a consequence.)
* Allow Haddock comments on `deriving` clauses with explicit
  `forall`s. This requires corresponding changes in Haddock.

- - - - -
c931f256 by David Eichmann at 2019-05-24T10:22:29Z
Allow metric change after reverting "Add Generic tuple instances up to 15-tuple" #16688

Metrics increased on commit 5eb9445444c4099fc9ee0803ba45db390900a80f and
decreased on revert commit 535a26c90f458801aeb1e941a3f541200d171e8f.

Metric Decrease:
    T9630
    haddock.base

- - - - -
d9dfbde3 by Michael Sloan at 2019-05-24T15:55:07Z
Add PlainPanic for throwing exceptions without depending on pprint

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

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

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

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

- - - - -
70c24471 by Moritz Angermann at 2019-05-25T21:51:30Z
Add `keepCAFs` to RtsSymbols

- - - - -
9be1749d by David Eichmann at 2019-05-25T21:55:05Z
Hadrian: Add Mising Libffi Dependencies #16653

Libffi is ultimately built from a single archive file (e.g.
libffi-tarballs/libffi-3.99999+git20171002+77e130c.tar.gz).
The file can be seen as the shallow dependency for the whole
libffi build. Hence, in all libffi rules, the archive is
`need`ed and the build directory is `trackAllow`ed.

- - - - -
2d0cf625 by Sandy Maguire at 2019-05-26T12:57:20Z
Let the specialiser work on dicts under lambdas

Following the discussion under #16473, this change allows the
specializer to work on any dicts in a lambda, not just those that occur
at the beginning.

For example, if you use data types which contain dictionaries and
higher-rank functions then once these are erased by the optimiser you
end up with functions such as:

```
  go_s4K9
  Int#
  -> forall (m :: * -> *).
     Monad m =>
     (forall x. Union '[State (Sum Int)] x -> m x) -> m ()
```

The dictionary argument is after the Int# value argument, this patch
allows `go` to be specialised.

- - - - -
4b228768 by Moritz Angermann at 2019-05-27T05:19:49Z
Lowercase windows imports

While windows and macOS are currently on case-insensitive file
systems, this poses no issue on those.  When cross compiling from
linux with a case sensitive file system and mingw providing only
lowercase headers, this in fact produces an issue.  As such we just
lowercase the import headers, which should still work fine on a
case insensitive file system and also enable mingw's headers to
be usable porperly.

- - - - -
01f8e390 by Alp Mestanogullari at 2019-05-27T14:06:26Z
Hadrian: Fix problem with unlit path in settings file

e529c65e introduced a problem in the logic for generating the
path to the unlit command in the settings file, and this patches
fixes it.

This fixes many tests, the simplest of which is:

> _build/stage1/bin/ghc testsuite/tests/parser/should_fail/T8430.lhs

which failed because of a wrong path for unlit, and now fails for the right
reason, with the error message expected for this test.

This addresses #16659.

- - - - -
dcd843ac by mizunashi_mana at 2019-05-27T14:06:27Z
Fix typo of primop format
- - - - -
3f6e5b97 by Joshua Price at 2019-05-27T14:06:28Z
Correct the large tuples section in user's guide

Fixes #16644.

- - - - -
1f51aad6 by Krzysztof Gogolewski at 2019-05-27T14:06:28Z
Fix tcfail158 (#15899)

As described in #15899, this test was broken, but now it's back
to normal.

- - - - -
723216e3 by Sebastian Graf at 2019-05-27T14:06:29Z
Add a pprTraceWith function

- - - - -
6d188dd5 by Simon Jakobi at 2019-05-27T14:06:31Z
base: Include (<$) in all exports of Functor

Previously the haddocks for Control.Monad and Data.Functor gave
the impression that `fmap` was the only Functor method.

Fixes #16681.

- - - - -
95b79173 by Jasper Van der Jeugt at 2019-05-27T14:06:32Z
Fix padding of entries in .prof files

When the number of entries of a cost centre reaches 11 digits, it takes
up the whole space reserved for it and the prof file ends up looking
like:

    ... no.        entries  %time %alloc   %time %alloc

        ...
    ... 120918     978250    0.0    0.0     0.0    0.0
    ... 118891          0    0.0    0.0    73.3   80.8
    ... 11890229702412351    8.9   13.5    73.3   80.8
    ... 118903  153799689    0.0    0.1     0.0    0.1
        ...

This results in tooling not being able to parse the .prof file.  I
realise we have the JSON output as well now, but still it'd be good to
fix this little weirdness.

Original bug report and full prof file can be seen here:
<https://github.com/jaspervdj/profiteur/issues/28>.

- - - - -
f80d3afd by John Ericson at 2019-05-27T14:06:33Z
hadrian: Fix generation of settings

I jumbled some lines in e529c65eacf595006dd5358491d28c202d673732,
messing up the leading underscores and rts ways settings. This broke at
least stage1 linking on macOS, but probably loads of other things too.

Should fix #16685 and #16658.

- - - - -
db8e3275 by Ömer Sinan Ağacan at 2019-05-27T14:06:37Z
Add missing opening braces in Cmm dumps

Previously -ddump-cmm was generating code with unbalanced curly braces:

     stg_atomically_entry() //  [R1]
             { info_tbls: [(cfl,
                            label: stg_atomically_info
                            rep: tag:16 HeapRep 1 ptrs { Thunk }
                            srt: Nothing)]
               stack_info: arg_space: 8 updfr_space: Just 8
             }
         {offset
           cfl: // cfk
               unwind Sp = Just Sp + 0;
               _cfk::P64 = R1;
               //tick src<rts/PrimOps.cmm:(1243,1)-(1245,1)>
               R1 = I64[_cfk::P64 + 8 + 8 + 0 * 8];
               call stg_atomicallyzh(R1) args: 8, res: 0, upd: 8;
         }
     }, <---- OPENING BRACE MISSING

After this patch:

     stg_atomically_entry() { //  [R1] <---- MISSING OPENING BRACE HERE
             { info_tbls: [(cfl,
                            label: stg_atomically_info
                            rep: tag:16 HeapRep 1 ptrs { Thunk }
                            srt: Nothing)]
               stack_info: arg_space: 8 updfr_space: Just 8
             }
         {offset
           cfl: // cfk
               unwind Sp = Just Sp + 0;
               _cfk::P64 = R1;
               //tick src<rts/PrimOps.cmm:(1243,1)-(1245,1)>
               R1 = I64[_cfk::P64 + 8 + 8 + 0 * 8];
               call stg_atomicallyzh(R1) args: 8, res: 0, upd: 8;
         }
     },

- - - - -
9c32e223 by Krzysztof Gogolewski at 2019-05-28T22:13:53Z
In hole fits, don't show VTA for inferred variables (#16456)

We fetch the ArgFlag for every argument by using splitForAllVarBndrs
instead of splitForAllTys in unwrapTypeVars.

- - - - -


30 changed files:

- .gitlab-ci.yml
- aclocal.m4
- compiler/basicTypes/UniqSupply.hs
- compiler/cmm/PprCmmDecl.hs
- compiler/deSugar/DsMeta.hs
- compiler/deSugar/ExtractDocs.hs
- compiler/ghc.cabal.in
- compiler/ghci/Debugger.hs
- compiler/ghci/Linker.hs
- + compiler/ghci/LinkerTypes.hs
- compiler/hieFile/HieAst.hs
- compiler/hsSyn/Convert.hs
- compiler/hsSyn/HsDecls.hs
- compiler/hsSyn/HsExtension.hs
- compiler/hsSyn/HsInstances.hs
- compiler/iface/BinFingerprint.hs
- compiler/main/DriverMkDepend.hs
- compiler/main/DynFlags.hs
- compiler/main/GhcMake.hs
- compiler/main/HscMain.hs
- compiler/main/HscTypes.hs
- compiler/main/InteractiveEval.hs
- compiler/nativeGen/AsmCodeGen.hs
- compiler/nativeGen/RegAlloc/Linear/State.hs
- compiler/parser/Parser.y
- compiler/parser/RdrHsSyn.hs
- compiler/prelude/primops.txt.pp
- compiler/rename/RnSource.hs
- compiler/specialise/Specialise.hs
- compiler/typecheck/TcHoleErrors.hs


The diff was not included because it is too large.


View it on GitLab: https://gitlab.haskell.org/ghc/ghc/compare/4e3b6cc552e3e3ec2b2a2c867f7b47b49a144af9...9c32e223d21aab654190a8b7ea1987205654fbd2

-- 
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/compare/4e3b6cc552e3e3ec2b2a2c867f7b47b49a144af9...9c32e223d21aab654190a8b7ea1987205654fbd2
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/20190528/bd11b9b9/attachment-0001.html>


More information about the ghc-commits mailing list