From: simonpj Date: Tue, 7 Apr 1998 07:49:43 +0000 (+0000) Subject: [project @ 1998-04-07 07:49:39 by simonpj] X-Git-Tag: Approx_2487_patches~832 X-Git-Url: http://git.megacz.com/?a=commitdiff_plain;h=36bc0530e62eae1de7c5fbb99ed292f5cc28cece;p=ghc-hetmet.git [project @ 1998-04-07 07:49:39 by simonpj] Adding tcfail080 --- diff --git a/ghc/tests/typecheck/should_fail/Makefile b/ghc/tests/typecheck/should_fail/Makefile index b169c84..37b8b8e 100644 --- a/ghc/tests/typecheck/should_fail/Makefile +++ b/ghc/tests/typecheck/should_fail/Makefile @@ -6,5 +6,6 @@ HC_OPTS += -noC tcfail045_HC_OPTS = -fglasgow-exts tcfail068_HC_OPTS = -fglasgow-exts +tcfail080_HC_OPTS = -fglasgow-exts include $(TOP)/mk/target.mk diff --git a/ghc/tests/typecheck/should_fail/tcfail080.hs b/ghc/tests/typecheck/should_fail/tcfail080.hs new file mode 100644 index 0000000..f64fe1c --- /dev/null +++ b/ghc/tests/typecheck/should_fail/tcfail080.hs @@ -0,0 +1,13 @@ +--!!! Multi-param type classes test: ambiguity bug +module ShouldFail where + +class Collection c a where + empty :: c a + add :: a -> c a -> c a + isempty :: c a -> Bool + +singleton x = add x empty + +q x = isempty (singleton x) + + diff --git a/ghc/tests/typecheck/should_fail/tcfail080.stderr b/ghc/tests/typecheck/should_fail/tcfail080.stderr new file mode 100644 index 0000000..2c95b9c --- /dev/null +++ b/ghc/tests/typecheck/should_fail/tcfail080.stderr @@ -0,0 +1,7 @@ + +tcfail080.hs:7: + Too many parameters for class `Collection' + In the class declaration for `Collection' + + +Compilation had errors