From: simonmar Date: Thu, 17 Aug 2000 16:15:15 +0000 (+0000) Subject: [project @ 2000-08-17 16:15:15 by simonmar] X-Git-Tag: Approximately_9120_patches~3868 X-Git-Url: http://git.megacz.com/?a=commitdiff_plain;h=029814aafcf4f842d80f17b211752a6dfb3d1eba;p=ghc-hetmet.git [project @ 2000-08-17 16:15:15 by simonmar] Add some tests for unboxing strict record fields. --- diff --git a/ghc/tests/deSugar/should_compile/Makefile b/ghc/tests/deSugar/should_compile/Makefile index 08a1c3e..eaeae14 100644 --- a/ghc/tests/deSugar/should_compile/Makefile +++ b/ghc/tests/deSugar/should_compile/Makefile @@ -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 diff --git a/ghc/tests/deSugar/should_compile/ds046.hs b/ghc/tests/deSugar/should_compile/ds046.hs index 15d7199..191e943 100644 --- a/ghc/tests/deSugar/should_compile/ds046.hs +++ b/ghc/tests/deSugar/should_compile/ds046.hs @@ -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