Commit 0ce11aed authored by Ben Gamari's avatar Ben Gamari Committed by Ben Gamari

Add test to ensure that SPEC rules are named deterministically

Test Plan: Validate

Reviewers: niteria, austin, dfeuer

Reviewed By: dfeuer

Subscribers: simonpj, thomie

Differential Revision:
parent d5e0b4bd
-- | Test that SPEC rules are named deterministically.
module A where
test1 :: Num a => a -> a -> a
test1 x y = x + 42 * y
{-# SPECIALISE test1 :: Int -> Int -> Int #-}
include $(TOP)/mk/
include $(TOP)/mk/
$(RM) A.hi A.o
'$(TEST_HC)' $(TEST_HC_OPTS) -O -dinitial-unique=0 -dunique-increment=1 A.hs
$(CP) A.hi A.normal.hi
$(RM) A.hi A.o
'$(TEST_HC)' $(TEST_HC_OPTS) -O -dinitial-unique=16777215 -dunique-increment=-1 A.hs
diff A.hi A.normal.hi
test('determ022', [extra_files(['A.hs'])], run_command, ['$MAKE -s --no-print-directory determ022'])
[1 of 1] Compiling A ( A.hs, A.o )
[1 of 1] Compiling A ( A.hs, A.o )
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