summaryrefslogtreecommitdiff
path: root/testsuite/tests/parser/should_compile
diff options
context:
space:
mode:
authorAlan Zimmerman <alan.zimm@gmail.com>2021-10-28 19:05:51 +0100
committerAlan Zimmerman <alan.zimm@gmail.com>2021-11-02 21:39:32 +0000
commit39eed84c2188b15ed312b4468f1a44c6a49fb268 (patch)
tree0db2b8b53a33d4f61c273504b5665ba333474476 /testsuite/tests/parser/should_compile
parenta7e1be3d84d2b7d0515f909175cdfa5dcf0dc55c (diff)
downloadhaskell-39eed84c2188b15ed312b4468f1a44c6a49fb268.tar.gz
EPA: Get rid of bare SrcSpan's in the ParsedSource
The ghc-exactPrint library has had to re-introduce the relatavise phase. This is needed if you change the length of an identifier and want the layout to be preserved afterwards. It is not possible to relatavise a bare SrcSpan, so introduce `SrcAnn NoEpAnns` for them instead. Updates haddock submodule.
Diffstat (limited to 'testsuite/tests/parser/should_compile')
-rw-r--r--testsuite/tests/parser/should_compile/DumpParsedAst.stderr12
-rw-r--r--testsuite/tests/parser/should_compile/DumpRenamedAst.stderr20
-rw-r--r--testsuite/tests/parser/should_compile/DumpSemis.stderr76
-rw-r--r--testsuite/tests/parser/should_compile/DumpTypecheckedAst.stderr4
-rw-r--r--testsuite/tests/parser/should_compile/KindSigs.stderr12
-rw-r--r--testsuite/tests/parser/should_compile/T14189.stderr4
6 files changed, 96 insertions, 32 deletions
diff --git a/testsuite/tests/parser/should_compile/DumpParsedAst.stderr b/testsuite/tests/parser/should_compile/DumpParsedAst.stderr
index 72609565a8..60230b3b63 100644
--- a/testsuite/tests/parser/should_compile/DumpParsedAst.stderr
+++ b/testsuite/tests/parser/should_compile/DumpParsedAst.stderr
@@ -430,7 +430,9 @@
{OccName: k}))))))))])
(Prefix)
(L
- { DumpParsedAst.hs:10:32-39 }
+ (SrcSpanAnn
+ (EpAnnNotUsed)
+ { DumpParsedAst.hs:10:32-39 })
(KindSig
(NoExtField)
(L
@@ -873,7 +875,9 @@
{OccName: Type}))))))))])
(Prefix)
(L
- { DumpParsedAst.hs:17:42-48 }
+ (SrcSpanAnn
+ (EpAnnNotUsed)
+ { DumpParsedAst.hs:17:42-48 })
(KindSig
(NoExtField)
(L
@@ -935,7 +939,9 @@
(EpaComments
[])
[(L
- { DumpParsedAst.hs:20:6-23 }
+ (SrcSpanAnn
+ (EpAnnNotUsed)
+ { DumpParsedAst.hs:20:6-23 })
(GRHS
(EpAnn
(Anchor
diff --git a/testsuite/tests/parser/should_compile/DumpRenamedAst.stderr b/testsuite/tests/parser/should_compile/DumpRenamedAst.stderr
index b7ef9c2ce6..77061c1f84 100644
--- a/testsuite/tests/parser/should_compile/DumpRenamedAst.stderr
+++ b/testsuite/tests/parser/should_compile/DumpRenamedAst.stderr
@@ -44,7 +44,9 @@
(EpaComments
[])
[(L
- { DumpRenamedAst.hs:34:6-23 }
+ (SrcSpanAnn
+ (EpAnnNotUsed)
+ { DumpRenamedAst.hs:34:6-23 })
(GRHS
(EpAnnNotUsed)
[]
@@ -331,7 +333,9 @@
{Name: k})))))))])
(Prefix)
(L
- { DumpRenamedAst.hs:12:32-39 }
+ (SrcSpanAnn
+ (EpAnnNotUsed)
+ { DumpRenamedAst.hs:12:32-39 })
(KindSig
(NoExtField)
(L
@@ -371,7 +375,9 @@
[])
(Prefix)
(L
- { DumpRenamedAst.hs:16:17-33 }
+ (SrcSpanAnn
+ (EpAnnNotUsed)
+ { DumpRenamedAst.hs:16:17-33 })
(KindSig
(NoExtField)
(L
@@ -1006,7 +1012,9 @@
{Name: GHC.Types.Type})))))))])
(Prefix)
(L
- { DumpRenamedAst.hs:24:42-48 }
+ (SrcSpanAnn
+ (EpAnnNotUsed)
+ { DumpRenamedAst.hs:24:42-48 })
(KindSig
(NoExtField)
(L
@@ -1101,7 +1109,9 @@
{Name: b})))])
(Prefix)
(L
- { <no location info> }
+ (SrcSpanAnn
+ (EpAnnNotUsed)
+ { <no location info> })
(NoSig
(NoExtField)))
(Nothing)))]
diff --git a/testsuite/tests/parser/should_compile/DumpSemis.stderr b/testsuite/tests/parser/should_compile/DumpSemis.stderr
index bc3d2cca04..b5836252ad 100644
--- a/testsuite/tests/parser/should_compile/DumpSemis.stderr
+++ b/testsuite/tests/parser/should_compile/DumpSemis.stderr
@@ -237,7 +237,9 @@
(EpaComments
[])
[(L
- { DumpSemis.hs:(10,5)-(12,3) }
+ (SrcSpanAnn
+ (EpAnnNotUsed)
+ { DumpSemis.hs:(10,5)-(12,3) })
(GRHS
(EpAnn
(Anchor
@@ -481,7 +483,9 @@
(EpaComments
[])
[(L
- { DumpSemis.hs:(15,5)-(19,3) }
+ (SrcSpanAnn
+ (EpAnnNotUsed)
+ { DumpSemis.hs:(15,5)-(19,3) })
(GRHS
(EpAnn
(Anchor
@@ -685,7 +689,9 @@
(EpaComments
[])
[(L
- { DumpSemis.hs:22:5-30 }
+ (SrcSpanAnn
+ (EpAnnNotUsed)
+ { DumpSemis.hs:22:5-30 })
(GRHS
(EpAnn
(Anchor
@@ -853,7 +859,9 @@
(EpaComments
[])
[(L
- { DumpSemis.hs:24:3-13 }
+ (SrcSpanAnn
+ (EpAnnNotUsed)
+ { DumpSemis.hs:24:3-13 })
(GRHS
(EpAnn
(Anchor
@@ -920,7 +928,9 @@
(EpaComments
[])
[(L
- { DumpSemis.hs:25:3-13 }
+ (SrcSpanAnn
+ (EpAnnNotUsed)
+ { DumpSemis.hs:25:3-13 })
(GRHS
(EpAnn
(Anchor
@@ -988,7 +998,9 @@
(EpaComments
[])
[(L
- { DumpSemis.hs:26:3-13 }
+ (SrcSpanAnn
+ (EpAnnNotUsed)
+ { DumpSemis.hs:26:3-13 })
(GRHS
(EpAnn
(Anchor
@@ -1389,7 +1401,9 @@
(EpaComments
[])
[(L
- { DumpSemis.hs:32:5-7 }
+ (SrcSpanAnn
+ (EpAnnNotUsed)
+ { DumpSemis.hs:32:5-7 })
(GRHS
(EpAnn
(Anchor
@@ -1459,7 +1473,9 @@
(EpaComments
[])
[(L
- { DumpSemis.hs:34:9-35 }
+ (SrcSpanAnn
+ (EpAnnNotUsed)
+ { DumpSemis.hs:34:9-35 })
(GRHS
(EpAnn
(Anchor
@@ -1559,7 +1575,9 @@
(EpaComments
[])
[(L
- { DumpSemis.hs:34:20-21 }
+ (SrcSpanAnn
+ (EpAnnNotUsed)
+ { DumpSemis.hs:34:20-21 })
(GRHS
(EpAnn
(Anchor
@@ -1640,7 +1658,9 @@
(EpaComments
[])
[(L
- { DumpSemis.hs:34:25-26 }
+ (SrcSpanAnn
+ (EpAnnNotUsed)
+ { DumpSemis.hs:34:25-26 })
(GRHS
(EpAnn
(Anchor
@@ -1748,7 +1768,9 @@
(EpaComments
[])
[(L
- { DumpSemis.hs:(36,7)-(44,4) }
+ (SrcSpanAnn
+ (EpAnnNotUsed)
+ { DumpSemis.hs:(36,7)-(44,4) })
(GRHS
(EpAnn
(Anchor
@@ -1827,7 +1849,9 @@
(NPat
(EpAnnNotUsed)
(L
- { DumpSemis.hs:39:6 }
+ (SrcSpanAnn
+ (EpAnnNotUsed)
+ { DumpSemis.hs:39:6 })
(OverLit
(NoExtField)
(HsIntegral
@@ -1841,7 +1865,9 @@
(EpaComments
[])
[(L
- { DumpSemis.hs:39:8-13 }
+ (SrcSpanAnn
+ (EpAnnNotUsed)
+ { DumpSemis.hs:39:8-13 })
(GRHS
(EpAnn
(Anchor
@@ -1892,7 +1918,9 @@
(NPat
(EpAnnNotUsed)
(L
- { DumpSemis.hs:40:6 }
+ (SrcSpanAnn
+ (EpAnnNotUsed)
+ { DumpSemis.hs:40:6 })
(OverLit
(NoExtField)
(HsIntegral
@@ -1906,7 +1934,9 @@
(EpaComments
[])
[(L
- { DumpSemis.hs:40:8-13 }
+ (SrcSpanAnn
+ (EpAnnNotUsed)
+ { DumpSemis.hs:40:8-13 })
(GRHS
(EpAnn
(Anchor
@@ -1959,7 +1989,9 @@
(NPat
(EpAnnNotUsed)
(L
- { DumpSemis.hs:41:6 }
+ (SrcSpanAnn
+ (EpAnnNotUsed)
+ { DumpSemis.hs:41:6 })
(OverLit
(NoExtField)
(HsIntegral
@@ -1973,7 +2005,9 @@
(EpaComments
[])
[(L
- { DumpSemis.hs:41:8-13 }
+ (SrcSpanAnn
+ (EpAnnNotUsed)
+ { DumpSemis.hs:41:8-13 })
(GRHS
(EpAnn
(Anchor
@@ -2028,7 +2062,9 @@
(NPat
(EpAnnNotUsed)
(L
- { DumpSemis.hs:42:6 }
+ (SrcSpanAnn
+ (EpAnnNotUsed)
+ { DumpSemis.hs:42:6 })
(OverLit
(NoExtField)
(HsIntegral
@@ -2042,7 +2078,9 @@
(EpaComments
[])
[(L
- { DumpSemis.hs:42:8-13 }
+ (SrcSpanAnn
+ (EpAnnNotUsed)
+ { DumpSemis.hs:42:8-13 })
(GRHS
(EpAnn
(Anchor
diff --git a/testsuite/tests/parser/should_compile/DumpTypecheckedAst.stderr b/testsuite/tests/parser/should_compile/DumpTypecheckedAst.stderr
index 55c10d4729..afd80e9cdd 100644
--- a/testsuite/tests/parser/should_compile/DumpTypecheckedAst.stderr
+++ b/testsuite/tests/parser/should_compile/DumpTypecheckedAst.stderr
@@ -1571,7 +1571,9 @@
(EpaComments
[])
[(L
- { DumpTypecheckedAst.hs:19:6-23 }
+ (SrcSpanAnn
+ (EpAnnNotUsed)
+ { DumpTypecheckedAst.hs:19:6-23 })
(GRHS
(EpAnnNotUsed)
[]
diff --git a/testsuite/tests/parser/should_compile/KindSigs.stderr b/testsuite/tests/parser/should_compile/KindSigs.stderr
index 3bd3964024..634d488cf7 100644
--- a/testsuite/tests/parser/should_compile/KindSigs.stderr
+++ b/testsuite/tests/parser/should_compile/KindSigs.stderr
@@ -182,7 +182,9 @@
{OccName: a}))))])
(Prefix)
(L
- { <no location info> }
+ (SrcSpanAnn
+ (EpAnnNotUsed)
+ { <no location info> })
(NoSig
(NoExtField)))
(Nothing)))))
@@ -880,7 +882,9 @@
(EpaComments
[])
[(L
- { KindSigs.hs:23:9-12 }
+ (SrcSpanAnn
+ (EpAnnNotUsed)
+ { KindSigs.hs:23:9-12 })
(GRHS
(EpAnn
(Anchor
@@ -1485,7 +1489,9 @@
(EpaComments
[])
[(L
- { KindSigs.hs:35:6-11 }
+ (SrcSpanAnn
+ (EpAnnNotUsed)
+ { KindSigs.hs:35:6-11 })
(GRHS
(EpAnn
(Anchor
diff --git a/testsuite/tests/parser/should_compile/T14189.stderr b/testsuite/tests/parser/should_compile/T14189.stderr
index 6accce1c99..9eda4089be 100644
--- a/testsuite/tests/parser/should_compile/T14189.stderr
+++ b/testsuite/tests/parser/should_compile/T14189.stderr
@@ -133,7 +133,9 @@
(ConDeclField
(EpAnnNotUsed)
[(L
- { T14189.hs:6:33 }
+ (SrcSpanAnn
+ (EpAnnNotUsed)
+ { T14189.hs:6:33 })
(FieldOcc
{Name: T14189.f}
(L