diff options
Diffstat (limited to 'testsuite/tests/typecheck/should_fail/tcfail154.hs')
-rw-r--r-- | testsuite/tests/typecheck/should_fail/tcfail154.hs | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/testsuite/tests/typecheck/should_fail/tcfail154.hs b/testsuite/tests/typecheck/should_fail/tcfail154.hs new file mode 100644 index 0000000000..6e3161bd46 --- /dev/null +++ b/testsuite/tests/typecheck/should_fail/tcfail154.hs @@ -0,0 +1,13 @@ +{-# LANGUAGE MultiParamTypeClasses #-} + +module ShouldFail where + +data T a = MkT + +class C a b where + op :: T a -> T b -> Bool + +-- Repeated type variable in an instance constraint +-- should require UndecidableInstances +instance C a a => Eq (T a) where + (==) = op |