summaryrefslogtreecommitdiff
path: root/testsuite/tests/codeGen/should_run/cgrun027.hs
diff options
context:
space:
mode:
Diffstat (limited to 'testsuite/tests/codeGen/should_run/cgrun027.hs')
-rw-r--r--testsuite/tests/codeGen/should_run/cgrun027.hs13
1 files changed, 13 insertions, 0 deletions
diff --git a/testsuite/tests/codeGen/should_run/cgrun027.hs b/testsuite/tests/codeGen/should_run/cgrun027.hs
new file mode 100644
index 0000000000..646d05c38b
--- /dev/null
+++ b/testsuite/tests/codeGen/should_run/cgrun027.hs
@@ -0,0 +1,13 @@
+-- !!! simple test of 0-method classes
+--
+
+class (Num a, Integral a) => Foo a
+
+main = putStr (shows (f ((fromInteger 21)::Int)
+ ((fromInteger 37))) "\n")
+
+instance Foo Int
+
+f :: Foo a => a -> a -> Integer
+
+f a b = toInteger (a + b)