[Git][ghc/ghc][master] EPA: Use full range for Anchor

Marge Bot (@marge-bot) gitlab at gitlab.haskell.org
Thu Nov 2 02:24:22 UTC 2023



Marge Bot pushed to branch master at Glasgow Haskell Compiler / GHC


Commits:
81fb8885 by Alan Zimmerman at 2023-11-01T22:23:56-04:00
EPA: Use full range for Anchor

This change requires a series of related changes, which must all land
at the same time, otherwise all the EPA tests break.

* 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.

* Add DArrow to TrailingAnn

* EPA Introduce HasTrailing in ExactPrint

   Use [TrailingAnn] in enterAnn and remove it from
   ExactPrint (LocatedN RdrName)

* In HsDo, put TrailingAnns at top of LastStmt

* EPA: do not convert comments to deltas when balancing.

* EPA: deal with fallout from getMonoBind

* EPA fix captureLineSpacing

* EPA print any comments in the span before exiting it

* EPA: Add comments to AnchorOperation

* EPA: remove AnnEofComment, it is no longer used

Updates Haddock submodule

- - - - -


20 changed files:

- compiler/GHC/Hs/Type.hs
- compiler/GHC/Hs/Utils.hs
- compiler/GHC/Iface/Ext/Ast.hs
- compiler/GHC/Parser.y
- compiler/GHC/Parser/Annotation.hs
- compiler/GHC/ThToHs.hs
- testsuite/tests/driver/recompChangedPackage/q/q.cabal
- testsuite/tests/ghc-api/exactprint/AddDecl1.expected.hs
- testsuite/tests/ghc-api/exactprint/Test20239.stderr
- testsuite/tests/haddock/should_compile_flag_haddock/T17544.stderr
- testsuite/tests/haddock/should_compile_flag_haddock/T17544_kw.stderr
- testsuite/tests/parser/should_compile/DumpParsedAst.stderr
- testsuite/tests/parser/should_compile/DumpRenamedAst.stderr
- testsuite/tests/parser/should_compile/DumpSemis.stderr
- testsuite/tests/parser/should_compile/KindSigs.stderr
- testsuite/tests/parser/should_compile/T14189.stderr
- testsuite/tests/parser/should_compile/T15323.stderr
- testsuite/tests/parser/should_compile/T20452.stderr
- testsuite/tests/parser/should_compile/T20846.stderr
- testsuite/tests/parser/should_compile/T23315/T23315.stderr


The diff was not included because it is too large.


View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/81fb8885819c63e926376019b14cf994e88a167c

-- 
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/81fb8885819c63e926376019b14cf994e88a167c
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/20231101/784a2bf5/attachment-0001.html>


More information about the ghc-commits mailing list