summaryrefslogtreecommitdiff
path: root/testsuite/tests/rename
diff options
context:
space:
mode:
authorSimon Peyton Jones <simonpj@microsoft.com>2015-09-02 14:05:36 +0200
committerBen Gamari <bgamari.foss@gmail.com>2015-09-02 09:11:51 -0400
commit28ac9d31bcabeb44496c0e1750563f3091c62da9 (patch)
tree427a29e1beca0ee3fee7a1bc825bb5fa2fa03dae /testsuite/tests/rename
parentc8f623e305ec0a51ac2406a1f754d244e05b96f5 (diff)
downloadhaskell-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/rename')
-rw-r--r--testsuite/tests/rename/should_fail/mc14.stderr29
1 files changed, 15 insertions, 14 deletions
diff --git a/testsuite/tests/rename/should_fail/mc14.stderr b/testsuite/tests/rename/should_fail/mc14.stderr
index 860d483ffe..3f52be33c6 100644
--- a/testsuite/tests/rename/should_fail/mc14.stderr
+++ b/testsuite/tests/rename/should_fail/mc14.stderr
@@ -1,14 +1,15 @@
-
-mc14.hs:14:16: error:
- No instance for (Functor t0) arising from a use of ‘fmap’
- The type variable ‘t0’ is ambiguous
- Note: there are several potential instances:
- instance Functor Maybe -- Defined in ‘GHC.Base’
- instance Functor IO -- Defined in ‘GHC.Base’
- instance Functor ((->) r) -- Defined in ‘GHC.Base’
- ...plus two others
- In the expression: fmap
- In a stmt of a monad comprehension: then group using f
- In the expression: [() | f <- functions, then group using f]
-
-mc14.hs:14:49: error: Variable not in scope: f :: [a] -> m (t0 a)
+
+mc14.hs:14:16: error:
+ No instance for (Functor t0) arising from a use of ‘fmap’
+ The type variable ‘t0’ is ambiguous
+ Potential instances:
+ instance Functor Maybe -- Defined in ‘GHC.Base’
+ instance Functor IO -- Defined in ‘GHC.Base’
+ instance Functor ((->) r) -- Defined in ‘GHC.Base’
+ ...plus two others
+ (use -fprint-potential-instances to see them all)
+ In the expression: fmap
+ In a stmt of a monad comprehension: then group using f
+ In the expression: [() | f <- functions, then group using f]
+
+mc14.hs:14:49: error: Variable not in scope: f :: [a] -> m (t0 a)