Commit 74925127 authored by Simon Marlow's avatar Simon Marlow

add test for #3166

parent adb67b43
{-# LANGUAGE TypeOperators #-}
module A where
import B ((:-))
-- assumes :- is right-associative
f :: Int :- Int :- Int
f = (1,(2,3))
module B where
infixr 9 :-
type a :- b = (a,b)
module B where
infixl 9 :-
type a :- b = (a,b)
TOP=../../../..
include $(TOP)/mk/boilerplate.mk
include $(TOP)/mk/test.mk
OBJSUFFIX = .o
# Test that changing the fixity of a type synonym operator forces recompilation
# (see #3166).
recomp006:
$(RM) A.hi A$(OBJSUFFIX)
cp B1.hs B.hs
$(TEST_HC) --make A.hs 1>out 2>err
sleep 1
cp B2.hs B.hs
# This should fail
if $(TEST_HC) --make A.hs; then false; fi
test('recomp006',
[ skip_if_fast, extra_clean(['A.o','A.hi','B.o','B.hi','err','out']) ],
run_command, ['$MAKE -s --no-print-directory recomp006'])
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