[Git][ghc/ghc][wip/az/locateda-epa-improve-2023-03-27] 24 commits: EPA: Improve annotation management in getMonoBind

Alan Zimmerman (@alanz) gitlab at gitlab.haskell.org
Sun Jul 9 22:36:02 UTC 2023



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


Commits:
3e907421 by Alan Zimmerman at 2023-07-08T15:17:46+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.

- - - - -
ceeba004 by Alan Zimmerman at 2023-07-08T15:27:19+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.

- - - - -
28930d78 by Alan Zimmerman at 2023-07-08T15:29:10+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.

- - - - -
f2076f52 by Alan Zimmerman at 2023-07-08T15:29:15+01:00
[EPA] Simplify noAnnSrcSpanDP0

- - - - -
44d5d0f5 by Alan Zimmerman at 2023-07-08T15:29:15+01:00
EPA: Provide correct annotation span for ImportDecl

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

- - - - -
3b46fcff by Alan Zimmerman at 2023-07-08T15:29:15+01:00
EPA: Fix span for GRHS

- - - - -
f6207046 by Alan Zimmerman at 2023-07-08T15:29:15+01:00
EPA: Fix span for Located Context

- - - - -
ffcf3ea7 by Alan Zimmerman at 2023-07-08T15:29:15+01:00
EPA: Widen anchor when adding a trailingAnn

- - - - -
61d95a7d by Alan Zimmerman at 2023-07-08T15:29:15+01:00
EPA: widen more TrailingAnn usages

- - - - -
fdd7d6ef by Alan Zimmerman at 2023-07-08T15:29:15+01:00
EPA: Capture full range for a CaseAlt Match

- - - - -
16646c32 by Alan Zimmerman at 2023-07-08T15:29:16+01:00
Clean up addTrailingCommaN

Remove unused parameter

- - - - -
61541f61 by Alan Zimmerman at 2023-07-08T15:29:16+01:00
WIP

- - - - -
7e362241 by Alan Zimmerman at 2023-07-08T15:29:16+01:00
Fixup after rebase

- - - - -
31da78a5 by Alan Zimmerman at 2023-07-08T15:29:16+01:00
[EPA] Introduce HasTrailing in ExactPrint

Just plumbed through, not being used yet

- - - - -
c4140d36 by Alan Zimmerman at 2023-07-08T15:29:16+01:00
EPA use [TrailingAnn] in enterAnn

And remove it from ExactPrint (LocatedN RdrName)

- - - - -
558ea510 by Alan Zimmerman at 2023-07-08T15:29:16+01:00
EPA Use full range for Anchor, and do not widen for [TrailingAnn]

- - - - -
512e548f by Alan Zimmerman at 2023-07-08T15:30:12+01:00
EPA: Move TrailingAnns from last match to FunBind

- - - - -
efb5e348 by Alan Zimmerman at 2023-07-08T15:30:14+01:00
EPA: In HsDo, put TrailingAnns at top of LastStmt

- - - - -
a38f3465 by Alan Zimmerman at 2023-07-08T15:30:14+01:00
EPA: More extending anchors to full span in Parser.y

- - - - -
f384b602 by Alan Zimmerman at 2023-07-08T15:30:14+01:00
EPA: Move TrailingAnns to the top of FieldOcc

- - - - -
e8529b87 by Alan Zimmerman at 2023-07-08T15:30:40+01:00
EPA: Fix simple tests

- - - - -
7c87ae74 by Alan Zimmerman at 2023-07-08T15:30:44+01:00
EPA: do not convert comments to deltas when balancing.

It seems its not needed with the new approach

- - - - -
882a0ea5 by Alan Zimmerman at 2023-07-08T15:32:19+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.

- - - - -
50635f33 by Alan Zimmerman at 2023-07-09T23:35:49+01:00
EPA: deal with fallout from getMonoBind

- - - - -


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/695c6584d8a6c6bbf8f8567451bdfaac05e3e98c...50635f33fd99dded59efc6606bca0a1133d7cc77

-- 
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/695c6584d8a6c6bbf8f8567451bdfaac05e3e98c...50635f33fd99dded59efc6606bca0a1133d7cc77
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/20230709/1cd8be47/attachment-0001.html>


More information about the ghc-commits mailing list