From 029814aafcf4f842d80f17b211752a6dfb3d1eba Mon Sep 17 00:00:00 2001 From: simonmar Date: Thu, 17 Aug 2000 16:15:15 +0000 Subject: [PATCH] [project @ 2000-08-17 16:15:15 by simonmar] Add some tests for unboxing strict record fields. --- ghc/tests/deSugar/should_compile/Makefile | 2 +- ghc/tests/deSugar/should_compile/ds046.hs | 6 ++++++ 2 files changed, 7 insertions(+), 1 deletion(-) 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 -- 1.7.10.4