diff options
Diffstat (limited to 'testsuite/tests/typecheck/should_run/tcrun037.hs')
-rw-r--r-- | testsuite/tests/typecheck/should_run/tcrun037.hs | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/testsuite/tests/typecheck/should_run/tcrun037.hs b/testsuite/tests/typecheck/should_run/tcrun037.hs new file mode 100644 index 0000000000..e79817d5cb --- /dev/null +++ b/testsuite/tests/typecheck/should_run/tcrun037.hs @@ -0,0 +1,13 @@ + + +module Main where + +class C a where + op :: (Show a, Show b) => a -> b -> String + -- This class op has local quantification, but + -- also adds a constraint on 'a' + +instance C Bool where + op x y = show x ++ " " ++ show y + +main = do { putStrLn (op True 'x'); putStrLn (op False (3::Int)) } |