[Git][ghc/ghc][wip/az/locateda-epa-improve-2023-07-15] 22 commits: EPA: Fix simple tests

Alan Zimmerman (@alanz) gitlab at gitlab.haskell.org
Wed Jul 26 22:32:31 UTC 2023



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


Commits:
0846f102 by Alan Zimmerman at 2023-07-24T19:42:14+01:00
EPA: Fix simple tests

- - - - -
a77a11b7 by Alan Zimmerman at 2023-07-24T20:31:37+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.

- - - - -
6d3e8d27 by Alan Zimmerman at 2023-07-24T20:57:18+01:00
EPA: Add DArrow to TrailingAnn

- - - - -
2a5840bd by Alan Zimmerman at 2023-07-24T20:57:29+01:00
[EPA] Introduce HasTrailing in ExactPrint

Just plumbed through, not being used yet

- - - - -
88ba65ae by Alan Zimmerman at 2023-07-24T21:40:45+01:00
Summary: HasTrailing instances

- - - - -
868efe6b by Alan Zimmerman at 2023-07-24T21:45:18+01:00
EPA use [TrailingAnn] in enterAnn

And remove it from ExactPrint (LocatedN RdrName)

- - - - -
84aa60d1 by Alan Zimmerman at 2023-07-25T18:10:17+01:00
EPA: In HsDo, put TrailingAnns at top of LastStmt

- - - - -
94343024 by Alan Zimmerman at 2023-07-25T18:18:39+01:00
EPA: do not convert comments to deltas when balancing.

It seems its not needed with the new approach

- - - - -
c0e34589 by Alan Zimmerman at 2023-07-25T19:27:31+01:00
EPA: deal with fallout from getMonoBind

- - - - -
edc8b81f by Alan Zimmerman at 2023-07-25T19:47:03+01:00
EPA fix captureLineSpacing

- - - - -
55faf537 by Alan Zimmerman at 2023-07-25T20:33:34+01:00
EPA print any comments in the span before exiting it

- - - - -
c84a9a72 by Alan Zimmerman at 2023-07-25T21:55:32+01:00
EPA: getting rid of tweakDelta

WIP at present

- - - - -
0be4b088 by Alan Zimmerman at 2023-07-25T22:38:50+01:00
EPA: tweaks to ExactPrint

- - - - -
cc51d282 by Alan Zimmerman at 2023-07-26T21:46:35+01:00
EPA: Add comments to AnchorOperation

- - - - -
0370ca68 by Alan Zimmerman at 2023-07-26T23:29:23+01:00
EPA: remove AnnEofComment

It is no longer used

- - - - -
7e6bffb1 by Alan Zimmerman at 2023-07-26T23:29:27+01:00
EPA: generalise reLoc

- - - - -
5736155b by Alan Zimmerman at 2023-07-26T23:30:05+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.

- - - - -
8579239f by Alan Zimmerman at 2023-07-26T23:30:08+01:00
[EPA] Simplify noAnnSrcSpanDP0

- - - - -
b21dd1bb by Alan Zimmerman at 2023-07-26T23:30:08+01:00
Clean up addTrailingCommaN

Remove unused parameter

- - - - -
4c7ef8c8 by Alan Zimmerman at 2023-07-26T23:30:08+01:00
EPA: Move TrailingAnns to the top of FieldOcc

- - - - -
dbd274b6 by Alan Zimmerman at 2023-07-26T23:30:09+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.

- - - - -
6320a706 by Alan Zimmerman at 2023-07-26T23:30:09+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.

- - - - -


30 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/Parser.y
- compiler/GHC/Parser/Annotation.hs
- compiler/GHC/Parser/HaddockLex.x
- compiler/GHC/Parser/Lexer.x
- compiler/GHC/Parser/PostProcess.hs
- compiler/GHC/Parser/PostProcess/Haddock.hs
- compiler/GHC/Parser/Types.hs
- compiler/GHC/Rename/Bind.hs
- compiler/GHC/Rename/Env.hs
- compiler/GHC/Rename/Expr.hs
- compiler/GHC/Rename/HsType.hs
- compiler/GHC/Rename/Module.hs
- compiler/GHC/Rename/Names.hs
- compiler/GHC/Rename/Pat.hs
- compiler/GHC/Rename/Splice.hs
- compiler/GHC/Rename/Utils.hs
- compiler/GHC/Runtime/Eval.hs
- compiler/GHC/Tc/Deriv.hs


The diff was not included because it is too large.


View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/b44105a5210a18d1755abbdf37e6e51609604434...6320a706f4fbc12a02d0249aa13e0643c1efb4bf

-- 
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/b44105a5210a18d1755abbdf37e6e51609604434...6320a706f4fbc12a02d0249aa13e0643c1efb4bf
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/20230726/acc821fa/attachment-0001.html>


More information about the ghc-commits mailing list