summaryrefslogtreecommitdiff
path: root/testsuite/tests/typecheck/should_fail/tcfail150.stderr
diff options
context:
space:
mode:
authorSimon Peyton Jones <simonpj@microsoft.com>2015-03-04 11:59:47 +0000
committerSimon Peyton Jones <simonpj@microsoft.com>2015-03-04 12:00:21 +0000
commitf66e0e695b0377c469fbe877d4850fc0ebca2010 (patch)
treef20d6e81e1d79e3e1d6e6cff923203e460f73d96 /testsuite/tests/typecheck/should_fail/tcfail150.stderr
parentd058bc9ce04e8397c8fd0a32a8654b83f3ef4af1 (diff)
downloadhaskell-f66e0e695b0377c469fbe877d4850fc0ebca2010.tar.gz
A raft of small changes associated with -XConstrainedClassMethods
See Trac #7854. Specifically: * Major clean up and simplification of check_op in checkValidClass; specifically - use checkValidType on the entire method-selector type to detect ambiguity - put a specific test for -XConstrainedClassMethods * Make -XConstrainedClassMethods be implied by -XMultiParamTypeClasses (a bit ad-hoc but see #7854), and document in the user manual. * Do the checkAmbiguity test just once in TcValidity.checkValidType, rather than repeatedly at every level. See Note [When to call checkAmbiguity] * Add -XAllowAmbiguousTypes in GHC.IP, since 'ip' really is ambiguous. (It's a rather magic function.) * Improve location info for check_op in checkValidClass * Update quite a few tests, which had genuinely-ambiguous class method signatures. Some I fixed by making them unambiguous; some by adding -XAllowAmbiguousTypes
Diffstat (limited to 'testsuite/tests/typecheck/should_fail/tcfail150.stderr')
-rw-r--r--testsuite/tests/typecheck/should_fail/tcfail150.stderr8
1 files changed, 8 insertions, 0 deletions
diff --git a/testsuite/tests/typecheck/should_fail/tcfail150.stderr b/testsuite/tests/typecheck/should_fail/tcfail150.stderr
index e69de29bb2..c91d404c13 100644
--- a/testsuite/tests/typecheck/should_fail/tcfail150.stderr
+++ b/testsuite/tests/typecheck/should_fail/tcfail150.stderr
@@ -0,0 +1,8 @@
+
+tcfail150.hs:6:3:
+ Constraint ‘Eq a’ in the type of ‘op’
+ constrains only the class type variables
+ Use ConstrainedClassMethods to allow it
+ When checking the class method:
+ op :: forall a. (Foo a, Eq a) => a -> a
+ In the class declaration for ‘Foo’