[Git][ghc/ghc][wip/az/exactprint] 32 commits: Remove the list of loaded modules from the ghci prompt

Alan Zimmerman gitlab at gitlab.haskell.org
Sun Sep 27 16:35:11 UTC 2020



Alan Zimmerman pushed to branch wip/az/exactprint at Glasgow Haskell Compiler / GHC


Commits:
086ef018 by Hécate at 2020-09-23T06:52:08-04:00
Remove the list of loaded modules from the ghci prompt

- - - - -
d7385f70 by Ben Gamari at 2020-09-23T06:52:44-04:00
Bump submodules

* Bump bytestring to 0.10.12.0
* Bump Cabal to 3.4.0.0-rc3
* Bump Win32 to 2.10.0.0

- - - - -
667d6355 by Sylvain Henry at 2020-09-23T20:43:48-04:00
Refactor CLabel pretty-printing

* Don't depend on the selected backend to know if we print Asm or C
  labels: we already have PprStyle to determine this. Moreover even when
  a native backend is used (NCG, LLVM) we may want to C headers
  containing pretty-printed labels, so it wasn't a good predicate
  anyway.

* Make pretty-printing code clearer and avoid partiality

- - - - -
a584366b by Sylvain Henry at 2020-09-23T20:43:48-04:00
Remove sdocWithDynFlags (fix #10143)

- - - - -
a997fa01 by Sylvain Henry at 2020-09-23T20:43:48-04:00
Preliminary work towards removing DynFlags -> Driver.Ppr dependency

- - - - -
31fea307 by Hécate at 2020-09-23T20:44:24-04:00
Remove redundant "do", "return" and language extensions from base

- - - - -
04d64331 by syd at cs-syd.eu at 2020-09-24T13:15:54-04:00
Update Lock.hs with more documentation to make sure that the Boolean return value is clear.

[skip ci]

- - - - -
97cff919 by Simon Peyton Jones at 2020-09-24T13:16:32-04:00
Implement Quick Look impredicativity

This patch implements Quick Look impredicativity (#18126), sticking
very closely to the design in
    A quick look at impredicativity, Serrano et al, ICFP 2020

The main change is that a big chunk of GHC.Tc.Gen.Expr has been
extracted to two new modules
    GHC.Tc.Gen.App
    GHC.Tc.Gen.Head
which deal with typechecking n-ary applications, and the head of
such applications, respectively.  Both contain a good deal of
documentation.

Three other loosely-related changes are in this patch:

* I implemented (partly by accident) points (2,3)) of the accepted GHC
  proposal "Clean up printing of foralls", namely
  https://github.com/ghc-proposals/ghc-proposals/blob/
        master/proposals/0179-printing-foralls.rst
  (see #16320).

  In particular, see Note [TcRnExprMode] in GHC.Tc.Module
  - :type instantiates /inferred/, but not /specified/, quantifiers
  - :type +d instantiates /all/ quantifiers
  - :type +v is killed off

  That completes the implementation of the proposal,
  since point (1) was done in
    commit df08468113ab46832b7ac0a7311b608d1b418c4d
    Author: Krzysztof Gogolewski <krzysztof.gogolewski at tweag.io>
    Date:   Mon Feb 3 21:17:11 2020 +0100
    Always display inferred variables using braces

* HsRecFld (which the renamer introduces for record field selectors),
  is now preserved by the typechecker, rather than being rewritten
  back to HsVar.  This is more uniform, and turned out to be more
  convenient in the new scheme of things.

* The GHCi debugger uses a non-standard unification that allows the
  unification variables to unify with polytypes.  We used to hack
  this by using ImpredicativeTypes, but that doesn't work anymore
  so I introduces RuntimeUnkTv.  See Note [RuntimeUnkTv] in
  GHC.Runtime.Heap.Inspect

Updates haddock submodule.

WARNING: this patch won't validate on its own.  It was too
hard to fully disentangle it from the following patch, on
type errors and kind generalisation.

Changes to tests

* Fixes #9730 (test added)

* Fixes #7026 (test added)

* Fixes most of #8808, except function `g2'` which uses a
  section (which doesn't play with QL yet -- see #18126)
  Test added

* Fixes #1330. NB Church1.hs subsumes Church2.hs, which is now deleted

* Fixes #17332 (test added)

* Fixes #4295

* This patch makes typecheck/should_run/T7861 fail.
  But that turns out to be a pre-existing bug: #18467.
  So I have just made T7861 into expect_broken(18467)

- - - - -
9fa26aa1 by Simon Peyton Jones at 2020-09-24T13:16:32-04:00
Improve kind generalisation, error messages

This patch does two things:

* It refactors GHC.Tc.Errors a bit.  In debugging Quick Look I was
  forced to look in detail at error messages, and ended up doing a bit
  of refactoring, esp in mkTyVarEqErr'.  It's still quite a mess, but
  a bit better, I think.

* It makes a significant improvement to the kind checking of type and
  class declarations. Specifically, we now ensure that if kind
  checking fails with an unsolved constraint, all the skolems are in
  scope.  That wasn't the case before, which led to some obscure error
  messages; and occasional failures with "no skolem info" (eg #16245).

Both of these, and the main Quick Look patch itself, affect a /lot/ of
error messages, as you can see from the number of files changed.  I've
checked them all; I think they are as good or better than before.

Smaller things

* I documented the various instances of VarBndr better.
  See Note [The VarBndr tyep and its uses] in GHC.Types.Var

* Renamed GHC.Tc.Solver.simpl_top to simplifyTopWanteds

* A bit of refactoring in bindExplicitTKTele, to avoid the
  footwork with Either.  Simpler now.

* Move promoteTyVar from GHC.Tc.Solver to GHC.Tc.Utils.TcMType

Fixes #16245 (comment 211369), memorialised as
  typecheck/polykinds/T16245a
Also fixes the three bugs in #18640

- - - - -
6d0ce0eb by Sebastian Graf at 2020-09-24T13:17:07-04:00
PmCheck: Desugar string literal patterns with -XRebindableSyntax correctly (#18708)

Fixes #18708.

- - - - -
007940d2 by Hécate at 2020-09-24T13:17:44-04:00
Namespace the Hadrian linting rule for base

- - - - -
5b727189 by Andreas Klebinger at 2020-09-25T21:10:20-04:00
Make sizeExpr strict in the size threshold to facilitate WW.

- - - - -
dd664031 by Ben Gamari at 2020-09-25T21:10:56-04:00
ci.sh: Factor out common utilities

- - - - -
5b78e865 by Ben Gamari at 2020-09-25T21:10:56-04:00
ci: Add ad-hoc performance testing rule

- - - - -
29885f07 by Zubin Duggal at 2020-09-25T21:11:32-04:00
Stop removing definitions of record fields in GHC.Iface.Ext.Ast

- - - - -
0d6519d9 by Ben Gamari at 2020-09-25T21:12:08-04:00
gitlab-ci: Drop Darwin cleanup job

We now have a proper periodic clean-up script installed on the runners.

- - - - -
277d20af by Sebastian Graf at 2020-09-25T21:12:44-04:00
Add regression tests for #18371

They have been fixed by !3959, I believe.
Fixes #18371.

- - - - -
8edf6056 by Sebastian Graf at 2020-09-25T21:12:44-04:00
Add a regression test for #18609

The egregious performance hits are gone since !4050.
So we fix #18609.

- - - - -
4a1b89a4 by Sebastian Graf at 2020-09-25T21:12:44-04:00
Accept new test output for #17218

The expected test output was plain wrong.
It has been fixed for a long time.
Thus we can close #17218.

- - - - -
51606236 by Sven Tennie at 2020-09-25T21:13:19-04:00
Print RET_BIG stack closures

A RET_BIG closure has a large bitmap that describes it's payload and can
be printed with printLargeBitmap().

Additionally, the output for payload closures of small and big bitmaps is
changed: printObj() is used to print a bit more information about what's
on the stack.

- - - - -
2707c4ea by Arnaud Spiwack at 2020-09-25T21:13:58-04:00
Pattern guards BindStmt always use multiplicity Many

Fixes #18439 .

The rhs of the pattern guard was consumed with multiplicity one, while
the pattern assumed it was Many. We use Many everywhere instead.

This is behaviour consistent with that of `case` expression. See #18738.

- - - - -
92daad24 by Sylvain Henry at 2020-09-25T21:14:36-04:00
Bignum: refactor backend modules

* move backends into GHC.Num.Backend.*
* split backend selection into GHC.Num.Backend and
  GHC.Num.Backend.Selected to avoid duplication with the Check backend

- - - - -
04bc50b3 by Sylvain Henry at 2020-09-25T21:14:36-04:00
Bignum: implement extended GCD (#18427)

- - - - -
6a7dae4b by Krzysztof Gogolewski at 2020-09-25T21:15:14-04:00
Fix typed holes causing linearity errors (#18491)

- - - - -
83407ffc by Krzysztof Gogolewski at 2020-09-25T21:15:53-04:00
Various documentation fixes

* Remove UnliftedFFITypes from conf. Some time ago, this extension
  was undocumented and we had to silence a warning.
  This is no longer needed.
* Use r'' in conf.py. This fixes a Sphinx warning:
  WARNING: Support for evaluating Python 2 syntax is deprecated and will be removed in Sphinx 4.0. Convert docs/users_guide/conf.py to Python 3 syntax.
* Mark GHCForeignImportPrim as documented
* Fix formatting in template_haskell.rst
* Remove 'recursive do' from the list of unsupported items in TH

- - - - -
af1e84e7 by Sebastian Graf at 2020-09-26T05:36:46-04:00
PmCheck: Big refactor of module structure

  * Move everything from `GHC.HsToCore.PmCheck.*` to
    `GHC.HsToCore.Pmc.*` in analogy to `GHC.Tc`, rename exported
    `covCheck*` functions to `pmc*`
  * Rename `Pmc.Oracle` to `Pmc.Solver`
  * Split off the LYG desugaring and checking steps into their own
    modules (`Pmc.Desugar` and `Pmc.Check` respectively)
  * Split off a `Pmc.Utils` module with stuff shared by
    `Pmc.{,Desugar,Check,Solver}`
  * Move `Pmc.Types` to `Pmc.Solver.Types`, add a new `Pmc.Types` module
    with all the LYG types, which form the interfaces between
    `Pmc.{Desugar,Check,Solver,}`.

- - - - -
f08f98e8 by Sebastian Graf at 2020-09-26T05:36:46-04:00
Extract SharedIdEnv into its own module

It's now named `GHC.Types.Unique.SDFM.UniqSDFM`.
The implementation is more clear about its stated goals and supported
operations.

- - - - -
1cde295c by Sylvain Henry at 2020-09-26T05:37:23-04:00
Bignum: add bigNatFromWordArray

Reimplementation of integer-gmp's byteArrayToBigNat#

- - - - -
bda55fa0 by Krzysztof Gogolewski at 2020-09-26T13:18:22-04:00
Make 'undefined x' linear in 'x' (#18731)

- - - - -
160fba4a by Krzysztof Gogolewski at 2020-09-26T13:19:00-04:00
Disallow linear types in FFI (#18472)

- - - - -
e124f2a7 by Krzysztof Gogolewski at 2020-09-26T13:19:36-04:00
Fix handling of function coercions (#18747)

This was broken when we added multiplicity to the function type.

- - - - -
692a79ae by Alan Zimmerman at 2020-09-27T17:06:26+01:00
Proof of Concept implementation of in-tree API Annotations

This MR introduces a possible machinery to introduce API Annotations
into the TTG extension points.

It is intended to be a concrete example for discussion.

It still needs to process comments.

----

Work in progress, adding more TTG extensions for annotations.

And fixing ppr round-trip tests by being able to blank out in-tree
annotations, as done with SrcSpans.

This is needed for the case of

  class Foo a where

for which current ppr does not print the "where".

Rename AA to AddApiAnn and AA to AddAnn

Add XConPatIn and XConPatOut

Rebase

----

First pass at bringing in LocatedA for API anns in locations

Treatment of ECP in parsing is provisional at this stage, leads to some
horribly stuff in Parser.y and RdrHsSyn.

It is an extensive but not invasive change. I think (AZ).

Locally it reports some parsing tests using less memory.

Add ApiAnns to the HsExpr data structure.

rebase.

Change HsMatchContext and HsStmtContext to use an id, not a GhcPass
parameter.

Add ApiAnns to Hs/Types

Rebase

Rebased 2020-03-25

WIP on in-tree annotations

Includes updating HsModule

Imports

LocateA ImportDecl so we can hang AnnSemi off it

A whole bunch of stuff more

InjectivityAnn and FamEqn now have annotations in them

Add annotations to context srcspan

----

In-tree annotations: LHsDecl and LHsBind LocatedA

----

WIP on in-tree annotations

----

in-tree annotations: LHsType is now LocatedA

----

FunDeps is now also a HS data type

----

WIP.  Added LocatedA to Pat, Expr, Decl

And worked some more through Parser.y

----

LStmt now Located

----

Finished working through Parser.y, tests seem ok

failures relate to annotations.

Adding test infrastructure for check-exact

Like check-ppr, but checking for an exact reproduction of the parsed
source file.

Starting to work on actual exact printer

Bring in ApiAnnName

As an alternative for LocatedA, to be used for names only.

Carrying extra name adornments, such as locations of backticks,
parens, etc.

Working on changing ApiAnnName to accurately reflect actual usage

Get rid of AnnApiName in favour of LocatedN

Working on check-exact. Making progress

Working on the ghc-exact bit

Progress, can reproduce the first Test.hs file.

Move API Annotations out of the extensions to annotations

Remove LHsLocalBinds

Fix up after rebasing to bring in XRec

Main thing is to make

    type instance XRec (GhcPass p) a = GenLocated (Anno a) a

    type family Anno a = b

But this has massive implications.

- - - - -


25 changed files:

- .gitlab-ci.yml
- .gitlab/ci.sh
- + .gitlab/common.sh
- compiler/GHC.hs
- compiler/GHC/Cmm/CLabel.hs
- compiler/GHC/CmmToAsm.hs
- compiler/GHC/CmmToAsm/Dwarf/Types.hs
- compiler/GHC/CmmToAsm/PIC.hs
- compiler/GHC/CmmToC.hs
- compiler/GHC/CmmToLlvm/Base.hs
- compiler/GHC/CmmToLlvm/CodeGen.hs
- compiler/GHC/Core/Coercion.hs
- compiler/GHC/Core/TyCon.hs
- compiler/GHC/Core/Unfold.hs
- compiler/GHC/Data/BooleanFormula.hs
- compiler/GHC/Data/OrdList.hs
- compiler/GHC/Driver/Backpack.hs
- compiler/GHC/Driver/Main.hs
- compiler/GHC/Driver/Session.hs
- compiler/GHC/Driver/Types.hs
- compiler/GHC/Hs.hs
- compiler/GHC/Hs/Binds.hs
- compiler/GHC/Hs/Decls.hs
- compiler/GHC/Hs/Dump.hs
- + compiler/GHC/Hs/Exact.hs


The diff was not included because it is too large.


View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/6bd2b8c9ec28602a2309b8077500922f18b5dabb...692a79ae262907202dfcfe64d328833211e68151

-- 
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/6bd2b8c9ec28602a2309b8077500922f18b5dabb...692a79ae262907202dfcfe64d328833211e68151
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/20200927/f86e681f/attachment-0001.html>


More information about the ghc-commits mailing list