summaryrefslogtreecommitdiff
path: root/testsuite/tests/ghc-api/annotations
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/ghc-api/annotations
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/ghc-api/annotations')
-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
3 files changed, 8 insertions, 6 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) _) _)