[commit: testsuite] master: Test Trac #5792 (92ba301)
Simon Peyton Jones
simonpj at microsoft.com
Mon Feb 6 09:44:51 CET 2012
Repository : ssh://darcs.haskell.org//srv/darcs/testsuite
On branch : master
http://hackage.haskell.org/trac/ghc/changeset/92ba30165d5769012bee0b88f57fa79f2549966e
>---------------------------------------------------------------
commit 92ba30165d5769012bee0b88f57fa79f2549966e
Author: Simon Peyton Jones <simonpj at microsoft.com>
Date: Thu Feb 2 11:40:36 2012 +0000
Test Trac #5792
>---------------------------------------------------------------
tests/typecheck/should_compile/Makefile | 6 ++++++
tests/typecheck/should_compile/T5792.hs | 10 ++++++++++
tests/typecheck/should_compile/all.T | 2 ++
3 files changed, 18 insertions(+), 0 deletions(-)
diff --git a/tests/typecheck/should_compile/Makefile b/tests/typecheck/should_compile/Makefile
index 9ca0b63..36e924a 100644
--- a/tests/typecheck/should_compile/Makefile
+++ b/tests/typecheck/should_compile/Makefile
@@ -24,3 +24,9 @@ tc245:
$(RM) -f tc245.hi tc245.o
'$(TEST_HC)' $(filter-out -fforce-recomp,$(TEST_HC_OPTS)) --make tc245
+# Trac #5792 gave an error on the second compilation,
+# presumably because of the .hi file
+T5792:
+ $(RM) -f T5792.o T5792.hi
+ '$(TEST_HC)' -c T5792.hs
+ '$(TEST_HC)' -c T5792.hs -fforce-recomp
diff --git a/tests/typecheck/should_compile/T5792.hs b/tests/typecheck/should_compile/T5792.hs
new file mode 100644
index 0000000..49d0826
--- /dev/null
+++ b/tests/typecheck/should_compile/T5792.hs
@@ -0,0 +1,10 @@
+{-# LANGUAGE DataKinds, TypeFamilies, UndecidableInstances #-}
+
+module T5792 where
+
+
+data T = TT
+type family Compare (m :: T) :: Ordering
+type instance Compare TT = Compare TT
+
+type Compare' a = Compare a
diff --git a/tests/typecheck/should_compile/all.T b/tests/typecheck/should_compile/all.T
index a4ad3cf..ce6f95e 100644
--- a/tests/typecheck/should_compile/all.T
+++ b/tests/typecheck/should_compile/all.T
@@ -371,3 +371,5 @@ test('T5595', normal, compile, [''])
test('T5676', normal, compile, [''])
test('T4310', normal, compile, [''])
+test('T5792',normal,run_command,
+ ['$MAKE -s --no-print-directory T5792'])
More information about the Cvs-ghc
mailing list