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-08 17:49:54 +0200
commit438dd1cbba13d35f3452b4dcef3f94ce9a216905 (patch)
tree0678edb3697fb53b5f38a6e80473e658961f4b53 /testsuite/tests
parentfe6848f544c2a14086bcef388c46f4070c22d287 (diff)
downloadhaskell-438dd1cbba13d35f3452b4dcef3f94ce9a216905.tar.gz
WIP on Doing a combined Step 1 and 3 for 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/perf/haddock/all.T3
-rw-r--r--testsuite/tests/quasiquotation/T7918.hs4
5 files changed, 138 insertions, 54 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..f0892c99b8 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
+ (NValBinds
+ [((,)
+ (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..4965410e65 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
+ (NValBinds
+ []
+ []))
[]
[(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/perf/haddock/all.T b/testsuite/tests/perf/haddock/all.T
index a5de011883..7e55d494cf 100644
--- a/testsuite/tests/perf/haddock/all.T
+++ b/testsuite/tests/perf/haddock/all.T
@@ -143,7 +143,7 @@ test('haddock.compiler',
[extra_files(['../../../../compiler/stage2/haddock.t']),
unless(in_tree_compiler(), skip), req_haddock
,stats_num_field('bytes allocated',
- [(wordsize(64), 51592019560, 10)
+ [(wordsize(64), 65807004616, 10)
# 2012-08-14: 26070600504 (amd64/Linux)
# 2012-08-29: 26353100288 (amd64/Linux, new CG)
# 2012-09-18: 26882813032 (amd64/Linux)
@@ -165,6 +165,7 @@ test('haddock.compiler',
# 2017-06-05: 65378619232 (amd64/Linux) Desugar modules compiled with -fno-code
# 2017-06-06: 55990521024 (amd64/Linux) Don't pass on -dcore-lint in Haddock.mk
# 2017-07-12: 51592019560 (amd64/Linux) Use getNameToInstancesIndex
+ # 2017-11-07: 65807004616 (amd64/Linux) Trees that grow
,(platform('i386-unknown-mingw32'), 367546388, 10)
# 2012-10-30: 13773051312 (x86/Windows)
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 ()