[Git][ghc/ghc][wip/az/locateda-epa-improve-2023-07-15] 36 commits: EPA Some tweaks to annotations

Alan Zimmerman (@alanz) gitlab at gitlab.haskell.org
Tue Oct 10 17:41:08 UTC 2023



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


Commits:
e93b3ade by Alan Zimmerman at 2023-10-03T17:59:49+01:00
EPA Some tweaks to annotations

- Fix span for GRHS
- Move TrailingAnns from last match to FunBind
- Fix GADT where clause span
- Capture full range for a CaseAlt Match

info: patch template saved to `-`

- - - - -
173a1ed1 by Alan Zimmerman at 2023-10-03T19:48:46+01:00
EPA Use full range for Anchor, and do not widen for [TrailingAnn]

Known failures at the end of this
  Ppr023
  Ppr034
  TestBoolFormula

Fixed in subsequent commits

- - - - -
43aebc56 by Alan Zimmerman at 2023-10-03T19:48:46+01:00
EPA: Use the current Anchor end as prior end

Use the original anchor location end as the source of truth for
calculating print deltas.

This allows original spacing to apply in most cases, only changed AST
items need initial delta positions.

[2023-08-14 Mon]
121 unexpected failures

- - - - -
eb98101f by Alan Zimmerman at 2023-10-03T19:48:46+01:00
EPA: Add DArrow to TrailingAnn

- - - - -
106c588d by Alan Zimmerman at 2023-10-03T19:48:46+01:00
[EPA] Introduce HasTrailing in ExactPrint

29 Failing tests by 4600 processed

info: patch template saved to `-`

- - - - -
e553183f by Alan Zimmerman at 2023-10-03T19:48:46+01:00
EPA use [TrailingAnn] in enterAnn

And remove it from ExactPrint (LocatedN RdrName)

- - - - -
e88c53da by Alan Zimmerman at 2023-10-03T19:48:46+01:00
Summary: Patch:  epa-in-hsdo-put-trailinganns
Author: Alan Zimmerman <alan.zimm at gmail.com>
Date:   2023-07-03 22:33:49 +0100

EPA: In HsDo, put TrailingAnns at top of LastStmt

Failures
5300 of 9700 [0, 103, 0]

- - - - -
244d6c54 by Alan Zimmerman at 2023-10-03T19:48:46+01:00
EPA: do not convert comments to deltas when balancing.

It seems its not needed with the new approach

[2023-08-15 Tue]
104 unexpected failures

- - - - -
2f48e12a by Alan Zimmerman at 2023-10-03T19:48:46+01:00
EPA: deal with fallout from getMonoBind

- - - - -
fd4c0093 by Alan Zimmerman at 2023-10-03T19:48:46+01:00
EPA fix captureLineSpacing

- - - - -
b2410c51 by Alan Zimmerman at 2023-10-03T19:48:46+01:00
EPA print any comments in the span before exiting it

- - - - -
4e62ec08 by Alan Zimmerman at 2023-10-03T19:48:46+01:00
EPA: getting rid of tweakDelta

WIP at present

- - - - -
b0aa41c9 by Alan Zimmerman at 2023-10-03T19:48:46+01:00
EPA: tweaks to ExactPrint

- - - - -
b9f701fa by Alan Zimmerman at 2023-10-03T19:48:46+01:00
EPA: Fix warnings in check-exact

- - - - -
958d229a by Alan Zimmerman at 2023-10-03T19:48:46+01:00
EPA: Add comments to AnchorOperation

6000 of 9700 [0, 14, 0]
Failures seem to be mainly in transform tests

- - - - -
e8e72908 by Alan Zimmerman at 2023-10-03T19:48:46+01:00
EPA: remove AnnEofComment

It is no longer used

At this point just failures
  HsDocTy

[2023-08-31 Thu]
And no warnings in check-exact

- - - - -
6d6b7542 by Alan Zimmerman at 2023-10-03T19:48:46+01:00
EPA: make locA a function, not a field name

- - - - -
0c222121 by Alan Zimmerman at 2023-10-03T19:48:46+01:00
EPA: generalise reLoc

[2023-10-01 Sun]
Failures
   HsDocTy

- - - - -
039fcc5c by Alan Zimmerman at 2023-10-03T19:48:46+01:00
EPA: get rid of l2l and friends

- - - - -
ae0b9ebd by Alan Zimmerman at 2023-10-03T19:48:46+01:00
EPA: get rid of l2l and friends

- - - - -
55d420aa by Alan Zimmerman at 2023-10-03T19:48:46+01:00
EPA: harmonise acsa and acsA

[2023-10-01 Sun]
Failing tests
  HsDocTy

- - - - -
94b6c439 by Alan Zimmerman at 2023-10-03T19:48:46+01:00
EPA: Replace Anchor with EpaLocation

[2023-09-21 Thu]
Only test failing is
   HsDocTy

- - - - -
19f57cd0 by Alan Zimmerman at 2023-10-03T19:48:46+01:00
EPA: get rid of AnchorOperation

[2023-09-21 Thu]
Only error is
  HsDocTy

- - - - -
81c8d0e1 by Alan Zimmerman at 2023-10-03T19:48:46+01:00
EPA: splitLHsForAllTyInvis no ann returned

- - - - -
c68d5384 by Alan Zimmerman at 2023-10-03T19:48:46+01:00
EPA: Replace Monoid with NoAnn

[2023-08-19 Sat]
AddClassMethod fails

- - - - -
4b6c4554 by Alan Zimmerman at 2023-10-03T19:48:46+01:00
EPA: Use SrcSpan in EpaSpan

[2023-09-04 Mon]
No errors or warnings in check-exact

[2023-09-21 Thu]
Test failures
   HsDocTy

- - - - -
83295f93 by Alan Zimmerman at 2023-10-03T19:48:46+01:00
EPA: Present no longer has annotation

- - - - -
c9756b55 by Alan Zimmerman at 2023-10-03T19:48:46+01:00
EPA: empty tup_tail has no ann

Parser.y: tup_tail rule was
          | {- empty -} %shift   { return [Left noAnn] }

This means we add an extra Missing constructor if the last item was a comma.

Change the annotation type to a Bool to indicate this, and use the
EpAnn Anchor for the print location for the others.

- - - - -
aa93f36a by Alan Zimmerman at 2023-10-03T19:48:46+01:00
EPA: Remove parenthesizeHsType

- - - - -
69ec0cd0 by Alan Zimmerman at 2023-10-03T19:48:46+01:00
EPA: Remove EpAnnNotUsed

[2023-10-01 Sun]
Failures
  HsDocTy
  T15242

- - - - -
79a8289a by Alan Zimmerman at 2023-10-03T19:48:46+01:00
EPA: Remove SrcSpanAnn

- - - - -
bd6b5623 by Alan Zimmerman at 2023-10-03T19:48:46+01:00
EPA: Remove SrcSpanAnn completely

- - - - -
6814d972 by Alan Zimmerman at 2023-10-03T19:48:46+01:00
Clean up mkScope

- - - - -
c0e17d8a by Alan Zimmerman at 2023-10-03T19:48:46+01:00
EPA: Clean up TC Monad Utils

- - - - -
3ad70bc6 by Alan Zimmerman at 2023-10-03T19:48:46+01:00
EPA: EpaDelta for comment has no comments

[2023-09-23 Sat]
Current failures
   HsDocTy
   T15242

- - - - -
d035f64f by Alan Zimmerman at 2023-10-03T19:50:56+01:00
Semigroup instances for AnnList and AnnContext

- - - - -


16 changed files:

- compiler/GHC/Hs.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/ImpExp.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/Monad.hs
- compiler/GHC/Iface/Ext/Ast.hs
- compiler/GHC/Iface/Ext/Utils.hs
- compiler/GHC/Parser.y


The diff was not included because it is too large.


View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/2cffd697d8198920a4262b612d4d892dbc4b78ce...d035f64f27874c44ab1422ebe348b5f601f04dda

-- 
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/2cffd697d8198920a4262b612d4d892dbc4b78ce...d035f64f27874c44ab1422ebe348b5f601f04dda
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/20231010/108d57ac/attachment-0001.html>


More information about the ghc-commits mailing list