[Git][ghc/ghc][wip/az/locateda-epa-improve-2023-03-27] 27 commits: EPA: Simplify GHC/Parser.y sL1
Alan Zimmerman (@alanz)
gitlab at gitlab.haskell.org
Thu Jul 13 20:26:15 UTC 2023
Alan Zimmerman pushed to branch wip/az/locateda-epa-improve-2023-03-27 at Glasgow Haskell Compiler / GHC
Commits:
20c7cd0a by Alan Zimmerman at 2023-07-12T23:21:53+01:00
EPA: Simplify GHC/Parser.y sL1
This is the next patch in a series simplifying location management in
GHC/Parser.y
This one simplifies sL1, to use the HasLoc instances introduced in
!10743 (closed)
- - - - -
d7895226 by Alan Zimmerman at 2023-07-13T18:27:14+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.
- - - - -
847e8df8 by Alan Zimmerman at 2023-07-13T20:22:18+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.
- - - - -
11493540 by Alan Zimmerman at 2023-07-13T20:22:22+01:00
[EPA] Simplify noAnnSrcSpanDP0
- - - - -
92eb39a7 by Alan Zimmerman at 2023-07-13T20:22:22+01:00
EPA: Provide correct annotation span for ImportDecl
Use the whole declaration, rather than just the span of the 'import'
keyword.
- - - - -
720b0c8d by Alan Zimmerman at 2023-07-13T20:22:22+01:00
EPA: Fix span for GRHS
- - - - -
136f41c6 by Alan Zimmerman at 2023-07-13T20:22:22+01:00
EPA: Fix span for Located Context
- - - - -
274727de by Alan Zimmerman at 2023-07-13T20:22:22+01:00
EPA: Widen anchor when adding a trailingAnn
- - - - -
b2ae4197 by Alan Zimmerman at 2023-07-13T20:22:22+01:00
EPA: widen more TrailingAnn usages
- - - - -
4b0bcc58 by Alan Zimmerman at 2023-07-13T20:22:22+01:00
EPA: Capture full range for a CaseAlt Match
- - - - -
1f567e7d by Alan Zimmerman at 2023-07-13T20:22:22+01:00
Clean up addTrailingCommaN
Remove unused parameter
- - - - -
18fd2ed9 by Alan Zimmerman at 2023-07-13T20:22:22+01:00
WIP
- - - - -
f307a26c by Alan Zimmerman at 2023-07-13T20:22:22+01:00
Fixup after rebase
- - - - -
7e6b469a by Alan Zimmerman at 2023-07-13T20:22:22+01:00
[EPA] Introduce HasTrailing in ExactPrint
Just plumbed through, not being used yet
- - - - -
7b5a6fa8 by Alan Zimmerman at 2023-07-13T20:22:22+01:00
EPA use [TrailingAnn] in enterAnn
And remove it from ExactPrint (LocatedN RdrName)
- - - - -
e2f15fbb by Alan Zimmerman at 2023-07-13T20:27:11+01:00
EPA Use full range for Anchor, and do not widen for [TrailingAnn]
- - - - -
3fb5c0a8 by Alan Zimmerman at 2023-07-13T20:27:14+01:00
EPA: Move TrailingAnns from last match to FunBind
- - - - -
39956b25 by Alan Zimmerman at 2023-07-13T20:27:14+01:00
EPA: In HsDo, put TrailingAnns at top of LastStmt
- - - - -
8b73fee9 by Alan Zimmerman at 2023-07-13T20:27:14+01:00
EPA: More extending anchors to full span in Parser.y
- - - - -
5f4412a5 by Alan Zimmerman at 2023-07-13T20:27:14+01:00
EPA: Move TrailingAnns to the top of FieldOcc
- - - - -
03792010 by Alan Zimmerman at 2023-07-13T20:27:14+01:00
EPA: Fix simple tests
- - - - -
c514c8c4 by Alan Zimmerman at 2023-07-13T20:27:14+01:00
EPA: do not convert comments to deltas when balancing.
It seems its not needed with the new approach
- - - - -
4561c4ff by Alan Zimmerman at 2023-07-13T20:27:14+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.
- - - - -
1116f7f5 by Alan Zimmerman at 2023-07-13T20:27:14+01:00
EPA: deal with fallout from getMonoBind
- - - - -
0ae25c21 by Alan Zimmerman at 2023-07-13T20:27:14+01:00
EPA fix captureLineSpacing
- - - - -
8b31bbd4 by Alan Zimmerman at 2023-07-13T20:27:14+01:00
EPA print any comments in the span before exiting it
- - - - -
5e64ea9a by Alan Zimmerman at 2023-07-13T20:27:14+01:00
EPA: getting rid of tweakDelta
WIP at present
- - - - -
23 changed files:
- compiler/GHC/Data/BooleanFormula.hs
- compiler/GHC/Driver/Main.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/Match/Literal.hs
- compiler/GHC/HsToCore/Monad.hs
- compiler/GHC/HsToCore/Quote.hs
- compiler/GHC/HsToCore/Ticks.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/IfaceToCore.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/3163f815e39de9119553de75c2e7bd09c0177f35...5e64ea9abbd847d5eedaa90a982b42fac0a9b711
--
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/3163f815e39de9119553de75c2e7bd09c0177f35...5e64ea9abbd847d5eedaa90a982b42fac0a9b711
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/20230713/5477604c/attachment-0001.html>
More information about the ghc-commits
mailing list