[GHC] #9613: when giving an error "No instance for C (a -> b)", suggest that a function may be underapplied
GHC
ghc-devs at haskell.org
Fri Sep 19 04:36:52 UTC 2014
#9613: when giving an error "No instance for C (a -> b)", suggest that a function
may be underapplied
-------------------------------------+-------------------------------------
Reporter: rwbarton | Owner:
Type: feature | Status: new
request | Milestone:
Priority: normal | Version: 7.8.3
Component: Compiler | Keywords:
(Type checker) | Architecture: Unknown/Multiple
Resolution: | Difficulty: Unknown
Operating System: | Blocked By:
Unknown/Multiple | Related Tickets:
Type of failure: |
None/Unknown |
Test Case: |
Blocking: |
Differential Revisions: |
-------------------------------------+-------------------------------------
Comment (by MikeIzbicki):
This is roughly equivalent to the patch I suggest in:
https://phabricator.haskell.org/D201 (TcErrors.lhs, line 1094ish).
The difference is that my patch doesn't suggest the underapplied function
name or the instances that do exist. It seems pretty straightforward to
mention the existing instance, so I'll try to add that. I'm pretty sure
it's in general impossible to name the argument. For example, in `show
(length . head . tail)` which function do you say is underapplied?
--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/9613#comment:1>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
More information about the ghc-tickets
mailing list