summaryrefslogtreecommitdiff
path: root/tests/examples/ghc86/TH_spliceE5_Lib.hs
diff options
context:
space:
mode:
Diffstat (limited to 'tests/examples/ghc86/TH_spliceE5_Lib.hs')
-rw-r--r--tests/examples/ghc86/TH_spliceE5_Lib.hs10
1 files changed, 10 insertions, 0 deletions
diff --git a/tests/examples/ghc86/TH_spliceE5_Lib.hs b/tests/examples/ghc86/TH_spliceE5_Lib.hs
new file mode 100644
index 0000000..e88d6f5
--- /dev/null
+++ b/tests/examples/ghc86/TH_spliceE5_Lib.hs
@@ -0,0 +1,10 @@
+{-# LANGUAGE TemplateHaskell #-}
+module TH_spliceE5_Lib where
+
+import Language.Haskell.TH
+
+expandVars :: [String] -> Q Exp
+expandVars s = [| concat $(return (ListE (map f s))) |]
+ where
+ f x = VarE (mkName x)
+