TH_pragma.hs 232 Bytes
Newer Older
1
2
3
4
5
6
7
8
9
10
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        |] )