Record evaluated-ness on workers and wrappers
[ghc.git] / testsuite / tests / stranal / should_compile / T13077a.hs
1 {-# LANGUAGE MagicHash #-}
2 module T13077a where
3
4 import GHC.Exts
5
6 data X = A | B | C
7
8 data T = MkT !X Int# Int#
9
10 g :: Int -> T
11 g 0 = MkT A 1# 2#
12 g n = g (n-1)
13
14 boo :: Int -> T
15 boo k = case g k of
16 MkT x n _ -> let v = case x of
17 A -> 1#
18 B -> 2#
19 C -> n
20 in MkT x v v
21 -- Tests evaluated-ness for CPR