summaryrefslogtreecommitdiff
path: root/testsuite/tests/quasiquotation/qq005/Main.hs
blob: d8c8a3433c419cd80bab3d548ddb9b60d8f8bd30 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
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 ()