diff options
Diffstat (limited to 'testsuite/tests/th/TH_pragma.hs')
-rw-r--r-- | testsuite/tests/th/TH_pragma.hs | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/testsuite/tests/th/TH_pragma.hs b/testsuite/tests/th/TH_pragma.hs new file mode 100644 index 0000000000..a78b5483fe --- /dev/null +++ b/testsuite/tests/th/TH_pragma.hs @@ -0,0 +1,12 @@ +{-# OPTIONS -ddump-splices #-} +{-# LANGUAGE TemplateHaskell #-} +module TH_pragma where + + +$( [d| foo :: Int -> Int + {-# NOINLINE foo #-} + foo x = x + 1 |] ) + +$( [d| bar :: Num a => a -> a + {-# SPECIALISE INLINE [~1] bar :: Float -> Float #-} + bar x = x * 10 |] ) |