summaryrefslogtreecommitdiff
path: root/testsuite/tests
diff options
context:
space:
mode:
authorAlan Zimmerman <alan.zimm@gmail.com>2017-11-09 23:20:19 +0200
committerAlan Zimmerman <alan.zimm@gmail.com>2017-11-11 23:16:39 +0200
commite3ec2e7ae94524ebd111963faf34b84d942265b4 (patch)
tree022bca155b29cf0d1c40b25537bc238eec829db8 /testsuite/tests
parent86c50a16e6a17349a7662067232236e38e46ba42 (diff)
downloadhaskell-e3ec2e7ae94524ebd111963faf34b84d942265b4.tar.gz
WIP on combined Step 1 and 3 for Trees That Grow, HsExpr
See https://ghc.haskell.org/trac/ghc/wiki/ImplementingTreesThatGrow Trees that grow extension points are added for - HsExpr Updates haddock submodule Test Plan: ./validate Reviewers: bgamari, goldfire Subscribers: rwbarton, thomie, shayan-najd, mpickering Differential Revision: https://phabricator.haskell.org/D4177
Diffstat (limited to 'testsuite/tests')
-rw-r--r--testsuite/tests/ghc-api/annotations/parseTree.hs6
-rw-r--r--testsuite/tests/ghc-api/annotations/stringSource.hs6
-rw-r--r--testsuite/tests/ghc-api/annotations/t11430.hs2
-rw-r--r--testsuite/tests/parser/should_compile/DumpParsedAst.stderr3
-rw-r--r--testsuite/tests/parser/should_compile/DumpRenamedAst.stderr3
-rw-r--r--testsuite/tests/parser/should_compile/DumpTypecheckedAst.stderr73
-rw-r--r--testsuite/tests/perf/haddock/all.T3
-rw-r--r--testsuite/tests/quasiquotation/T7918.hs2
8 files changed, 90 insertions, 8 deletions
diff --git a/testsuite/tests/ghc-api/annotations/parseTree.hs b/testsuite/tests/ghc-api/annotations/parseTree.hs
index 3a8a29abd4..149658a231 100644
--- a/testsuite/tests/ghc-api/annotations/parseTree.hs
+++ b/testsuite/tests/ghc-api/annotations/parseTree.hs
@@ -51,8 +51,10 @@ testOneFile libdir fileName = do
gq ast = everything (++) ([] `mkQ` doLHsTupArg) ast
doLHsTupArg :: LHsTupArg GhcPs -> [(SrcSpan,String,HsExpr GhcPs)]
- doLHsTupArg (L l arg@(Present _)) = [(l,"p",ExplicitTuple [L l arg] Boxed)]
- doLHsTupArg (L l arg@(Missing _)) = [(l,"m",ExplicitTuple [L l arg] Boxed)]
+ doLHsTupArg (L l arg@(Present _))
+ = [(l,"p",ExplicitTuple noExt [L l arg] Boxed)]
+ doLHsTupArg (L l arg@(Missing _))
+ = [(l,"m",ExplicitTuple noExt [L l arg] Boxed)]
showAnns anns = "[\n" ++ (intercalate "\n"
diff --git a/testsuite/tests/ghc-api/annotations/stringSource.hs b/testsuite/tests/ghc-api/annotations/stringSource.hs
index b89911d6c7..4089d4a88a 100644
--- a/testsuite/tests/ghc-api/annotations/stringSource.hs
+++ b/testsuite/tests/ghc-api/annotations/stringSource.hs
@@ -80,9 +80,9 @@ testOneFile libdir fileName = do
doCCallTarget (StaticTarget s f _ _) = [("st",[(noLoc (s,f))])]
doHsExpr :: HsExpr GhcPs -> [(String,[Located (SourceText,FastString)])]
- doHsExpr (HsCoreAnn src ss _) = [("co",[conv (noLoc ss)])]
- doHsExpr (HsSCC src ss _) = [("sc",[conv (noLoc ss)])]
- doHsExpr (HsTickPragma src (ss,_,_) _ss2 _) = [("tp",[conv (noLoc ss)])]
+ doHsExpr (HsCoreAnn _ src ss _) = [("co",[conv (noLoc ss)])]
+ doHsExpr (HsSCC _ src ss _) = [("sc",[conv (noLoc ss)])]
+ doHsExpr (HsTickPragma _ src (ss,_,_) _ss2 _) = [("tp",[conv (noLoc ss)])]
doHsExpr _ = []
conv (GHC.L l (StringLiteral st fs)) = GHC.L l (st,fs)
diff --git a/testsuite/tests/ghc-api/annotations/t11430.hs b/testsuite/tests/ghc-api/annotations/t11430.hs
index 4b8119459b..40d23b5712 100644
--- a/testsuite/tests/ghc-api/annotations/t11430.hs
+++ b/testsuite/tests/ghc-api/annotations/t11430.hs
@@ -67,7 +67,7 @@ testOneFile libdir fileName = do
doRuleDecl (HsRule _ _ _ _ _ _ _) = []
doHsExpr :: HsExpr GhcPs -> [(String,[String])]
- doHsExpr (HsTickPragma src (_,_,_) ss _) = [("tp",[show ss])]
+ doHsExpr (HsTickPragma _ src (_,_,_) ss _) = [("tp",[show ss])]
doHsExpr _ = []
doInline (InlinePragma _ _ _ (ActiveBefore (SourceText ss) _) _)
diff --git a/testsuite/tests/parser/should_compile/DumpParsedAst.stderr b/testsuite/tests/parser/should_compile/DumpParsedAst.stderr
index 79248ab30a..b80ab62507 100644
--- a/testsuite/tests/parser/should_compile/DumpParsedAst.stderr
+++ b/testsuite/tests/parser/should_compile/DumpParsedAst.stderr
@@ -249,13 +249,16 @@
[]
({ DumpParsedAst.hs:11:8-23 }
(HsApp
+ (PlaceHolder)
({ DumpParsedAst.hs:11:8-15 }
(HsVar
+ (PlaceHolder)
({ DumpParsedAst.hs:11:8-15 }
(Unqual
{OccName: putStrLn}))))
({ DumpParsedAst.hs:11:17-23 }
(HsLit
+ (PlaceHolder)
(HsString
(SourceText
"\"hello\"")
diff --git a/testsuite/tests/parser/should_compile/DumpRenamedAst.stderr b/testsuite/tests/parser/should_compile/DumpRenamedAst.stderr
index f0892c99b8..fbc30626fa 100644
--- a/testsuite/tests/parser/should_compile/DumpRenamedAst.stderr
+++ b/testsuite/tests/parser/should_compile/DumpRenamedAst.stderr
@@ -29,12 +29,15 @@
[]
({ DumpRenamedAst.hs:18:8-23 }
(HsApp
+ (PlaceHolder)
({ DumpRenamedAst.hs:18:8-15 }
(HsVar
+ (PlaceHolder)
({ DumpRenamedAst.hs:18:8-15 }
{Name: System.IO.putStrLn})))
({ DumpRenamedAst.hs:18:17-23 }
(HsLit
+ (PlaceHolder)
(HsString
(SourceText
"\"hello\"")
diff --git a/testsuite/tests/parser/should_compile/DumpTypecheckedAst.stderr b/testsuite/tests/parser/should_compile/DumpTypecheckedAst.stderr
index e0d810d4b4..b888067af1 100644
--- a/testsuite/tests/parser/should_compile/DumpTypecheckedAst.stderr
+++ b/testsuite/tests/parser/should_compile/DumpTypecheckedAst.stderr
@@ -7,47 +7,63 @@
{Var: DumpTypecheckedAst.$tcPeano}
({ <no location info> }
(HsApp
+ (PlaceHolder)
({ <no location info> }
(HsApp
+ (PlaceHolder)
({ <no location info> }
(HsApp
+ (PlaceHolder)
({ <no location info> }
(HsApp
+ (PlaceHolder)
({ <no location info> }
(HsApp
+ (PlaceHolder)
({ <no location info> }
(HsApp
+ (PlaceHolder)
({ <no location info> }
(HsConLikeOut
+ (PlaceHolder)
({abstract:ConLike})))
({ <no location info> }
(HsLit
+ (PlaceHolder)
{HsWord{64}Prim (14073232900889011755) (NoSourceText)}))))
({ <no location info> }
(HsLit
+ (PlaceHolder)
{HsWord{64}Prim (2739668351064589274) (NoSourceText)}))))
({ <no location info> }
(HsVar
+ (PlaceHolder)
({ <no location info> }
{Var: DumpTypecheckedAst.$trModule})))))
({ <no location info> }
(HsPar
+ (PlaceHolder)
({ <no location info> }
(HsApp
+ (PlaceHolder)
({ <no location info> }
(HsConLikeOut
+ (PlaceHolder)
({abstract:ConLike})))
({ <no location info> }
(HsLit
+ (PlaceHolder)
(HsStringPrim
(NoSourceText)
"Peano")))))))))
({ <no location info> }
(HsLit
+ (PlaceHolder)
{HsInt{64}Prim (0) (SourceText
"0")}))))
({ <no location info> }
(HsVar
+ (PlaceHolder)
({ <no location info> }
{Var: GHC.Types.krep$*})))))
(False)))
@@ -56,47 +72,63 @@
{Var: DumpTypecheckedAst.$tc'Zero}
({ <no location info> }
(HsApp
+ (PlaceHolder)
({ <no location info> }
(HsApp
+ (PlaceHolder)
({ <no location info> }
(HsApp
+ (PlaceHolder)
({ <no location info> }
(HsApp
+ (PlaceHolder)
({ <no location info> }
(HsApp
+ (PlaceHolder)
({ <no location info> }
(HsApp
+ (PlaceHolder)
({ <no location info> }
(HsConLikeOut
+ (PlaceHolder)
({abstract:ConLike})))
({ <no location info> }
(HsLit
+ (PlaceHolder)
{HsWord{64}Prim (13760111476013868540) (NoSourceText)}))))
({ <no location info> }
(HsLit
+ (PlaceHolder)
{HsWord{64}Prim (12314848029315386153) (NoSourceText)}))))
({ <no location info> }
(HsVar
+ (PlaceHolder)
({ <no location info> }
{Var: DumpTypecheckedAst.$trModule})))))
({ <no location info> }
(HsPar
+ (PlaceHolder)
({ <no location info> }
(HsApp
+ (PlaceHolder)
({ <no location info> }
(HsConLikeOut
+ (PlaceHolder)
({abstract:ConLike})))
({ <no location info> }
(HsLit
+ (PlaceHolder)
(HsStringPrim
(NoSourceText)
"'Zero")))))))))
({ <no location info> }
(HsLit
+ (PlaceHolder)
{HsInt{64}Prim (0) (SourceText
"0")}))))
({ <no location info> }
(HsVar
+ (PlaceHolder)
({ <no location info> }
{Var: $krep})))))
(False)))
@@ -105,47 +137,63 @@
{Var: DumpTypecheckedAst.$tc'Succ}
({ <no location info> }
(HsApp
+ (PlaceHolder)
({ <no location info> }
(HsApp
+ (PlaceHolder)
({ <no location info> }
(HsApp
+ (PlaceHolder)
({ <no location info> }
(HsApp
+ (PlaceHolder)
({ <no location info> }
(HsApp
+ (PlaceHolder)
({ <no location info> }
(HsApp
+ (PlaceHolder)
({ <no location info> }
(HsConLikeOut
+ (PlaceHolder)
({abstract:ConLike})))
({ <no location info> }
(HsLit
+ (PlaceHolder)
{HsWord{64}Prim (1143980031331647856) (NoSourceText)}))))
({ <no location info> }
(HsLit
+ (PlaceHolder)
{HsWord{64}Prim (14802086722010293686) (NoSourceText)}))))
({ <no location info> }
(HsVar
+ (PlaceHolder)
({ <no location info> }
{Var: DumpTypecheckedAst.$trModule})))))
({ <no location info> }
(HsPar
+ (PlaceHolder)
({ <no location info> }
(HsApp
+ (PlaceHolder)
({ <no location info> }
(HsConLikeOut
+ (PlaceHolder)
({abstract:ConLike})))
({ <no location info> }
(HsLit
+ (PlaceHolder)
(HsStringPrim
(NoSourceText)
"'Succ")))))))))
({ <no location info> }
(HsLit
+ (PlaceHolder)
{HsInt{64}Prim (0) (SourceText
"0")}))))
({ <no location info> }
(HsVar
+ (PlaceHolder)
({ <no location info> }
{Var: $krep})))))
(False)))
@@ -154,17 +202,22 @@
{Var: $krep}
({ <no location info> }
(HsApp
+ (PlaceHolder)
({ <no location info> }
(HsApp
+ (PlaceHolder)
({ <no location info> }
(HsConLikeOut
+ (PlaceHolder)
({abstract:ConLike})))
({ <no location info> }
(HsVar
+ (PlaceHolder)
({ <no location info> }
{Var: $krep})))))
({ <no location info> }
(HsVar
+ (PlaceHolder)
({ <no location info> }
{Var: $krep})))))
(False)))
@@ -173,22 +226,28 @@
{Var: $krep}
({ <no location info> }
(HsApp
+ (PlaceHolder)
({ <no location info> }
(HsApp
+ (PlaceHolder)
({ <no location info> }
(HsConLikeOut
+ (PlaceHolder)
({abstract:ConLike})))
({ <no location info> }
(HsVar
+ (PlaceHolder)
({ <no location info> }
{Var: DumpTypecheckedAst.$tcPeano})))))
({ <no location info> }
(HsWrap
+ (PlaceHolder)
(WpTyApp
(TyConApp
({abstract:TyCon})
[]))
(HsConLikeOut
+ (PlaceHolder)
({abstract:ConLike}))))))
(False)))
,({ <no location info> }
@@ -196,32 +255,43 @@
{Var: DumpTypecheckedAst.$trModule}
({ <no location info> }
(HsApp
+ (PlaceHolder)
({ <no location info> }
(HsApp
+ (PlaceHolder)
({ <no location info> }
(HsConLikeOut
+ (PlaceHolder)
({abstract:ConLike})))
({ <no location info> }
(HsPar
+ (PlaceHolder)
({ <no location info> }
(HsApp
+ (PlaceHolder)
({ <no location info> }
(HsConLikeOut
+ (PlaceHolder)
({abstract:ConLike})))
({ <no location info> }
(HsLit
+ (PlaceHolder)
(HsStringPrim
(NoSourceText)
"main")))))))))
({ <no location info> }
(HsPar
+ (PlaceHolder)
({ <no location info> }
(HsApp
+ (PlaceHolder)
({ <no location info> }
(HsConLikeOut
+ (PlaceHolder)
({abstract:ConLike})))
({ <no location info> }
(HsLit
+ (PlaceHolder)
(HsStringPrim
(NoSourceText)
"DumpTypecheckedAst")))))))))
@@ -258,12 +328,15 @@
[]
({ DumpTypecheckedAst.hs:11:8-23 }
(HsApp
+ (PlaceHolder)
({ DumpTypecheckedAst.hs:11:8-15 }
(HsVar
+ (PlaceHolder)
({ <no location info> }
{Var: putStrLn})))
({ DumpTypecheckedAst.hs:11:17-23 }
(HsLit
+ (PlaceHolder)
(HsString
(SourceText
"\"hello\"")
diff --git a/testsuite/tests/perf/haddock/all.T b/testsuite/tests/perf/haddock/all.T
index bb6f5c02f6..402d170b58 100644
--- a/testsuite/tests/perf/haddock/all.T
+++ b/testsuite/tests/perf/haddock/all.T
@@ -144,7 +144,7 @@ test('haddock.compiler',
[extra_files(['../../../../compiler/stage2/haddock.t']),
unless(in_tree_compiler(), skip), req_haddock
,stats_num_field('bytes allocated',
- [(wordsize(64), 65807004616, 10)
+ [(wordsize(64), 89414230688, 10)
# 2012-08-14: 26070600504 (amd64/Linux)
# 2012-08-29: 26353100288 (amd64/Linux, new CG)
# 2012-09-18: 26882813032 (amd64/Linux)
@@ -167,6 +167,7 @@ test('haddock.compiler',
# 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
+ # 2017-11-12: 89414230688 (amd64/Linux) Trees that grow HsExpr
,(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 40d5a90d78..9cf060937e 100644
--- a/testsuite/tests/quasiquotation/T7918.hs
+++ b/testsuite/tests/quasiquotation/T7918.hs
@@ -29,7 +29,7 @@ traverse a =
gmapM traverse a
where
showVar :: Maybe (HsExpr GhcTc) -> Traverse ()
- showVar (Just (HsVar (L _ v))) =
+ showVar (Just (HsVar _ (L _ v))) =
modify $ \(loc, ids) -> (loc, (varName v, loc) : ids)
showVar _ =
return ()