[Git][ghc/ghc][wip/T18249] 16 commits: docs: -B rts option sounds the bell on every GC (#18351)

Sebastian Graf gitlab at gitlab.haskell.org
Wed Sep 16 16:58:26 UTC 2020



Sebastian Graf pushed to branch wip/T18249 at Glasgow Haskell Compiler / GHC


Commits:
35a7b7ec by Adam Sandberg Eriksson at 2020-09-14T17:46:16-04:00
docs: -B rts option sounds the bell on every GC (#18351)
- - - - -
5ae8212c by Wander Hillen at 2020-09-14T17:46:54-04:00
Populate gitlab cache after building

- - - - -
a5ffb39a by Wander Hillen at 2020-09-14T17:46:54-04:00
Move ahead cabal cache restoration to before use of cabal

- - - - -
e8b37c21 by Wander Hillen at 2020-09-14T17:46:54-04:00
Do the hadrian rebuild multicore

- - - - -
07762eb5 by Wander Hillen at 2020-09-14T17:46:54-04:00
Also cache other hadrian builds

- - - - -
8610bcbe by DenisFrezzato at 2020-09-15T15:19:08-04:00
Fix rtsopts documentation

- - - - -
c7182a5c by Simon Peyton Jones at 2020-09-15T15:19:44-04:00
Care with implicit-parameter superclasses

Two bugs, #18627 and #18649, had the same cause: we were not
account for the fact that a constaint tuple might hide an implicit
parameter.

The solution is not hard: look for implicit parameters in
superclasses.  See Note [Local implicit parameters] in
GHC.Core.Predicate.

Then we use this new function in two places

* The "short-cut solver" in GHC.Tc.Solver.Interact.shortCutSolver
  which simply didn't handle implicit parameters properly at all.
  This fixes #18627

* The specialiser, which should not specialise on implicit parameters
  This fixes #18649

There are some lingering worries (see Note [Local implicit
parameters]) but things are much better.

- - - - -
0f3884b0 by Zubin Duggal at 2020-09-15T15:20:23-04:00
Export enrichHie from GHC.Iface.Ext.Ast

This is useful for `ghcide`

- - - - -
b3143f5a by Sylvain Henry at 2020-09-15T15:21:06-04:00
Enhance metrics output

- - - - -
4283feaa by Ryan Scott at 2020-09-15T15:21:43-04:00
Introduce and use DerivClauseTys (#18662)

This switches `deriv_clause_tys` so that instead of using a list of
`LHsSigType`s to represent the types in a `deriving` clause, it now
uses a sum type. `DctSingle` represents a `deriving` clause with no
enclosing parentheses, while `DctMulti` represents a clause with
enclosing parentheses. This makes pretty-printing easier and avoids
confusion between `HsParTy` and the enclosing parentheses in
`deriving` clauses, which are different semantically.

Fixes #18662.

- - - - -
90229c4b by Ryan Scott at 2020-09-16T04:53:22-04:00
Include -f{write,validate}-ide-info in the User's Guide flag reference

Previously, these were omitted from the flag reference due to a
layout oversight in `docs/users_guide/flags.{rst,py}`.

Fixes #18426.

- - - - -
ce42e187 by Ben Gamari at 2020-09-16T04:53:59-04:00
rts: Fix erroneous usage of vsnprintf

As pointed out in #18685, this should be snprintf not vsnprintf. This
appears to be due to a cut-and-paste error.

Fixes #18658.

- - - - -
b695e7d7 by Sylvain Henry at 2020-09-16T04:54:38-04:00
Rename ghci flag into internal-interpreter

"ghci" as a flag name was confusing because it really enables the
internal-interpreter. Even the ghci library had a "ghci" flag...

- - - - -
8af954d2 by Sylvain Henry at 2020-09-16T04:55:17-04:00
Make ghc-boot reexport modules from ghc-boot-th

Packages don't have to import both ghc-boot and ghc-boot-th. It makes
the dependency graph easier to understand and to refactor.

- - - - -
290d96c4 by Sebastian Graf at 2020-09-16T18:38:44+02:00
PmCheck - Comments only: Replace /~ by ≁

- - - - -
314ef1aa by Sebastian Graf at 2020-09-16T18:58:13+02:00
PmCheck: Rewrite inhabitation test

We used to produce inhabitants of a pattern-match refinement type Nabla
in the checker in at least two different and mostly redundant ways:

  1. There was `provideEvidence` which is used by `GHC.HsToCore.PmCheck`
     to produce non-exhaustive patterns, which produces inhabitants of a
     Nabla as a sub-refinement type where all match variables are
     instantiated.
  2. There also was `ensure{,All}Inhabited` which worked slightly
     different, but was whenever new type constraints or negative term
     constraints were added. See below why `provideEvidence` and
     `ensureAllInhabited` can't be the same function, the main reason
     being performance.
  3. And last but not least there was the `nonVoid` test, which tested
     that a given type was inhabited. We did use this for strict fields
     and -XEmptyCase in the past.

The overlap of (3) with (2) was always a major pet peeve of mine. The
latter was quite efficient and proven to work for recursive data types,
etc, but could not handle negative constraints well (e.g. we often want
to know if a *refined* type is empty, such as @{ x:[a] | x /= [] }@).

Lower Your Guards suggested that we could get by with just one, by
replacing both functions with `inhabitationTest` in this patch.
That was only possible by implementing the structure of φ constraints
as in the paper, namely the semantics of φ constructor constraints.

This has a number of benefits:

  a. Proper handling of unlifted types and strict fields, fixing #18249,
     without any code duplication between
     `GHC.HsToCore.PmCheck.Oracle.instCon` (was `mkOneConFull`) and
     `GHC.HsToCore.PmCheck.checkGrd`.
  b. `instCon` can perform the `nonVoid` test (3) simply by emitting
     unliftedness constraints for strict fields.
  c. `nonVoid` (3) is thus simply expressed by a call to
     `inhabitationTest`.
  d. Similarly, `ensureAllInhabited` (2), which we called after adding
     type info, now can similarly be expressed as the fuel-based
     `inhabitationTest`.

See the new `Note [Why inhabitationTest doesn't call generateInhabitants]`
why we still have to stick to "test" (1).

Fixes #18249.

- - - - -


30 changed files:

- .gitlab-ci.yml
- compiler/GHC/Core/Opt/Specialise.hs
- compiler/GHC/Core/Predicate.hs
- compiler/GHC/Core/TyCon.hs
- compiler/GHC/Hs/Decls.hs
- compiler/GHC/Hs/Expr.hs
- compiler/GHC/Hs/Extension.hs
- compiler/GHC/Hs/Instances.hs
- compiler/GHC/HsToCore/Docs.hs
- compiler/GHC/HsToCore/PmCheck.hs
- compiler/GHC/HsToCore/PmCheck/Oracle.hs
- compiler/GHC/HsToCore/PmCheck/Ppr.hs
- compiler/GHC/HsToCore/PmCheck/Types.hs
- compiler/GHC/HsToCore/PmCheck/Types.hs-boot
- compiler/GHC/HsToCore/Quote.hs
- compiler/GHC/Iface/Ext/Ast.hs
- compiler/GHC/Parser.y
- compiler/GHC/Parser/PostProcess/Haddock.hs
- compiler/GHC/Rename/Module.hs
- compiler/GHC/Tc/Deriv.hs
- compiler/GHC/Tc/Gen/Expr.hs
- compiler/GHC/Tc/Instance/Class.hs
- compiler/GHC/Tc/Module.hs
- compiler/GHC/Tc/Solver.hs
- compiler/GHC/Tc/Solver/Canonical.hs
- compiler/GHC/Tc/Solver/Interact.hs
- compiler/GHC/Tc/Solver/Monad.hs
- compiler/GHC/Tc/TyCl/Instance.hs
- compiler/GHC/Tc/Utils/TcType.hs
- compiler/GHC/ThToHs.hs


The diff was not included because it is too large.


View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/d032abb1cfe11f4067397606269847a36c3711e3...314ef1aa6acc7795b79aa760bf8d8ab745993ac3

-- 
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/d032abb1cfe11f4067397606269847a36c3711e3...314ef1aa6acc7795b79aa760bf8d8ab745993ac3
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/20200916/48ccef8c/attachment.html>


More information about the ghc-commits mailing list