summaryrefslogtreecommitdiff
path: root/testsuite/tests/ghc-regress/th/TH_pragma.hs
blob: a78b5483fe58e55ff6fa5a6eeecb10fd6df33552 (plain)
1
2
3
4
5
6
7
8
9
10
11
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        |] )