[Git][ghc/ghc][wip/az/locateda-epa-improve-2023-07-15] 26 commits: Summary: Remove Location from WarningTxt source

Alan Zimmerman (@alanz) gitlab at gitlab.haskell.org
Sun Jul 23 17:26:24 UTC 2023



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


Commits:
5d5bed83 by Alan Zimmerman at 2023-07-22T12:12:41+01:00
Summary: Remove Location from WarningTxt source

- - - - -
a3e80d79 by Alan Zimmerman at 2023-07-23T09:41:22+01:00
EPA: Use Introduce [DeclTag] in AnnSortKey

Author: Alan Zimmerman <alan.zimm at gmail.com>
Date:   2023-07-23 09:40:15 +0100

Summary: Introduce AnnSortKey [DeclTag]

info: patch template saved to `-`

- - - - -
7e0aa5ed by Alan Zimmerman at 2023-07-23T10:03:42+01:00
EPA: Introduce HasAnnotation class

- - - - -
4f940105 by Alan Zimmerman at 2023-07-23T11:40:31+01:00
EPA HasAnnotation 2

- - - - -
f4c78069 by Alan Zimmerman at 2023-07-23T16:18:24+01:00
EPA: put noAnnSrcSpan in HasAnnotation

- - - - -
71999d25 by Alan Zimmerman at 2023-07-23T16:18:33+01:00
EPA: Fix span for GRHS

- - - - -
ecba0735 by Alan Zimmerman at 2023-07-23T16:18:33+01:00
EPA: Capture full range for a CaseAlt Match

- - - - -
ad4fa166 by Alan Zimmerman at 2023-07-23T16:18:33+01:00
EPA Use full range for Anchor, and do not widen for [TrailingAnn]
Author: Alan Zimmerman <alan.zimm at gmail.com>
Date:   2023-07-19 20:35:37 +0100

Summary: Patch:  summary-epa-use-full-range-for
Author: Alan Zimmerman <alan.zimm at gmail.com>
Date:   2023-07-19 20:35:37 +0100

EPA Use full range for Anchor, and do not widen for [TrailingAnn]
Author: Alan Zimmerman <alan.zimm at gmail.com>
Date:   2023-07-19 20:34:57 +0100

EPA Use full range for Anchor, and do not widen for [TrailingAnn]

info: patch template saved to `-`

- - - - -
37762890 by Alan Zimmerman at 2023-07-23T16:18:34+01:00
EPA: Move TrailingAnns from last match to FunBind

- - - - -
9a422538 by Alan Zimmerman at 2023-07-23T16:18:34+01:00
EPA: Fix simple tests

- - - - -
f1050e8b by Alan Zimmerman at 2023-07-23T17:28:17+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.

- - - - -
48858eca by Alan Zimmerman at 2023-07-23T17:28:21+01:00
[EPA] Simplify noAnnSrcSpanDP0

- - - - -
341a465c by Alan Zimmerman at 2023-07-23T17:28:22+01:00
Clean up addTrailingCommaN

Remove unused parameter

- - - - -
33158750 by Alan Zimmerman at 2023-07-23T17:28:22+01:00
Summary: Patch:  use-anchor-end-as-prior-end
Author: Alan Zimmerman <alan.zimm at gmail.com>
Date:   2023-06-25 12:41:37 +0100

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.

- - - - -
a6a12ec2 by Alan Zimmerman at 2023-07-23T17:28:22+01:00
[EPA] Introduce HasTrailing in ExactPrint

Just plumbed through, not being used yet

- - - - -
af98e6ff by Alan Zimmerman at 2023-07-23T17:28:22+01:00
Summary: HasTrailing instances

- - - - -
9f2cb3de by Alan Zimmerman at 2023-07-23T17:28:22+01:00
EPA use [TrailingAnn] in enterAnn

And remove it from ExactPrint (LocatedN RdrName)

- - - - -
40a68dff by Alan Zimmerman at 2023-07-23T17:28:22+01:00
EPA: In HsDo, put TrailingAnns at top of LastStmt

- - - - -
e5639dbe by Alan Zimmerman at 2023-07-23T17:28:22+01:00
EPA: Move TrailingAnns to the top of FieldOcc

- - - - -
2a74e3e5 by Alan Zimmerman at 2023-07-23T17:28:22+01:00
EPA: do not convert comments to deltas when balancing.

It seems its not needed with the new approach

- - - - -
258e1ce0 by Alan Zimmerman at 2023-07-23T17:28:22+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.

- - - - -
fd4124bb by Alan Zimmerman at 2023-07-23T17:28:22+01:00
EPA: deal with fallout from getMonoBind

- - - - -
8c2f9f6f by Alan Zimmerman at 2023-07-23T17:28:23+01:00
EPA fix captureLineSpacing

- - - - -
389d464b by Alan Zimmerman at 2023-07-23T17:28:23+01:00
EPA print any comments in the span before exiting it

- - - - -
cfd7aba4 by Alan Zimmerman at 2023-07-23T17:28:23+01:00
EPA: getting rid of tweakDelta

WIP at present

- - - - -
b44105a5 by Alan Zimmerman at 2023-07-23T18:25:58+01:00
EPA: Add '=>' to TrailingAnn

This is used as a trailing annotation in a context.
Add its normal and unicode variants.

Note that we keep the parsed representation the same, but make use of
it when exact printing.

- - - - -


18 changed files:

- compiler/GHC/Data/BooleanFormula.hs
- compiler/GHC/Hs/Decls.hs
- compiler/GHC/Hs/Dump.hs
- compiler/GHC/Hs/Expr.hs
- compiler/GHC/Hs/Extension.hs
- compiler/GHC/Hs/Type.hs
- compiler/GHC/Hs/Utils.hs
- compiler/GHC/HsToCore/Docs.hs
- compiler/GHC/HsToCore/Monad.hs
- compiler/GHC/HsToCore/Quote.hs
- compiler/GHC/Iface/Ext/Ast.hs
- compiler/GHC/Iface/Ext/Utils.hs
- compiler/GHC/Iface/Make.hs
- compiler/GHC/Iface/Syntax.hs
- compiler/GHC/Parser.y
- compiler/GHC/Parser/Annotation.hs
- compiler/GHC/Parser/HaddockLex.x
- compiler/GHC/Parser/Lexer.x


The diff was not included because it is too large.


View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/7e6f6e4fd88f19d641af16ea71cd1d164bf0814a...b44105a5210a18d1755abbdf37e6e51609604434

-- 
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/7e6f6e4fd88f19d641af16ea71cd1d164bf0814a...b44105a5210a18d1755abbdf37e6e51609604434
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/20230723/43ea92bf/attachment-0001.html>


More information about the ghc-commits mailing list