blob: 396e4cab9f05ac5d4c9d7ded1d9e6a5717dcb306 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
|
{-# LANGUAGE MagicHash #-}
module M where
import GHC.Exts
import GHC.IO
data T a = MkT !Bool !a
fun :: T a -> IO a
{-# OPAQUE fun #-}
fun (MkT _ x) = IO $ \s -> noinline seq# x s
-- evaluate/seq# should not produce its own eval for x
-- since it is properly tagged (from a strict field)
-- uses noinline to prevent caseRules from eliding the seq# in Core
|