[commit: testsuite] master: Test Trac #8002 (76ae475)

Simon Peyton Jones simonpj at microsoft.com
Mon Jun 24 19:11:30 CEST 2013


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

On branch  : master

https://github.com/ghc/testsuite/commit/76ae4756dce1ed536811e32763e88c8f7b304738

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

commit 76ae4756dce1ed536811e32763e88c8f7b304738
Author: Simon Peyton Jones <simonpj at microsoft.com>
Date:   Mon Jun 24 18:11:14 2013 +0100

    Test Trac #8002

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

 tests/indexed-types/should_compile/Makefile  |    6 ++++++
 tests/indexed-types/should_compile/T8002.hs  |    4 ++++
 tests/indexed-types/should_compile/T8002a.hs |   13 +++++++++++++
 tests/indexed-types/should_compile/T8002b.hs |    5 +++++
 tests/indexed-types/should_compile/all.T     |    5 +++++
 5 files changed, 33 insertions(+), 0 deletions(-)

diff --git a/tests/indexed-types/should_compile/Makefile b/tests/indexed-types/should_compile/Makefile
index f2cdc10..22710ed 100644
--- a/tests/indexed-types/should_compile/Makefile
+++ b/tests/indexed-types/should_compile/Makefile
@@ -25,3 +25,9 @@ T6152:
 	$(RM) T6152.o T6152.hi 
 	'$(TEST_HC)' $(TEST_HC_OPTS) -c T6152.hs
 	'$(TEST_HC)' $(TEST_HC_OPTS) -c T6152.hs -fforce-recomp
+
+T8002:
+	$(RM) T8002a.o T8002a.hi T8002b.o T8002b.hi 
+	'$(TEST_HC)' $(TEST_HC_OPTS) -c T8002b.hs
+	'$(TEST_HC)' $(TEST_HC_OPTS) -c T8002a.hs
+	'$(TEST_HC)' $(TEST_HC_OPTS) -c T8002.hs
diff --git a/tests/indexed-types/should_compile/T8002.hs b/tests/indexed-types/should_compile/T8002.hs
new file mode 100644
index 0000000..d90a502
--- /dev/null
+++ b/tests/indexed-types/should_compile/T8002.hs
@@ -0,0 +1,4 @@
+{-# LANGUAGE TypeFamilies #-}
+module T8002 where
+
+import T8002a
diff --git a/tests/indexed-types/should_compile/T8002a.hs b/tests/indexed-types/should_compile/T8002a.hs
new file mode 100644
index 0000000..98ac39e
--- /dev/null
+++ b/tests/indexed-types/should_compile/T8002a.hs
@@ -0,0 +1,13 @@
+{-# LANGUAGE UndecidableInstances #-}
+{-# LANGUAGE TypeFamilies #-}
+
+module T8002a where
+
+import T8002b
+
+class QA a where
+   type QRep a
+   type QRep a = QRep (Maybe a)
+
+instance QA () where
+   type QRep () = ()
diff --git a/tests/indexed-types/should_compile/T8002b.hs b/tests/indexed-types/should_compile/T8002b.hs
new file mode 100644
index 0000000..073f930
--- /dev/null
+++ b/tests/indexed-types/should_compile/T8002b.hs
@@ -0,0 +1,5 @@
+{-# LANGUAGE TypeFamilies #-}
+module T8002b where
+
+type family Rep a
+type instance Rep Int = Int
diff --git a/tests/indexed-types/should_compile/all.T b/tests/indexed-types/should_compile/all.T
index 419008c..9575cf1 100644
--- a/tests/indexed-types/should_compile/all.T
+++ b/tests/indexed-types/should_compile/all.T
@@ -214,3 +214,8 @@ test('T7804', normal, compile, [''])
 test('T7837', normal, compile, ['-O -ddump-rule-firings'])
 test('T4185', normal, compile, [''])
 
+# Cuased infinite loop in the compiler
+test('T8002',
+     normal,
+     run_command,
+     ['$MAKE -s --no-print-directory T8002'])





More information about the ghc-commits mailing list