diff options
author | David Kraeutmann <kane@kane.cx> | 2015-10-07 20:28:46 -0500 |
---|---|---|
committer | Austin Seipp <austin@well-typed.com> | 2015-10-07 20:30:20 -0500 |
commit | 7b443bb1df8f7f0a6b3124537590aa655a9300cd (patch) | |
tree | 9a15aeb8de755743b236f83129ad63fa4ec93304 /testsuite/tests/rename/should_fail | |
parent | ea4df12f7f3fc4d1d2af335804b8ec893f45550c (diff) | |
download | haskell-7b443bb1df8f7f0a6b3124537590aa655a9300cd.tar.gz |
Improve error messages for ambiguous type variables
Improved error messages are only printed when the old message would be
"No instance for...", since they're not as helpful for "Could not deduce..."
No special test case as error messages are tested by other tests already.
Signed-off-by: David Kraeutmann <kane@kane.cx>
Reviewed By: austin, goldfire
Differential Revision: https://phabricator.haskell.org/D1182
GHC Trac Issues: #10733
Diffstat (limited to 'testsuite/tests/rename/should_fail')
-rw-r--r-- | testsuite/tests/rename/should_fail/mc14.stderr | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/testsuite/tests/rename/should_fail/mc14.stderr b/testsuite/tests/rename/should_fail/mc14.stderr index bb02f9bafb..bc7b7df291 100644 --- a/testsuite/tests/rename/should_fail/mc14.stderr +++ b/testsuite/tests/rename/should_fail/mc14.stderr @@ -1,7 +1,9 @@ + mc14.hs:14:16: error: - No instance for (Functor t0) arising from a use of ‘fmap’ - The type variable ‘t0’ is ambiguous - Potential instances: + Ambiguous type variable ‘t0’ arising from a use of ‘fmap’ + prevents the constraint ‘(Functor t0)’ from being solved. + Probable fix: use a type annotation to specify what ‘t0’ should be. + These potential instances exist: instance Functor IO -- Defined in ‘GHC.Base’ instance Functor Maybe -- Defined in ‘GHC.Base’ instance Functor ((->) r) -- Defined in ‘GHC.Base’ |