Commit 251a376b authored by Simon Peyton Jones's avatar Simon Peyton Jones

Test Trac #3990

parent 9421b0c7
......@@ -2,6 +2,11 @@ TOP=../../..
include $(TOP)/mk/boilerplate.mk
include $(TOP)/mk/test.mk
T3990:
$(RM) -f T3990.o T3990.hi
'$(TEST_HC)' $(TEST_HC_OPTS) -O -c -ddump-simpl T3990.hs | grep 'test_case'
# Grep output should show an unpacked constructor
T8832:
$(RM) -f T8832.o T8832.hi
'$(TEST_HC)' $(TEST_HC_OPTS) $(T8832_WORDSIZE_OPTS) -O -c -ddump-simpl T8832.hs | grep '^[a-zA-Z0-9]\+ ='
......
{-# LANGUAGE TypeFamilies #-}
module T3990 where
data family Complex a
data instance Complex Double = CD {-# UNPACK #-} !Double
{-# UNPACK #-} !Double
data T = T {-# UNPACK #-} !(Complex Double)
-- This shouuld actually get unpacked!
test_case :: T
test_case = T (CD 1 1)
test_case :: T
test_case = T3990.T 1.0## 1.0##
......@@ -232,3 +232,7 @@ test('T11232', normal, compile, ['-O2'])
test('T11562', normal, compile, ['-O2'])
test('T11742', normal, compile, ['-O2'])
test('T11644', normal, compile, ['-O2'])
test('T3990',
normal,
run_command,
['$MAKE -s --no-print-directory T3990'])
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment