summaryrefslogtreecommitdiff
path: root/testsuite/tests
diff options
context:
space:
mode:
authorAlan Zimmerman <alan.zimm@gmail.com>2017-11-05 21:49:11 +0200
committerAlan Zimmerman <alan.zimm@gmail.com>2017-11-07 08:30:37 +0200
commit0ff152c9e633accca48815e26e59d1af1fe44ceb (patch)
tree2feec6a252ac5a4d2d6a98cd42e64f3ac801893e /testsuite/tests
parent275ac8ef0a0081f16abbfb8934e10cf271573768 (diff)
downloadhaskell-0ff152c9e633accca48815e26e59d1af1fe44ceb.tar.gz
WIP on combining Step 1 and 3 of Trees That Grow
See https://ghc.haskell.org/trac/ghc/wiki/ImplementingTreesThatGrow Trees that grow extension points are added for - ValBinds - HsPat - HsLit - HsOverLit - HsType - HsTyVarBndr - HsAppType - FieldOcc - AmbiguousFieldOcc Updates haddock submodule Test Plan: ./validate Reviewers: shayan-najd, simonpj, austin, goldfire, bgamari Subscribers: goldfire, rwbarton, thomie, mpickering Differential Revision: https://phabricator.haskell.org/D4147
Diffstat (limited to 'testsuite/tests')
-rw-r--r--testsuite/tests/parser/should_compile/DumpParsedAst.stderr33
-rw-r--r--testsuite/tests/parser/should_compile/DumpRenamedAst.stderr139
-rw-r--r--testsuite/tests/parser/should_compile/T14189.stderr13
-rw-r--r--testsuite/tests/quasiquotation/T7918.hs4
4 files changed, 136 insertions, 53 deletions
diff --git a/testsuite/tests/parser/should_compile/DumpParsedAst.stderr b/testsuite/tests/parser/should_compile/DumpParsedAst.stderr
index 46ab21412e..79248ab30a 100644
--- a/testsuite/tests/parser/should_compile/DumpParsedAst.stderr
+++ b/testsuite/tests/parser/should_compile/DumpParsedAst.stderr
@@ -49,6 +49,7 @@
(PrefixCon
[({ DumpParsedAst.hs:5:26-30 }
(HsTyVar
+ (PlaceHolder)
(NotPromoted)
({ DumpParsedAst.hs:5:26-30 }
(Unqual
@@ -73,25 +74,32 @@
{OccName: Length}))
[({ DumpParsedAst.hs:8:10-17 }
(HsParTy
+ (PlaceHolder)
({ DumpParsedAst.hs:8:11-16 }
(HsAppsTy
+ (PlaceHolder)
[({ DumpParsedAst.hs:8:11 }
(HsAppPrefix
+ (PlaceHolder)
({ DumpParsedAst.hs:8:11 }
(HsTyVar
+ (PlaceHolder)
(NotPromoted)
({ DumpParsedAst.hs:8:11 }
(Unqual
{OccName: a}))))))
,({ DumpParsedAst.hs:8:13 }
(HsAppInfix
+ (PlaceHolder)
({ DumpParsedAst.hs:8:13 }
(Exact
{Name: :}))))
,({ DumpParsedAst.hs:8:15-16 }
(HsAppPrefix
+ (PlaceHolder)
({ DumpParsedAst.hs:8:15-16 }
(HsTyVar
+ (PlaceHolder)
(NotPromoted)
({ DumpParsedAst.hs:8:15-16 }
(Unqual
@@ -99,32 +107,42 @@
(Prefix)
({ DumpParsedAst.hs:8:21-36 }
(HsAppsTy
+ (PlaceHolder)
[({ DumpParsedAst.hs:8:21-24 }
(HsAppPrefix
+ (PlaceHolder)
({ DumpParsedAst.hs:8:21-24 }
(HsTyVar
+ (PlaceHolder)
(NotPromoted)
({ DumpParsedAst.hs:8:21-24 }
(Unqual
{OccName: Succ}))))))
,({ DumpParsedAst.hs:8:26-36 }
(HsAppPrefix
+ (PlaceHolder)
({ DumpParsedAst.hs:8:26-36 }
(HsParTy
+ (PlaceHolder)
({ DumpParsedAst.hs:8:27-35 }
(HsAppsTy
+ (PlaceHolder)
[({ DumpParsedAst.hs:8:27-32 }
(HsAppPrefix
+ (PlaceHolder)
({ DumpParsedAst.hs:8:27-32 }
(HsTyVar
+ (PlaceHolder)
(NotPromoted)
({ DumpParsedAst.hs:8:27-32 }
(Unqual
{OccName: Length}))))))
,({ DumpParsedAst.hs:8:34-35 }
(HsAppPrefix
+ (PlaceHolder)
({ DumpParsedAst.hs:8:34-35 }
(HsTyVar
+ (PlaceHolder)
(NotPromoted)
({ DumpParsedAst.hs:8:34-35 }
(Unqual
@@ -139,16 +157,19 @@
{OccName: Length}))
[({ DumpParsedAst.hs:9:10-12 }
(HsExplicitListTy
- (Promoted)
(PlaceHolder)
+ (Promoted)
[]))]
(Prefix)
({ DumpParsedAst.hs:9:21-24 }
(HsAppsTy
+ (PlaceHolder)
[({ DumpParsedAst.hs:9:21-24 }
(HsAppPrefix
+ (PlaceHolder)
({ DumpParsedAst.hs:9:21-24 }
(HsTyVar
+ (PlaceHolder)
(NotPromoted)
({ DumpParsedAst.hs:9:21-24 }
(Unqual
@@ -161,21 +182,28 @@
(PlaceHolder)
[({ DumpParsedAst.hs:7:20-30 }
(KindedTyVar
+ (PlaceHolder)
({ DumpParsedAst.hs:7:21-22 }
(Unqual
{OccName: as}))
({ DumpParsedAst.hs:7:27-29 }
(HsAppsTy
+ (PlaceHolder)
[({ DumpParsedAst.hs:7:27-29 }
(HsAppPrefix
+ (PlaceHolder)
({ DumpParsedAst.hs:7:27-29 }
(HsListTy
+ (PlaceHolder)
({ DumpParsedAst.hs:7:28 }
(HsAppsTy
+ (PlaceHolder)
[({ DumpParsedAst.hs:7:28 }
(HsAppPrefix
+ (PlaceHolder)
({ DumpParsedAst.hs:7:28 }
(HsTyVar
+ (PlaceHolder)
(NotPromoted)
({ DumpParsedAst.hs:7:28 }
(Unqual
@@ -186,10 +214,13 @@
(KindSig
({ DumpParsedAst.hs:7:35-39 }
(HsAppsTy
+ (PlaceHolder)
[({ DumpParsedAst.hs:7:35-39 }
(HsAppPrefix
+ (PlaceHolder)
({ DumpParsedAst.hs:7:35-39 }
(HsTyVar
+ (PlaceHolder)
(NotPromoted)
({ DumpParsedAst.hs:7:35-39 }
(Unqual
diff --git a/testsuite/tests/parser/should_compile/DumpRenamedAst.stderr b/testsuite/tests/parser/should_compile/DumpRenamedAst.stderr
index c7daf90ff0..4257a329f1 100644
--- a/testsuite/tests/parser/should_compile/DumpRenamedAst.stderr
+++ b/testsuite/tests/parser/should_compile/DumpRenamedAst.stderr
@@ -4,50 +4,51 @@
(Just
((,,,)
(HsGroup
- (ValBindsOut
- [((,)
- (NonRecursive)
- {Bag(Located (HsBind Name)):
- [({ DumpRenamedAst.hs:18:1-23 }
- (FunBind
- ({ DumpRenamedAst.hs:18:1-4 }
- {Name: DumpRenamedAst.main})
- (MG
- ({ DumpRenamedAst.hs:18:1-23 }
- [({ DumpRenamedAst.hs:18:1-23 }
- (Match
- (FunRhs
- ({ DumpRenamedAst.hs:18:1-4 }
- {Name: DumpRenamedAst.main})
- (Prefix)
- (NoSrcStrict))
- []
- (GRHSs
- [({ DumpRenamedAst.hs:18:6-23 }
- (GRHS
- []
- ({ DumpRenamedAst.hs:18:8-23 }
- (HsApp
- ({ DumpRenamedAst.hs:18:8-15 }
- (HsVar
- ({ DumpRenamedAst.hs:18:8-15 }
- {Name: System.IO.putStrLn})))
- ({ DumpRenamedAst.hs:18:17-23 }
- (HsLit
- (HsString
- (SourceText
- "\"hello\"")
- {FastString: "hello"})))))))]
- ({ <no location info> }
- (EmptyLocalBinds)))))])
- []
- (PlaceHolder)
- (FromSource))
- (WpHole)
- {NameSet:
- []}
- []))]})]
- [])
+ (XValBindsLR
+ (NValBindsOut
+ [((,)
+ (NonRecursive)
+ {Bag(Located (HsBind Name)):
+ [({ DumpRenamedAst.hs:18:1-23 }
+ (FunBind
+ ({ DumpRenamedAst.hs:18:1-4 }
+ {Name: DumpRenamedAst.main})
+ (MG
+ ({ DumpRenamedAst.hs:18:1-23 }
+ [({ DumpRenamedAst.hs:18:1-23 }
+ (Match
+ (FunRhs
+ ({ DumpRenamedAst.hs:18:1-4 }
+ {Name: DumpRenamedAst.main})
+ (Prefix)
+ (NoSrcStrict))
+ []
+ (GRHSs
+ [({ DumpRenamedAst.hs:18:6-23 }
+ (GRHS
+ []
+ ({ DumpRenamedAst.hs:18:8-23 }
+ (HsApp
+ ({ DumpRenamedAst.hs:18:8-15 }
+ (HsVar
+ ({ DumpRenamedAst.hs:18:8-15 }
+ {Name: System.IO.putStrLn})))
+ ({ DumpRenamedAst.hs:18:17-23 }
+ (HsLit
+ (HsString
+ (SourceText
+ "\"hello\"")
+ {FastString: "hello"})))))))]
+ ({ <no location info> }
+ (EmptyLocalBinds)))))])
+ []
+ (PlaceHolder)
+ (FromSource))
+ (WpHole)
+ {NameSet:
+ []}
+ []))]})]
+ []))
[]
[(TyClGroup
[({ DumpRenamedAst.hs:6:1-30 }
@@ -88,6 +89,7 @@
(PrefixCon
[({ DumpRenamedAst.hs:6:26-30 }
(HsTyVar
+ (PlaceHolder)
(NotPromoted)
({ DumpRenamedAst.hs:6:26-30 }
{Name: DumpRenamedAst.Peano})))])
@@ -114,10 +116,13 @@
{Name: DumpRenamedAst.Length})
[({ DumpRenamedAst.hs:9:10-17 }
(HsParTy
+ (PlaceHolder)
({ DumpRenamedAst.hs:9:11-16 }
(HsOpTy
+ (PlaceHolder)
({ DumpRenamedAst.hs:9:11 }
(HsTyVar
+ (PlaceHolder)
(NotPromoted)
({ DumpRenamedAst.hs:9:11 }
{Name: a})))
@@ -125,28 +130,35 @@
{Name: :})
({ DumpRenamedAst.hs:9:15-16 }
(HsTyVar
+ (PlaceHolder)
(NotPromoted)
({ DumpRenamedAst.hs:9:15-16 }
{Name: as})))))))]
(Prefix)
({ DumpRenamedAst.hs:9:21-36 }
(HsAppTy
+ (PlaceHolder)
({ DumpRenamedAst.hs:9:21-24 }
(HsTyVar
+ (PlaceHolder)
(NotPromoted)
({ DumpRenamedAst.hs:9:21-24 }
{Name: DumpRenamedAst.Succ})))
({ DumpRenamedAst.hs:9:26-36 }
(HsParTy
+ (PlaceHolder)
({ DumpRenamedAst.hs:9:27-35 }
(HsAppTy
+ (PlaceHolder)
({ DumpRenamedAst.hs:9:27-32 }
(HsTyVar
+ (PlaceHolder)
(NotPromoted)
({ DumpRenamedAst.hs:9:27-32 }
{Name: DumpRenamedAst.Length})))
({ DumpRenamedAst.hs:9:34-35 }
(HsTyVar
+ (PlaceHolder)
(NotPromoted)
({ DumpRenamedAst.hs:9:34-35 }
{Name: as}))))))))))
@@ -159,12 +171,13 @@
{Name: DumpRenamedAst.Length})
[({ DumpRenamedAst.hs:10:10-12 }
(HsExplicitListTy
- (Promoted)
(PlaceHolder)
+ (Promoted)
[]))]
(Prefix)
({ DumpRenamedAst.hs:10:21-24 }
(HsTyVar
+ (PlaceHolder)
(NotPromoted)
({ DumpRenamedAst.hs:10:21-24 }
{Name: DumpRenamedAst.Zero}))))
@@ -175,12 +188,15 @@
[{Name: k}]
[({ DumpRenamedAst.hs:8:20-30 }
(KindedTyVar
+ (PlaceHolder)
({ DumpRenamedAst.hs:8:21-22 }
{Name: as})
({ DumpRenamedAst.hs:8:27-29 }
(HsListTy
+ (PlaceHolder)
({ DumpRenamedAst.hs:8:28 }
(HsTyVar
+ (PlaceHolder)
(NotPromoted)
({ DumpRenamedAst.hs:8:28 }
{Name: k})))))))]
@@ -191,6 +207,7 @@
(KindSig
({ DumpRenamedAst.hs:8:35-39 }
(HsTyVar
+ (PlaceHolder)
(NotPromoted)
({ DumpRenamedAst.hs:8:35-39 }
{Name: DumpRenamedAst.Peano})))))
@@ -214,20 +231,25 @@
(KindSig
({ DumpRenamedAst.hs:12:20-30 }
(HsFunTy
+ (PlaceHolder)
({ DumpRenamedAst.hs:12:20 }
(HsTyVar
+ (PlaceHolder)
(NotPromoted)
({ DumpRenamedAst.hs:12:20 }
{Name: k})))
({ DumpRenamedAst.hs:12:25-30 }
(HsFunTy
+ (PlaceHolder)
({ DumpRenamedAst.hs:12:25 }
(HsTyVar
+ (PlaceHolder)
(NotPromoted)
({ DumpRenamedAst.hs:12:25 }
{Name: k})))
({ DumpRenamedAst.hs:12:30 }
(HsTyVar
+ (PlaceHolder)
(NotPromoted)
({ DumpRenamedAst.hs:12:30 }
{Name: GHC.Types.*})))))))))
@@ -244,20 +266,25 @@
{Name: DumpRenamedAst.Nat})
[({ DumpRenamedAst.hs:15:22-34 }
(HsKindSig
+ (PlaceHolder)
({ DumpRenamedAst.hs:15:23 }
(HsTyVar
+ (PlaceHolder)
(NotPromoted)
({ DumpRenamedAst.hs:15:23 }
{Name: a})))
({ DumpRenamedAst.hs:15:28-33 }
(HsFunTy
+ (PlaceHolder)
({ DumpRenamedAst.hs:15:28 }
(HsTyVar
+ (PlaceHolder)
(NotPromoted)
({ DumpRenamedAst.hs:15:28 }
{Name: k})))
({ DumpRenamedAst.hs:15:33 }
(HsTyVar
+ (PlaceHolder)
(NotPromoted)
({ DumpRenamedAst.hs:15:33 }
{Name: GHC.Types.*})))))))]
@@ -270,22 +297,28 @@
(Just
({ DumpRenamedAst.hs:15:39-51 }
(HsFunTy
+ (PlaceHolder)
({ DumpRenamedAst.hs:15:39-46 }
(HsParTy
+ (PlaceHolder)
({ DumpRenamedAst.hs:15:40-45 }
(HsFunTy
+ (PlaceHolder)
({ DumpRenamedAst.hs:15:40 }
(HsTyVar
+ (PlaceHolder)
(NotPromoted)
({ DumpRenamedAst.hs:15:40 }
{Name: k})))
({ DumpRenamedAst.hs:15:45 }
(HsTyVar
+ (PlaceHolder)
(NotPromoted)
({ DumpRenamedAst.hs:15:45 }
{Name: GHC.Types.*})))))))
({ DumpRenamedAst.hs:15:51 }
(HsTyVar
+ (PlaceHolder)
(NotPromoted)
({ DumpRenamedAst.hs:15:51 }
{Name: GHC.Types.*}))))))
@@ -298,56 +331,72 @@
,{Name: g}]
({ DumpRenamedAst.hs:16:10-45 }
(HsFunTy
+ (PlaceHolder)
({ DumpRenamedAst.hs:16:10-34 }
(HsParTy
+ (PlaceHolder)
({ DumpRenamedAst.hs:16:11-33 }
(HsForAllTy
+ (PlaceHolder)
[({ DumpRenamedAst.hs:16:18-19 }
(UserTyVar
+ (PlaceHolder)
({ DumpRenamedAst.hs:16:18-19 }
{Name: xx})))]
({ DumpRenamedAst.hs:16:22-33 }
(HsFunTy
+ (PlaceHolder)
({ DumpRenamedAst.hs:16:22-25 }
(HsAppTy
+ (PlaceHolder)
({ DumpRenamedAst.hs:16:22 }
(HsTyVar
+ (PlaceHolder)
(NotPromoted)
({ DumpRenamedAst.hs:16:22 }
{Name: f})))
({ DumpRenamedAst.hs:16:24-25 }
(HsTyVar
+ (PlaceHolder)
(NotPromoted)
({ DumpRenamedAst.hs:16:24-25 }
{Name: xx})))))
({ DumpRenamedAst.hs:16:30-33 }
(HsAppTy
+ (PlaceHolder)
({ DumpRenamedAst.hs:16:30 }
(HsTyVar
+ (PlaceHolder)
(NotPromoted)
({ DumpRenamedAst.hs:16:30 }
{Name: g})))
({ DumpRenamedAst.hs:16:32-33 }
(HsTyVar
+ (PlaceHolder)
(NotPromoted)
({ DumpRenamedAst.hs:16:32-33 }
{Name: xx})))))))))))
({ DumpRenamedAst.hs:16:39-45 }
(HsAppTy
+ (PlaceHolder)
({ DumpRenamedAst.hs:16:39-43 }
(HsAppTy
+ (PlaceHolder)
({ DumpRenamedAst.hs:16:39-41 }
(HsTyVar
+ (PlaceHolder)
(NotPromoted)
({ DumpRenamedAst.hs:16:39-41 }
{Name: DumpRenamedAst.Nat})))
({ DumpRenamedAst.hs:16:43 }
(HsTyVar
+ (PlaceHolder)
(NotPromoted)
({ DumpRenamedAst.hs:16:43 }
{Name: f})))))
({ DumpRenamedAst.hs:16:45 }
(HsTyVar
+ (PlaceHolder)
(NotPromoted)
({ DumpRenamedAst.hs:16:45 }
{Name: g})))))))
diff --git a/testsuite/tests/parser/should_compile/T14189.stderr b/testsuite/tests/parser/should_compile/T14189.stderr
index 53e4a6f941..00edf1b471 100644
--- a/testsuite/tests/parser/should_compile/T14189.stderr
+++ b/testsuite/tests/parser/should_compile/T14189.stderr
@@ -4,9 +4,10 @@
(Just
((,,,)
(HsGroup
- (ValBindsOut
- []
- [])
+ (XValBindsLR
+ (NValBindsOut
+ []
+ []))
[]
[(TyClGroup
[({ T14189.hs:6:1-42 }
@@ -36,6 +37,7 @@
(PrefixCon
[({ T14189.hs:6:18-20 }
(HsTyVar
+ (PlaceHolder)
(NotPromoted)
({ T14189.hs:6:18-20 }
{Name: GHC.Types.Int})))])
@@ -65,12 +67,13 @@
(ConDeclField
[({ T14189.hs:6:33 }
(FieldOcc
+ {Name: T14189.f}
({ T14189.hs:6:33 }
(Unqual
- {OccName: f}))
- {Name: T14189.f}))]
+ {OccName: f}))))]
({ T14189.hs:6:38-40 }
(HsTyVar
+ (PlaceHolder)
(NotPromoted)
({ T14189.hs:6:38-40 }
{Name: GHC.Types.Int})))
diff --git a/testsuite/tests/quasiquotation/T7918.hs b/testsuite/tests/quasiquotation/T7918.hs
index 42bb1b05c8..40d5a90d78 100644
--- a/testsuite/tests/quasiquotation/T7918.hs
+++ b/testsuite/tests/quasiquotation/T7918.hs
@@ -35,13 +35,13 @@ traverse a =
return ()
showTyVar :: Maybe (HsType GhcRn) -> Traverse ()
- showTyVar (Just (HsTyVar _ (L _ v))) =
+ showTyVar (Just (HsTyVar _ _ (L _ v))) =
modify $ \(loc, ids) -> (loc, (v, loc) : ids)
showTyVar _ =
return ()
showPatVar :: Maybe (Pat GhcTc) -> Traverse ()
- showPatVar (Just (VarPat (L _ v))) =
+ showPatVar (Just (VarPat _ (L _ v))) =
modify $ \(loc, ids) -> (loc, (varName v, loc) : ids)
showPatVar _
= return ()