summaryrefslogtreecommitdiff
path: root/testsuite/tests/quotes
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/quotes
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/quotes')
-rw-r--r--testsuite/tests/quotes/TH_localname.stderr7
1 files changed, 4 insertions, 3 deletions
diff --git a/testsuite/tests/quotes/TH_localname.stderr b/testsuite/tests/quotes/TH_localname.stderr
index c764f576ef..dfb1e41383 100644
--- a/testsuite/tests/quotes/TH_localname.stderr
+++ b/testsuite/tests/quotes/TH_localname.stderr
@@ -1,11 +1,12 @@
TH_localname.hs:3:11: error:
- No instance for (Lift t0) arising from a use of ‘lift’
- The type variable ‘t0’ is ambiguous
+ Ambiguous type variable ‘t0’ arising from a use of ‘lift’
+ prevents the constraint ‘(Lift t0)’ from being solved.
Relevant bindings include
y :: t0 (bound at TH_localname.hs:3:6)
x :: t0 -> ExpQ (bound at TH_localname.hs:3:1)
- Potential instances:
+ Probable fix: use a type annotation to specify what ‘t0’ should be.
+ These potential instances exist:
instance (Lift a, Lift b) => Lift (Either a b)
-- Defined in ‘Language.Haskell.TH.Syntax’
instance Lift Int16 -- Defined in ‘Language.Haskell.TH.Syntax’