Commit 4313fb58 authored by Simon Marlow's avatar Simon Marlow
Browse files

add a test for #4469

parent 2919d9a8
module A (T,t) where
data T = T
t = T
instance Eq T where
t1 == t2 = True
module A (T,t) where
data T = T
t = T
instance Eq T where
t1 == t2 = False
module Main where
import B
main = print (t == t)
TOP=../../../..
include $(TOP)/mk/boilerplate.mk
include $(TOP)/mk/test.mk
Main.o : B.hi
B.o : A.hi
%.o : %.hs
$(TEST_HC) -O -c $< -o $@
# magic .hi rule: see rules/hi-rule.mk in the GHC source tree
%.hi : %.o ;
prog : A.o B.o Main.o
$(TEST_HC) -o prog A.o B.o Main.o
clean :
$(RM) *.hi *.o prog
recomp008 :
$(MAKE) clean
cp A1.hs A.hs
$(MAKE) prog
./prog
cp A2.hs A.hs
$(MAKE) prog
./prog
# Test for #4469, a recompilation bug related to instances
test('recomp008',
[ skip_if_fast, clean_cmd('$MAKE -s clean'), normalise_slashes ],
run_command,
['$MAKE -s --no-print-directory recomp008'])
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