diff options
Diffstat (limited to 'testsuite/tests/quasiquotation/qq004')
-rw-r--r-- | testsuite/tests/quasiquotation/qq004/Makefile | 3 | ||||
-rw-r--r-- | testsuite/tests/quasiquotation/qq004/qq004.hs | 9 | ||||
-rw-r--r-- | testsuite/tests/quasiquotation/qq004/qq004.stderr | 4 | ||||
-rw-r--r-- | testsuite/tests/quasiquotation/qq004/test.T | 2 |
4 files changed, 18 insertions, 0 deletions
diff --git a/testsuite/tests/quasiquotation/qq004/Makefile b/testsuite/tests/quasiquotation/qq004/Makefile new file mode 100644 index 0000000000..9101fbd40a --- /dev/null +++ b/testsuite/tests/quasiquotation/qq004/Makefile @@ -0,0 +1,3 @@ +TOP=../../.. +include $(TOP)/mk/boilerplate.mk +include $(TOP)/mk/test.mk diff --git a/testsuite/tests/quasiquotation/qq004/qq004.hs b/testsuite/tests/quasiquotation/qq004/qq004.hs new file mode 100644 index 0000000000..c95b94ef02 --- /dev/null +++ b/testsuite/tests/quasiquotation/qq004/qq004.hs @@ -0,0 +1,9 @@ +{-# LANGUAGE QuasiQuotes #-} +module Main where + +main :: IO () +main = p undefined + where + p = \parse -> case () of + [parse||] -> return () + _ -> return () diff --git a/testsuite/tests/quasiquotation/qq004/qq004.stderr b/testsuite/tests/quasiquotation/qq004/qq004.stderr new file mode 100644 index 0000000000..be61788926 --- /dev/null +++ b/testsuite/tests/quasiquotation/qq004/qq004.stderr @@ -0,0 +1,4 @@ + +qq004.hs:8:21: + GHC stage restriction: parse + is used in a quasiquote, and must be imported, not defined locally diff --git a/testsuite/tests/quasiquotation/qq004/test.T b/testsuite/tests/quasiquotation/qq004/test.T new file mode 100644 index 0000000000..13ecda5dad --- /dev/null +++ b/testsuite/tests/quasiquotation/qq004/test.T @@ -0,0 +1,2 @@ +test('qq004', [req_interp, only_compiler_types(['ghc'])], + compile_fail, ['']) |