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/rename | |
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/rename')
-rw-r--r-- | testsuite/tests/rename/should_fail/mc14.stderr | 29 |
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) |