summaryrefslogtreecommitdiff
path: root/tests/examples/ghc86/TH_spliceE4.hs
diff options
context:
space:
mode:
Diffstat (limited to 'tests/examples/ghc86/TH_spliceE4.hs')
-rw-r--r--tests/examples/ghc86/TH_spliceE4.hs13
1 files changed, 13 insertions, 0 deletions
diff --git a/tests/examples/ghc86/TH_spliceE4.hs b/tests/examples/ghc86/TH_spliceE4.hs
new file mode 100644
index 0000000..8844c72
--- /dev/null
+++ b/tests/examples/ghc86/TH_spliceE4.hs
@@ -0,0 +1,13 @@
+{-# LANGUAGE TemplateHaskell #-}
+module Main where
+
+import Language.Haskell.TH
+
+$( do let h x = x
+ foo = [| \x -> $(h [| x |]) |]
+
+ [d| baz = $foo |]
+ )
+
+main = print (baz "Hello")
+