summaryrefslogtreecommitdiff
path: root/testsuite/tests/ghci/scripts/Defer02.stderr
diff options
context:
space:
mode:
authorDavid Kraeutmann <kane@kane.cx>2015-10-07 20:28:46 -0500
committerAustin Seipp <austin@well-typed.com>2015-10-07 20:30:20 -0500
commit7b443bb1df8f7f0a6b3124537590aa655a9300cd (patch)
tree9a15aeb8de755743b236f83129ad63fa4ec93304 /testsuite/tests/ghci/scripts/Defer02.stderr
parentea4df12f7f3fc4d1d2af335804b8ec893f45550c (diff)
downloadhaskell-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/ghci/scripts/Defer02.stderr')
-rw-r--r--testsuite/tests/ghci/scripts/Defer02.stderr7
1 files changed, 4 insertions, 3 deletions
diff --git a/testsuite/tests/ghci/scripts/Defer02.stderr b/testsuite/tests/ghci/scripts/Defer02.stderr
index b2a5efefc3..4888e6958c 100644
--- a/testsuite/tests/ghci/scripts/Defer02.stderr
+++ b/testsuite/tests/ghci/scripts/Defer02.stderr
@@ -67,9 +67,10 @@
In an equation for ‘j’: j = myOp 23
../../typecheck/should_run/Defer01.hs:43:10: warning:
- No instance for (Num a1) arising from the literal ‘23’
- The type variable ‘a1’ is ambiguous
- Potential instances:
+ Ambiguous type variable ‘a1’ arising from the literal ‘23’
+ prevents the constraint ‘(Num a1)’ from being solved.
+ Probable fix: use a type annotation to specify what ‘a1’ should be.
+ These potential instances exist:
instance Num Integer -- Defined in ‘GHC.Num’
instance Num Double -- Defined in ‘GHC.Float’
instance Num Float -- Defined in ‘GHC.Float’