From 16514f272fb42af6e9c7674a9bd6c9dce369231f Mon Sep 17 00:00:00 2001 From: David Terei Date: Wed, 20 Jul 2011 11:09:03 -0700 Subject: Move tests from tests/ghc-regress/* to just tests/* --- testsuite/tests/th/TH_NestedSplices_Lib.hs | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 testsuite/tests/th/TH_NestedSplices_Lib.hs (limited to 'testsuite/tests/th/TH_NestedSplices_Lib.hs') diff --git a/testsuite/tests/th/TH_NestedSplices_Lib.hs b/testsuite/tests/th/TH_NestedSplices_Lib.hs new file mode 100644 index 0000000000..91d6173b91 --- /dev/null +++ b/testsuite/tests/th/TH_NestedSplices_Lib.hs @@ -0,0 +1,14 @@ +{-# LANGUAGE TemplateHaskell #-} +module TH_NestedSplices_Lib where + +import Language.Haskell.TH + +spliceExpr :: String -> Q Exp -> Q Exp +spliceExpr s e = [| (s, $e) |] + +declareFun :: String -> Q [Dec] +declareFun s + = do { n <- newName s + ; d <- funD n [clause [] (normalB [| 22 |]) []] + ; return [d] } + -- cgit v1.2.1