diff options
Diffstat (limited to 'testsuite/tests/polykinds/T8359.hs')
-rw-r--r-- | testsuite/tests/polykinds/T8359.hs | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/testsuite/tests/polykinds/T8359.hs b/testsuite/tests/polykinds/T8359.hs new file mode 100644 index 0000000000..d172270b12 --- /dev/null +++ b/testsuite/tests/polykinds/T8359.hs @@ -0,0 +1,17 @@ +{-# LANGUAGE ConstraintKinds, MultiParamTypeClasses #-} +module T8359 where + +class DifferentTypes a b + +type DifferentTypes3 a b c = (DifferentTypes a b, DifferentTypes b c, DifferentTypes a c) + +class Foo a + +class Bar a + +-- Buggy instance requires UndecidableInstances to compile + +instance (DifferentTypes3 a b c, Bar a, Bar b, Bar c) => Foo (a, b, c) + +-- Equivalent instance compiles when manually expanding constraint type +-- instance (DifferentTypes a b, DifferentTypes b c, DifferentTypes a c, Bar a, Bar b, Bar c) => Foo (a, b, c) |