summaryrefslogtreecommitdiff
path: root/libraries/compact/tests/compact_function.hs
blob: fc4f4ca1722116cd1b2ba000dec34a8856093a38 (plain)
1
2
3
4
5
6
7
8
9
10
import Control.DeepSeq
import Control.Exception
import Data.Compact

data HiddenFunction = HiddenFunction (Int -> Int)

instance NFData HiddenFunction where
  rnf x = x `seq` () -- ignore the function inside

main = compact (HiddenFunction (+1))