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

On branch  : master

http://hackage.haskell.org/trac/ghc/changeset/ee5eb7ed23893470dcb92ef05c8bc4d6547aba7e

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

commit ee5eb7ed23893470dcb92ef05c8bc4d6547aba7e
Author: Simon Peyton Jones <[email protected]>
Date:   Wed Mar 28 13:24:03 2012 +0100

    Test Trac #5955

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

 tests/indexed-types/should_compile/Makefile  |    5 +++++
 tests/indexed-types/should_compile/T5955.hs  |    7 +++++++
 tests/indexed-types/should_compile/T5955a.hs |   13 +++++++++++++
 tests/indexed-types/should_compile/all.T     |    6 ++++++
 4 files changed, 31 insertions(+), 0 deletions(-)

diff --git a/tests/indexed-types/should_compile/Makefile 
b/tests/indexed-types/should_compile/Makefile
index a5dfe03..e37855c 100644
--- a/tests/indexed-types/should_compile/Makefile
+++ b/tests/indexed-types/should_compile/Makefile
@@ -13,3 +13,8 @@ IndTypesPerf:
        $(RM) IndTypesPerfMerge.o IndTypesPerfMerge.hi
        '$(TEST_HC)' $(TEST_HC_OPTS) -O -c IndTypesPerfMerge.hs +RTS -M20M
        '$(TEST_HC)' $(TEST_HC_OPTS) -O -c IndTypesPerf.hs      +RTS -M20M
+
+T5955:
+       $(RM) T5955.o T5955.hi T5955a.o T5955a.hi 
+       '$(TEST_HC)' $(TEST_HC_OPTS) -c T5955a.hs
+       '$(TEST_HC)' $(TEST_HC_OPTS) -c T5955.hs
diff --git a/tests/indexed-types/should_compile/T5955.hs 
b/tests/indexed-types/should_compile/T5955.hs
new file mode 100644
index 0000000..0d92239
--- /dev/null
+++ b/tests/indexed-types/should_compile/T5955.hs
@@ -0,0 +1,7 @@
+module T5955 where
+
+import T5955a
+
+
+foo :: ()
+foo = ()
diff --git a/tests/indexed-types/should_compile/T5955a.hs 
b/tests/indexed-types/should_compile/T5955a.hs
new file mode 100644
index 0000000..b9d4ea2
--- /dev/null
+++ b/tests/indexed-types/should_compile/T5955a.hs
@@ -0,0 +1,13 @@
+{-# LANGUAGE FlexibleContexts #-}
+{-# LANGUAGE TypeFamilies #-}
+
+module T5955a where
+
+
+class (Eq (Multi a)) => MultiPrim a where
+    data Multi a
+
+instance MultiPrim Int where
+    newtype Multi Int = MultiInt Int deriving (Eq)
+
+
diff --git a/tests/indexed-types/should_compile/all.T 
b/tests/indexed-types/should_compile/all.T
index fd39b36..9253673 100644
--- a/tests/indexed-types/should_compile/all.T
+++ b/tests/indexed-types/should_compile/all.T
@@ -182,3 +182,9 @@ test('ClassEqContext3', normal, compile, [''])
 test('HO', normal, compile, [''])
 
 
+# The point about this test is that it compiles the two T5955
+# modules *separately*
+test('T5955',
+     extra_clean(['T5955.o', 'T5955.hi', 'T5955a.o', 'T5955a.hi']),
+     run_command,
+     ['$MAKE -s --no-print-directory T5955'])



_______________________________________________
Cvs-ghc mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/cvs-ghc

Reply via email to