diff options
Diffstat (limited to 'testsuite/tests/typecheck/should_fail/tcfail144.hs')
-rw-r--r-- | testsuite/tests/typecheck/should_fail/tcfail144.hs | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/testsuite/tests/typecheck/should_fail/tcfail144.hs b/testsuite/tests/typecheck/should_fail/tcfail144.hs new file mode 100644 index 0000000000..bdeb6f6a91 --- /dev/null +++ b/testsuite/tests/typecheck/should_fail/tcfail144.hs @@ -0,0 +1,18 @@ +-- Both sets should fail in Haskell98 + +{-# LANGUAGE Haskell98 #-} + +module ShouldCompile where + + f1 :: Eq a => a -> Bool + f1 x = (x == x) || g1 True || g1 "Yes" + + g1 :: Ord a => a -> Bool + g1 y = (y <= y) || f1 True + +--------- + + f2 :: Eq a => a -> Bool + f2 x = (x == x) || g2 True || g2 "Yes" + + g2 y = (y <= y) || f2 True |