d172270b1260b07f0d13c71c18a904c27515ff06
[ghc.git] / testsuite / tests / polykinds / T8359.hs
1 {-# LANGUAGE ConstraintKinds, MultiParamTypeClasses #-}
2 module T8359 where
3
4 class DifferentTypes a b
5
6 type DifferentTypes3 a b c = (DifferentTypes a b, DifferentTypes b c, DifferentTypes a c)
7
8 class Foo a
9
10 class Bar a
11
12 -- Buggy instance requires UndecidableInstances to compile
13
14 instance (DifferentTypes3 a b c, Bar a, Bar b, Bar c) => Foo (a, b, c)
15
16 -- Equivalent instance compiles when manually expanding constraint type
17 -- instance (DifferentTypes a b, DifferentTypes b c, DifferentTypes a c, Bar a, Bar b, Bar c) => Foo (a, b, c)