Test #11254 in typecheck/should_compile/T11254
authorRichard Eisenberg <eir@cis.upenn.edu>
Tue, 22 Dec 2015 18:34:52 +0000 (13:34 -0500)
committerRichard Eisenberg <eir@cis.upenn.edu>
Sat, 26 Dec 2015 19:00:35 +0000 (14:00 -0500)
testsuite/tests/typecheck/should_compile/T11254.hs [new file with mode: 0644]
testsuite/tests/typecheck/should_compile/all.T

diff --git a/testsuite/tests/typecheck/should_compile/T11254.hs b/testsuite/tests/typecheck/should_compile/T11254.hs
new file mode 100644 (file)
index 0000000..fcaae9c
--- /dev/null
@@ -0,0 +1,19 @@
+-- /tmp/panic.hs
+{-# LANGUAGE FlexibleContexts        #-}
+{-# LANGUAGE FlexibleInstances       #-}
+{-# LANGUAGE InstanceSigs            #-}
+{-# LANGUAGE TypeFamilies            #-}
+{-# LANGUAGE TypeSynonymInstances    #-}
+{-# LANGUAGE UndecidableSuperClasses #-}
+{-# OPTIONS_GHC -fdefer-type-errors #-}
+
+module T11254 where
+
+class (Frac (Frac a) ~ Frac a, Fractional (Frac a), ID (Frac a)) => ID a where
+  type Frac a
+  embed :: a -> Frac a
+
+instance ID Rational where
+  type Frac Rational = Int
+  embed :: Rational -> Rational
+  embed = undefined
index 8002299..20ef3a7 100644 (file)
@@ -485,3 +485,4 @@ test('T10935', normal, compile, [''])
 test('T10971a', normal, compile, [''])
 test('T11237', normal, compile, [''])
 test('T10592', normal, compile, [''])
+test('T11254', expect_broken(11254), compile, [''])