testsuite: Add testcase for #13248
authorBen Gamari <ben@smart-cactus.org>
Thu, 9 Feb 2017 04:31:04 +0000 (23:31 -0500)
committerBen Gamari <ben@smart-cactus.org>
Thu, 9 Feb 2017 21:34:01 +0000 (16:34 -0500)
testsuite/tests/typecheck/should_compile/T13248.hs [new file with mode: 0644]
testsuite/tests/typecheck/should_compile/all.T

diff --git a/testsuite/tests/typecheck/should_compile/T13248.hs b/testsuite/tests/typecheck/should_compile/T13248.hs
new file mode 100644 (file)
index 0000000..b2eebc7
--- /dev/null
@@ -0,0 +1,12 @@
+{-# LANGUAGE TypeFamilies, TypeFamilyDependencies, UndecidableInstances #-}
+
+type family Foo a = r | r -> a where
+        Foo Int = Char
+        Foo Integer = String
+
+type family Bar a = r | r -> a where
+        Bar Char = Double
+        Bar String = Float
+
+type family Baz a = r | r -> a where
+        Baz x = Bar (Foo x)
index ccebf75..7d2e3c6 100644 (file)
@@ -535,3 +535,4 @@ test('T13083', normal, compile, [''])
 test('T11723', normal, compile, [''])
 test('T12987', normal, compile, [''])
 test('T11736', normal, compile, [''])
+test('T13248', expect_broken(13248), compile, [''])