diff options
Diffstat (limited to 'testsuite/tests/codeGen/should_run/cgrun039.hs')
-rw-r--r-- | testsuite/tests/codeGen/should_run/cgrun039.hs | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/testsuite/tests/codeGen/should_run/cgrun039.hs b/testsuite/tests/codeGen/should_run/cgrun039.hs new file mode 100644 index 0000000000..b7b301794d --- /dev/null +++ b/testsuite/tests/codeGen/should_run/cgrun039.hs @@ -0,0 +1,14 @@ +-- !!! From a Rick Morgan bug report: +-- !!! Single-method class with a locally-polymorphic +-- !!! method. + +module Main where + +class Poly a where + poly :: a -> b -> b + +instance Poly [a] where + poly [] y = y + poly x y = y + +main = print ("hurrah" `poly` "Hello, world!\n") |