Repository : ssh://darcs.haskell.org//srv/darcs/testsuite

On branch  : master

http://hackage.haskell.org/trac/ghc/changeset/0b4b7a9480b4ba5f7b7019a611e51c8ec4b4b31c

>---------------------------------------------------------------

commit 0b4b7a9480b4ba5f7b7019a611e51c8ec4b4b31c
Author: Richard Eisenberg <e...@cis.upenn.edu>
Date:   Tue Jan 8 23:31:55 2013 -0500

    Add new testcase for Trac #7560.

>---------------------------------------------------------------

 tests/indexed-types/should_fail/T7560.hs     |   13 +++++++++++++
 tests/indexed-types/should_fail/T7560.stderr |    5 +++++
 tests/indexed-types/should_fail/all.T        |    2 ++
 3 files changed, 20 insertions(+), 0 deletions(-)

diff --git a/tests/indexed-types/should_fail/T7560.hs 
b/tests/indexed-types/should_fail/T7560.hs
new file mode 100644
index 0000000..0176c5a
--- /dev/null
+++ b/tests/indexed-types/should_fail/T7560.hs
@@ -0,0 +1,13 @@
+{-# LANGUAGE TypeFamilies #-}
+
+module T7560 where
+
+type family F a
+
+type instance where
+  F Int = Int
+  F Bool = Bool
+
+type instance where
+  F Int = Char
+  F Double = Double
\ No newline at end of file
diff --git a/tests/indexed-types/should_fail/T7560.stderr 
b/tests/indexed-types/should_fail/T7560.stderr
new file mode 100644
index 0000000..e382fb3
--- /dev/null
+++ b/tests/indexed-types/should_fail/T7560.stderr
@@ -0,0 +1,5 @@
+
+T7560.hs:8:3:
+    Conflicting family instance declarations:
+      F Int -- Defined at T7560.hs:8:3
+      F Int -- Defined at T7560.hs:12:3
diff --git a/tests/indexed-types/should_fail/all.T 
b/tests/indexed-types/should_fail/all.T
index 4cd78ce..316e1ff 100644
--- a/tests/indexed-types/should_fail/all.T
+++ b/tests/indexed-types/should_fail/all.T
@@ -94,3 +94,5 @@ test('T7354a',
      run_command,
      ['$MAKE -s --no-print-directory T7354a'])
 test('T7536', normal, compile_fail, [''])
+
+test('T7560', normal, compile_fail, [''])
\ No newline at end of file



_______________________________________________
Cvs-ghc mailing list
Cvs-ghc@haskell.org
http://www.haskell.org/mailman/listinfo/cvs-ghc

Reply via email to