diff options
Diffstat (limited to 'testsuite/tests/typecheck/should_compile/tc056.hs')
-rw-r--r-- | testsuite/tests/typecheck/should_compile/tc056.hs | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/testsuite/tests/typecheck/should_compile/tc056.hs b/testsuite/tests/typecheck/should_compile/tc056.hs new file mode 100644 index 0000000000..64d7138571 --- /dev/null +++ b/testsuite/tests/typecheck/should_compile/tc056.hs @@ -0,0 +1,19 @@ +-- !!! Duplicate class assertion warning + +-- ghc 6.6 now warns about duplicate class assertions, + +module ShouldSucceed where + +class Eq' a where + doubleeq :: a -> a -> Bool + +class (Eq' a) => Ord' a where + lt :: a -> a -> Bool + +instance Eq' Int where + doubleeq x y = True + +instance (Eq' a, Eq' a) => Eq' [a] where + doubleeq x y = True + +f x y = doubleeq x [1] |