summaryrefslogtreecommitdiff
path: root/testsuite/tests/typecheck/should_compile/tc041.hs
diff options
context:
space:
mode:
Diffstat (limited to 'testsuite/tests/typecheck/should_compile/tc041.hs')
-rw-r--r--testsuite/tests/typecheck/should_compile/tc041.hs12
1 files changed, 12 insertions, 0 deletions
diff --git a/testsuite/tests/typecheck/should_compile/tc041.hs b/testsuite/tests/typecheck/should_compile/tc041.hs
new file mode 100644
index 0000000000..b42374f5e2
--- /dev/null
+++ b/testsuite/tests/typecheck/should_compile/tc041.hs
@@ -0,0 +1,12 @@
+-- !!! a very simple test of class and instance declarations
+
+module ShouldSucceed where
+
+class H a where
+ op1 :: a -> a -> a
+
+instance H Bool where
+ op1 x y = y
+
+f :: Bool -> Int -> Bool
+f x y = op1 x x