[project @ 2000-08-17 16:15:15 by simonmar]
authorsimonmar <unknown>
Thu, 17 Aug 2000 16:15:15 +0000 (16:15 +0000)
committersimonmar <unknown>
Thu, 17 Aug 2000 16:15:15 +0000 (16:15 +0000)
Add some tests for unboxing strict record fields.

ghc/tests/deSugar/should_compile/Makefile
ghc/tests/deSugar/should_compile/ds046.hs

index 08a1c3e..eaeae14 100644 (file)
@@ -5,7 +5,7 @@ include $(TOP)/mk/should_compile.mk
 SRC_HC_OPTS += -dcore-lint
 
 ds035_HC_OPTS = -fglasgow-exts
-ds044_HC_OPTS = -O -funbox-strict-fields
+ds046_HC_OPTS = -O -funbox-strict-fields
 ds049_HC_OPTS = -fvia-C
 ds050_HC_OPTS = -fglasgow-exts
 
index 15d7199..191e943 100644 (file)
@@ -28,3 +28,9 @@ j (C (a,b)) = a + b
 data D a b = D Int !(a,b) !(E Int)
 data E a = E a
 k (D a (b,c) (E d)) = a + b + c + d
+
+-- test 6: records
+data F a b = F { x :: !Int, y :: !(Float,Float), z :: !(a,b) }
+l F{x = a} = a
+m (F a b c) = a
+n F{z = (a,b)} = a