diff options
author | sewardj <unknown> | 2001-06-20 16:13:07 +0000 |
---|---|---|
committer | sewardj <unknown> | 2001-06-20 16:13:07 +0000 |
commit | ec4b44372926ac4b7df577d7385b58f0dffe8039 (patch) | |
tree | 48d45be2d40f9ff0fe62786d2af14e6a449d48d6 /testsuite/tests/ghc-regress/typecheck/should_compile/tc050.hs | |
parent | f888eb872de80350cd4af0ea3962892a0185f750 (diff) | |
download | haskell-ec4b44372926ac4b7df577d7385b58f0dffe8039.tar.gz |
[project @ 2001-06-20 16:13:06 by sewardj]
Quite a significant number of your typechecker tests are belong to
fptools/testsuite.
Diffstat (limited to 'testsuite/tests/ghc-regress/typecheck/should_compile/tc050.hs')
-rw-r--r-- | testsuite/tests/ghc-regress/typecheck/should_compile/tc050.hs | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/testsuite/tests/ghc-regress/typecheck/should_compile/tc050.hs b/testsuite/tests/ghc-regress/typecheck/should_compile/tc050.hs new file mode 100644 index 0000000000..ef03b282d9 --- /dev/null +++ b/testsuite/tests/ghc-regress/typecheck/should_compile/tc050.hs @@ -0,0 +1,23 @@ +module ShouldSucceed where + +class Foo a where + o_and :: a -> a -> a + + +instance Foo Bool where + o_and False x = False + o_and x False = False + o_and True True = True + + +instance Foo Int where + o_and x 0 = 0 + o_and 0 x = 0 + o_and 1 1 = 1 + + +f x y = o_and x False + +g x y = o_and x 1 + + |