hadrian: Add support for bindist compressors other than Xz
[ghc.git] / testsuite / tests / typecheck / should_compile / UnboxStrictPrimitiveFields.hs
1 {-# LANGUAGE MagicHash #-}
2 {-# OPTIONS_GHC -funbox-small-strict-fields #-}
3 module Test where
4
5 import GHC.Exts
6
7 -- The following should be unboxed automatically:
8 data A = A Int#
9 data B = B !A
10 data C = C !()
11 data D = D !B
12 data E = E !D !D
13
14 d = D (B (A 0#))
15 e = E d d
16
17 data F = F Int#
18 newtype G = G F
19 data H = H !G !G
20
21 h = H (G (F 1#)) (G (F 1#))
22
23 -- This should not be unboxed:
24
25 data I = I !H !H
26
27 i = I h h
28