diff options
Diffstat (limited to 'testsuite/tests/th/TH_spliceDecl4_Lib.hs')
-rw-r--r-- | testsuite/tests/th/TH_spliceDecl4_Lib.hs | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/testsuite/tests/th/TH_spliceDecl4_Lib.hs b/testsuite/tests/th/TH_spliceDecl4_Lib.hs new file mode 100644 index 0000000000..104cba33c6 --- /dev/null +++ b/testsuite/tests/th/TH_spliceDecl4_Lib.hs @@ -0,0 +1,21 @@ + +{-# LANGUAGE TemplateHaskell, UndecidableInstances #-} + +module TH_spliceDecl4_Lib( + instanceIncrSelfTuple, + IncrSelf(..) +) +where +import Control.Monad +import Data.Maybe +import Language.Haskell.TH + +class IncrSelf a where + incrSelf :: a -> a + + + +instanceIncrSelfTuple :: Int -> Q [Dec] +instanceIncrSelfTuple n = [d| incrSelf value = True |] + + |