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/tcfail133.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/tcfail133.stderr')
-rw-r--r-- | testsuite/tests/typecheck/should_fail/tcfail133.stderr | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/testsuite/tests/typecheck/should_fail/tcfail133.stderr b/testsuite/tests/typecheck/should_fail/tcfail133.stderr index dc9c96d2db..1869cea44b 100644 --- a/testsuite/tests/typecheck/should_fail/tcfail133.stderr +++ b/testsuite/tests/typecheck/should_fail/tcfail133.stderr @@ -1,21 +1,22 @@ -tcfail133.hs:2:61: Warning: +tcfail133.hs:2:61: warning: -XDatatypeContexts is deprecated: It was widely considered a misfeature, and has been removed from the Haskell language. -tcfail133.hs:68:7: +tcfail133.hs:68:7: error: No instance for (Show r0) arising from a use of ‘show’ The type variable ‘r0’ is ambiguous - Note: there are several potential instances: + Potential instances: instance Show a => Show (Maybe a) -- Defined in ‘GHC.Show’ instance Show Ordering -- Defined in ‘GHC.Show’ instance Show Integer -- Defined in ‘GHC.Show’ ...plus 25 others + (use -fprint-potential-instances to see them all) In the expression: show In the expression: show $ add (One :@ Zero) (One :@ One) In an equation for ‘foo’: foo = show $ add (One :@ Zero) (One :@ One) -tcfail133.hs:68:14: +tcfail133.hs:68:14: error: No instance for (AddDigit (Zero :@ (One :@ One)) One r0) arising from a use of ‘add’ In the second argument of ‘($)’, namely |