diff options
author | Simon Peyton Jones <simonpj@microsoft.com> | 2015-09-02 14:05:36 +0200 |
---|---|---|
committer | Ben Gamari <bgamari.foss@gmail.com> | 2015-09-02 09:11:51 -0400 |
commit | 28ac9d31bcabeb44496c0e1750563f3091c62da9 (patch) | |
tree | 427a29e1beca0ee3fee7a1bc825bb5fa2fa03dae /testsuite/tests/typecheck/should_fail/tcfail072.stderr | |
parent | c8f623e305ec0a51ac2406a1f754d244e05b96f5 (diff) | |
download | haskell-28ac9d31bcabeb44496c0e1750563f3091c62da9.tar.gz |
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
Diffstat (limited to 'testsuite/tests/typecheck/should_fail/tcfail072.stderr')
-rw-r--r-- | testsuite/tests/typecheck/should_fail/tcfail072.stderr | 12 |
1 files changed, 7 insertions, 5 deletions
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 |