Testsuite: delete Windows line endings [skip ci] (#11631)
[ghc.git] / testsuite / tests / th / TH_NestedSplices_Lib.hs
1 {-# LANGUAGE TemplateHaskell #-}
2 module TH_NestedSplices_Lib where
3
4 import Language.Haskell.TH
5
6 spliceExpr :: String -> Q Exp -> Q Exp
7 spliceExpr s e = [| (s, $e) |]
8
9 declareFun :: String -> Q [Dec]
10 declareFun s
11 = do { n <- newName s
12 ; d <- funD n [clause [] (normalB [| 22 |]) []]
13 ; return [d] }
14