diff options
Diffstat (limited to 'testsuite/tests/typecheck/should_compile/tc063.hs')
-rw-r--r-- | testsuite/tests/typecheck/should_compile/tc063.hs | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/testsuite/tests/typecheck/should_compile/tc063.hs b/testsuite/tests/typecheck/should_compile/tc063.hs new file mode 100644 index 0000000000..36affbfdce --- /dev/null +++ b/testsuite/tests/typecheck/should_compile/tc063.hs @@ -0,0 +1,18 @@ +module ShouldSucceed where + +data X a = Tag a + +class Reps r where + f :: r -> r -> r + +instance Reps (X q) where +-- f (Tag x) (Tag y) = Tag y + f x y = y + +instance Reps Bool where + f True True = True + f x y = False + +g x = f x x + + |