summaryrefslogtreecommitdiff
path: root/testsuite
diff options
context:
space:
mode:
Diffstat (limited to 'testsuite')
-rw-r--r--testsuite/tests/ghc-api/annotations/stringSource.hs10
-rw-r--r--testsuite/tests/ghc-api/annotations/t11430.hs2
-rw-r--r--testsuite/tests/printer/Ppr047.hs1
-rw-r--r--testsuite/tests/printer/all.T2
4 files changed, 9 insertions, 6 deletions
diff --git a/testsuite/tests/ghc-api/annotations/stringSource.hs b/testsuite/tests/ghc-api/annotations/stringSource.hs
index 8bae838672..3d053a3d7c 100644
--- a/testsuite/tests/ghc-api/annotations/stringSource.hs
+++ b/testsuite/tests/ghc-api/annotations/stringSource.hs
@@ -80,11 +80,15 @@ 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 (HsPragE _ prag _) = doPragE prag
doHsExpr _ = []
+ doPragE :: HsPragE GhcPs -> [(String,[Located (SourceText,FastString)])]
+ doPragE (HsPragCore _ src ss) = [("co",[conv (noLoc ss)])]
+ doPragE (HsPragSCC _ src ss) = [("sc",[conv (noLoc ss)])]
+ doPragE (HsPragTick _ src (ss,_,_) _ss2) = [("tp",[conv (noLoc ss)])]
+ doPragE (XHsPragE x) = noExtCon x
+
conv (GHC.L l (StringLiteral st fs)) = GHC.L l (st,fs)
showAnns anns = "[\n" ++ (intercalate "\n"
diff --git a/testsuite/tests/ghc-api/annotations/t11430.hs b/testsuite/tests/ghc-api/annotations/t11430.hs
index f161e601ce..4b60097a69 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 (HsPragE _ (HsPragTick _ src (_,_,_) ss) _) = [("tp",[show ss])]
doHsExpr _ = []
doInline (InlinePragma _ _ _ (ActiveBefore (SourceText ss) _) _)
diff --git a/testsuite/tests/printer/Ppr047.hs b/testsuite/tests/printer/Ppr047.hs
index 3ef54c4b38..e7f36850b0 100644
--- a/testsuite/tests/printer/Ppr047.hs
+++ b/testsuite/tests/printer/Ppr047.hs
@@ -1,4 +1,3 @@
module ExprPragmas where
--- Should it be possible to ppr the following annotation?
c = {-# GENERATED "foobar" 1 : 2 - 3 : 4 #-} 0.00
diff --git a/testsuite/tests/printer/all.T b/testsuite/tests/printer/all.T
index 3440f57458..83bfd234fc 100644
--- a/testsuite/tests/printer/all.T
+++ b/testsuite/tests/printer/all.T
@@ -44,7 +44,7 @@ test('Ppr043', [ignore_stderr, req_rts_linker], makefile_test, ['ppr043'])
test('Ppr044', ignore_stderr, makefile_test, ['ppr044'])
test('Ppr045', ignore_stderr, makefile_test, ['ppr045'])
test('Ppr046', ignore_stderr, makefile_test, ['ppr046'])
-test('Ppr047', expect_fail, makefile_test, ['ppr047'])
+test('Ppr047', ignore_stderr, makefile_test, ['ppr047'])
test('Ppr048', ignore_stderr, makefile_test, ['ppr048'])
test('T13199', [ignore_stderr, req_rts_linker], makefile_test, ['T13199'])
test('T13050p', ignore_stderr, makefile_test, ['T13050p'])