diff options
| author | simonpj <unknown> | 1998-04-07 07:49:43 +0000 |
|---|---|---|
| committer | simonpj <unknown> | 1998-04-07 07:49:43 +0000 |
| commit | 36bc0530e62eae1de7c5fbb99ed292f5cc28cece (patch) | |
| tree | 66953370f310b4c430fa02f15b984f281dc01ed0 | |
| parent | c0fb36d54db38562e96197f92a0433207b2e9628 (diff) | |
| download | haskell-36bc0530e62eae1de7c5fbb99ed292f5cc28cece.tar.gz | |
[project @ 1998-04-07 07:49:39 by simonpj]
Adding tcfail080
| -rw-r--r-- | ghc/tests/typecheck/should_fail/Makefile | 1 | ||||
| -rw-r--r-- | ghc/tests/typecheck/should_fail/tcfail080.hs | 13 | ||||
| -rw-r--r-- | ghc/tests/typecheck/should_fail/tcfail080.stderr | 7 |
3 files changed, 21 insertions, 0 deletions
diff --git a/ghc/tests/typecheck/should_fail/Makefile b/ghc/tests/typecheck/should_fail/Makefile index b169c84b60..37b8b8eacf 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 0000000000..f64fe1cc7a --- /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 0000000000..2c95b9c820 --- /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 |
