diff options
author | Simon Peyton Jones <simonpj@microsoft.com> | 2013-10-01 18:26:54 +0100 |
---|---|---|
committer | Simon Peyton Jones <simonpj@microsoft.com> | 2013-10-01 18:26:54 +0100 |
commit | bd0c90055627b66d19d93bb0445b3c099030259e (patch) | |
tree | 344b152faa1594198dd13ebf71b9e592325ddea1 /testsuite/tests/polykinds/T8359.hs | |
parent | 0ad7cdb3aee3100a7a573a6647de7333ab10aa6a (diff) | |
download | haskell-bd0c90055627b66d19d93bb0445b3c099030259e.tar.gz |
Test Trac #8359
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) |