[Git][ghc/ghc][wip/az/locateda-epa-improve-2023-03-27] 60 commits: Substitute free variables captured by breakpoints in SpecConstr

Alan Zimmerman (@alanz) gitlab at gitlab.haskell.org
Tue Jul 11 22:39:44 UTC 2023



Alan Zimmerman pushed to branch wip/az/locateda-epa-improve-2023-03-27 at Glasgow Haskell Compiler / GHC


Commits:
40f4ef7c by Torsten Schmits at 2023-07-05T18:06:19-04:00
Substitute free variables captured by breakpoints in SpecConstr

Fixes #23267

- - - - -
2b55cb5f by sheaf at 2023-07-05T18:07:07-04:00
Reinstate untouchable variable error messages

This extra bit of information was accidentally being discarded after
a refactoring of the way we reported problems when unifying a type
variable with another type. This patch rectifies that.

- - - - -
53ed21c5 by Rodrigo Mesquita at 2023-07-05T18:07:47-04:00
configure: Drop Clang command from settings

Due to 01542cb7227614a93508b97ecad5b16dddeb6486 we no longer use the
`runClang` function, and no longer need to configure into settings the
Clang command. We used to determine options at runtime to pass clang when
it was used as an assembler, but now that we configure at configure time
we no longer need to.

- - - - -
6fdcf969 by Torsten Schmits at 2023-07-06T12:12:09-04:00
Filter out nontrivial substituted expressions in substTickish

Fixes #23272

- - - - -
41968fd6 by Sylvain Henry at 2023-07-06T12:13:02-04:00
JS: testsuite: use req_c predicate instead of js_broken

- - - - -
74a4dd2e by Sylvain Henry at 2023-07-06T12:13:02-04:00
JS: implement some file primitives (lstat,rmdir) (#22374)

- Implement lstat and rmdir.
- Implement base_c_s_is* functions (testing a file type)
- Enable passing tests

- - - - -
7e759914 by Sylvain Henry at 2023-07-07T02:39:38-04:00
JS: cleanup utils (#23314)

- Removed unused code
- Don't export unused functions
- Move toTypeList to Closure module

- - - - -
f617655c by Sylvain Henry at 2023-07-07T02:39:38-04:00
JS: rename VarType/Vt into JSRep

- - - - -
19216ca5 by Sylvain Henry at 2023-07-07T02:39:38-04:00
JS: remove custom PrimRep conversion (#23314)

We use the usual conversion to PrimRep and then we convert these
PrimReps to JSReps.

- - - - -
d3de8668 by Sylvain Henry at 2023-07-07T02:39:38-04:00
JS: don't use isRuntimeRepKindedTy in JS FFI

- - - - -
8d1b75cb by Matthew Pickering at 2023-07-07T02:40:15-04:00
ghcup-metadata: Also updates ghcup-nightlies-0.0.7.yaml file

Fixes #23600

- - - - -
e524fa7f by Matthew Pickering at 2023-07-07T02:40:15-04:00
ghcup-metadata: Use dynamically linked alpine bindists

In theory these will work much better on alpine to allow people to build
statically linked applications there. We don't need to distribute a
statically linked application ourselves in order to allow that.

Fixes #23602

- - - - -
b9e7beb9 by Ben Gamari at 2023-07-07T11:32:22-04:00
Drop circle-ci-job.sh

- - - - -
9955eead by Ben Gamari at 2023-07-07T11:32:22-04:00
testsuite: Allow preservation of unexpected output

Here we introduce a new flag to the testsuite driver,
--unexpected-output-dir=<dir>, which allows the user to ask
the driver to preserve unexpected output from tests. The intent is for
this to be used in CI to allow users to more easily fix unexpected
platform-dependent output.

- - - - -
48f80968 by Ben Gamari at 2023-07-07T11:32:22-04:00
gitlab-ci: Preserve unexpected output

Here we enable use of the testsuite driver's `--unexpected-output-dir`
flag by CI, preserving the result as an artifact for use by users.

- - - - -
76983a0d by Matthew Pickering at 2023-07-07T11:32:58-04:00
driver: Fix -S with .cmm files

There was an oversight in the driver which assumed that you would always
produce a `.o` file when compiling a .cmm file.

Fixes #23610

- - - - -
6df15e93 by Mike Pilgrem at 2023-07-07T11:33:40-04:00
Update Hadrian's stack.yaml
- - - - -
1dff43cf by Ben Gamari at 2023-07-08T05:05:37-04:00
compiler: Rework ShowSome

Previously the field used to filter the sub-declarations to show
was rather ad-hoc and was only able to show at most one sub-declaration.

- - - - -
8165404b by Ben Gamari at 2023-07-08T05:05:37-04:00
testsuite: Add test to catch changes in core libraries

This adds testing infrastructure to ensure that changes in core
libraries (e.g. `base` and `ghc-prim`) are caught in CI.

- - - - -
ec1c32e2 by Melanie Phoenix at 2023-07-08T05:06:14-04:00
Deprecate Data.List.NonEmpty.unzip

- - - - -
5d2442b8 by Ben Gamari at 2023-07-08T05:06:51-04:00
Drop latent mentions of -split-objs

Closes #21134.

- - - - -
a9bc20cb by Oleg Grenrus at 2023-07-08T05:07:31-04:00
Add warn_and_run test kind

This is a compile_and_run variant which also captures the GHC's
stderr. The warn_and_run name is best I can come up with,
as compile_and_run is taken.

This is useful specifically for testing warnings.  We want to test that
when warning triggers, and it's not a false positive, i.e. that the
runtime behaviour is indeed "incorrect".

As an example a single test is altered to use warn_and_run

- - - - -
c7026962 by Ben Gamari at 2023-07-08T05:08:11-04:00
configure: Don't use ld.gold on i386

ld.gold appears to produce invalid static constructor tables on i386.
While ideally we would add an autoconf check to check for this
brokenness, sadly such a check isn't easy to compose. Instead to
summarily reject such linkers on i386.

Somewhat hackily closes #23579.

- - - - -
054261dd by Bodigrim at 2023-07-08T19:32:47-04:00
Add since annotations for Data.Foldable1

- - - - -
550af505 by Sylvain Henry at 2023-07-08T19:33:28-04:00
JS: support -this-unit-id for programs in the linker (#23613)

- - - - -
d284470a by Bodigrim at 2023-07-08T19:34:08-04:00
Bump text submodule

- - - - -
8e11630e by jade at 2023-07-10T16:58:40-04:00
Add a hint to enable ExplicitNamespaces for type operator imports (Fixes/Enhances #20007)

As suggested in #20007 and implemented in !8895, trying to import type operators
will suggest a fix to use the 'type' keyword, without considering whether
ExplicitNamespaces is enabled. This patch will query whether ExplicitNamespaces
is enabled and add a hint to suggest enabling ExplicitNamespaces if it isn't enabled,
alongside the suggestion of adding the 'type' keyword.

- - - - -
61b1932e by sheaf at 2023-07-10T16:59:26-04:00
tyThingLocalGREs: include all DataCons for RecFlds

The GREInfo for a record field should include the collection of all
the data constructors of the parent TyCon that have this record field.
This information was being incorrectly computed in the tyThingLocalGREs
function for a DataCon, as we were not taking into account other
DataCons with the same parent TyCon.

Fixes #23546

- - - - -
e6627cbd by Alan Zimmerman at 2023-07-10T17:00:05-04:00
EPA: Simplify GHC/Parser.y comb3

A follow up to !10743

- - - - -
ee20da34 by Bodigrim at 2023-07-10T17:01:01-04:00
Document that compareByteArrays# is available since ghc-prim-0.5.2.0

- - - - -
4926af7b by Matthew Pickering at 2023-07-10T17:01:38-04:00
Revert "Bump text submodule"

This reverts commit d284470a77042e6bc17bdb0ab0d740011196958a.

This commit requires that we bootstrap with ghc-9.4, which we do not
require until #23195 has been completed.

Subsequently this has broken nighty jobs such as the rocky8 job which in
turn has broken nightly releases.

- - - - -
c87df532 by Alan Zimmerman at 2023-07-10T22:54:58+01:00
EPA: Simplify GHC/Parser.y sLL

Follow up to !10743

- - - - -
c0594578 by Alan Zimmerman at 2023-07-11T18:00:29+01:00
EPA: Store leading AnnSemi for decllist in al_rest

This simplifies the markAnnListA implementation in ExactPrint

- - - - -
cc634fd6 by Alan Zimmerman at 2023-07-11T18:01:42+01:00
EPA: Improve annotation management in getMonoBind

Ensure the LHsDecl for a FunBind has the correct leading comments and
trailing annotations.

See the added note for details.

- - - - -
7788a6ec by Alan Zimmerman at 2023-07-11T18:04:24+01:00
EPA: Simplify GHC/Parser.y comb2

Use the HasLoc instance from Ast.hs to allow comb2 to work with
anything with a SrcSpan

This gets rid of the custom comb2A, comb2Al, comb2N functions, and
removes various reLoc calls.

- - - - -
a2c5076d by Alan Zimmerman at 2023-07-11T18:04:24+01:00
Put BufSpan into RealSrcSpan

This has been superseded by !9473, which moved BufSpan into EpaSpan in
EpaLocation

Start on making LocatedN more direct

Using EpaLocation instead of Anchor

Via a synonym initially, to prove the concept

Variants of AnnSortKey

For future, just a list of which type comes next.
Example for ValBinds

EPA: Explicitly capture EOF Location in AnnsModule

And also get rid of EpaEofComment.

- - - - -
c5cefaee by Alan Zimmerman at 2023-07-11T18:04:24+01:00
[EPA] Simplify noAnnSrcSpanDP0

- - - - -
9d479f88 by Alan Zimmerman at 2023-07-11T18:04:24+01:00
EPA: Provide correct annotation span for ImportDecl

Use the whole declaration, rather than just the span of the 'import'
keyword.

- - - - -
bf739df2 by Alan Zimmerman at 2023-07-11T18:04:24+01:00
EPA: Fix span for GRHS

- - - - -
2ce7de1a by Alan Zimmerman at 2023-07-11T18:04:24+01:00
EPA: Fix span for Located Context

- - - - -
4d58fc83 by Alan Zimmerman at 2023-07-11T18:04:25+01:00
EPA: Widen anchor when adding a trailingAnn

- - - - -
54d87f3a by Alan Zimmerman at 2023-07-11T18:04:25+01:00
EPA: widen more TrailingAnn usages

- - - - -
331be587 by Alan Zimmerman at 2023-07-11T18:04:25+01:00
EPA: Capture full range for a CaseAlt Match

- - - - -
4ddbd0f1 by Alan Zimmerman at 2023-07-11T18:04:25+01:00
Clean up addTrailingCommaN

Remove unused parameter

- - - - -
7507650c by Alan Zimmerman at 2023-07-11T18:04:25+01:00
WIP

- - - - -
07cd2074 by Alan Zimmerman at 2023-07-11T18:04:25+01:00
Fixup after rebase

- - - - -
f62f4ad7 by Alan Zimmerman at 2023-07-11T18:04:25+01:00
[EPA] Introduce HasTrailing in ExactPrint

Just plumbed through, not being used yet

- - - - -
d50ed87f by Alan Zimmerman at 2023-07-11T18:04:25+01:00
EPA use [TrailingAnn] in enterAnn

And remove it from ExactPrint (LocatedN RdrName)

- - - - -
767536c2 by Alan Zimmerman at 2023-07-11T18:04:25+01:00
EPA Use full range for Anchor, and do not widen for [TrailingAnn]

- - - - -
8bd5504d by Alan Zimmerman at 2023-07-11T18:04:25+01:00
EPA: Move TrailingAnns from last match to FunBind

- - - - -
ff93c748 by Alan Zimmerman at 2023-07-11T18:04:25+01:00
EPA: In HsDo, put TrailingAnns at top of LastStmt

- - - - -
c432776f by Alan Zimmerman at 2023-07-11T18:04:25+01:00
EPA: More extending anchors to full span in Parser.y

- - - - -
63416654 by Alan Zimmerman at 2023-07-11T18:04:25+01:00
EPA: Move TrailingAnns to the top of FieldOcc

- - - - -
3fae44a1 by Alan Zimmerman at 2023-07-11T18:04:25+01:00
EPA: Fix simple tests

- - - - -
6de3c020 by Alan Zimmerman at 2023-07-11T18:04:25+01:00
EPA: do not convert comments to deltas when balancing.

It seems its not needed with the new approach

- - - - -
f3208adc by Alan Zimmerman at 2023-07-11T18:04:25+01:00
EPA: Improve annotation management in getMonoBind

Ensure the LHsDecl for a FunBind has the correct leading comments and
trailing annotations.

See the added note for details.

- - - - -
9f5f6150 by Alan Zimmerman at 2023-07-11T18:04:25+01:00
EPA: deal with fallout from getMonoBind

- - - - -
862e778b by Alan Zimmerman at 2023-07-11T20:46:09+01:00
EPA fix captureLineSpacing

- - - - -
27a2d829 by Alan Zimmerman at 2023-07-11T23:38:48+01:00
EPA print any comments in the span before exiting it

- - - - -
cb34b526 by Alan Zimmerman at 2023-07-11T23:39:17+01:00
EPA: getting rid of tweakDelta

WIP at present

- - - - -


30 changed files:

- .gitlab-ci.yml
- .gitlab/ci.sh
- − .gitlab/circle-ci-job.sh
- .gitlab/generate-ci/gen_ci.hs
- .gitlab/jobs.yaml
- compiler/GHC/Builtin/primops.txt.pp
- compiler/GHC/Core.hs
- compiler/GHC/Core/Opt/Simplify/Iteration.hs
- compiler/GHC/Core/Opt/SpecConstr.hs
- compiler/GHC/Core/Subst.hs
- compiler/GHC/Data/Bag.hs
- compiler/GHC/Data/BooleanFormula.hs
- compiler/GHC/Driver/Main.hs
- compiler/GHC/Driver/Pipeline.hs
- compiler/GHC/Driver/Session.hs
- compiler/GHC/Hs/Binds.hs
- compiler/GHC/Hs/Decls.hs
- compiler/GHC/Hs/Dump.hs
- compiler/GHC/Hs/Expr.hs
- compiler/GHC/Hs/Extension.hs
- compiler/GHC/Hs/Pat.hs
- compiler/GHC/Hs/Type.hs
- compiler/GHC/Hs/Utils.hs
- compiler/GHC/HsToCore/Arrows.hs
- compiler/GHC/HsToCore/Docs.hs
- compiler/GHC/HsToCore/Expr.hs
- compiler/GHC/HsToCore/Foreign/JavaScript.hs
- compiler/GHC/HsToCore/Match/Constructor.hs
- compiler/GHC/HsToCore/Match/Literal.hs
- compiler/GHC/HsToCore/Monad.hs


The diff was not included because it is too large.


View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/a4643c3ce3f081311ec128a04278344c0fcc6809...cb34b5264fc8f990dc449a1bf468cf8699ef2975

-- 
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/a4643c3ce3f081311ec128a04278344c0fcc6809...cb34b5264fc8f990dc449a1bf468cf8699ef2975
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/20230711/3ccd03f4/attachment-0001.html>


More information about the ghc-commits mailing list