summaryrefslogtreecommitdiff
path: root/testsuite/tests/quasiquotation/qq005/Main.hs
diff options
context:
space:
mode:
Diffstat (limited to 'testsuite/tests/quasiquotation/qq005/Main.hs')
-rw-r--r--testsuite/tests/quasiquotation/qq005/Main.hs13
1 files changed, 13 insertions, 0 deletions
diff --git a/testsuite/tests/quasiquotation/qq005/Main.hs b/testsuite/tests/quasiquotation/qq005/Main.hs
new file mode 100644
index 0000000000..d8c8a3433c
--- /dev/null
+++ b/testsuite/tests/quasiquotation/qq005/Main.hs
@@ -0,0 +1,13 @@
+{-# LANGUAGE QuasiQuotes #-}
+module Main where
+
+import Expr
+
+main :: IO ()
+main = do print $ eval [expr|1 + 3 + 5|]
+ case [expr|2|] of
+ [expr|$n|] -> print n
+ _ -> return ()
+ case [$expr|1 + 2|] of
+ [expr|$x + $y|] -> putStrLn $ show x ++ " + " ++ show y
+ _ -> return ()