From 28ac9d31bcabeb44496c0e1750563f3091c62da9 Mon Sep 17 00:00:00 2001 From: Simon Peyton Jones Date: Wed, 2 Sep 2015 14:05:36 +0200 Subject: Improve the error messages for class instance errors Summary: See Note [Displaying potential instances]. Reviewers: austin Subscribers: KaneTW, thomie Differential Revision: https://phabricator.haskell.org/D1176 --- testsuite/tests/typecheck/should_fail/tcfail072.stderr | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) (limited to 'testsuite/tests/typecheck/should_fail/tcfail072.stderr') diff --git a/testsuite/tests/typecheck/should_fail/tcfail072.stderr b/testsuite/tests/typecheck/should_fail/tcfail072.stderr index c08bb58fb1..f3386f164b 100644 --- a/testsuite/tests/typecheck/should_fail/tcfail072.stderr +++ b/testsuite/tests/typecheck/should_fail/tcfail072.stderr @@ -1,16 +1,18 @@ -tcfail072.hs:23:13: +tcfail072.hs:23:13: error: Could not deduce (Ord p0) arising from a use of ‘g’ from the context: (Ord p, Ord q) bound by the type signature for: - g :: (Ord p, Ord q) => AB p q -> Bool + g :: (Ord p, Ord q) => AB p q -> Bool at tcfail072.hs:22:6-38 The type variable ‘p0’ is ambiguous - Note: there are several potential instances: + Potential instances: instance Ord a => Ord (Maybe a) -- Defined in ‘GHC.Base’ instance Ord Ordering -- Defined in ‘GHC.Classes’ - instance Ord integer-gmp-1.0.0.0:GHC.Integer.Type.BigNat + instance Ord Integer -- Defined in ‘integer-gmp-1.0.0.0:GHC.Integer.Type’ - ...plus 23 others + ...plus 22 others + ...plus one instance involving out-of-scope types + (use -fprint-potential-instances to see them all) In the expression: g A In an equation for ‘g’: g (B _ _) = g A -- cgit v1.2.1