[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:05:42 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 request | Status: new
Priority: normal | Milestone:
Component: Compiler (Type | Version: 7.8.3
checker) | Operating System:
Keywords: | Unknown/Multiple
Architecture: Unknown/Multiple | Type of failure:
Difficulty: Unknown | None/Unknown
Blocked By: | Test Case:
Related Tickets: | Blocking:
| Differential Revisions:
-------------------------------------+-------------------------------------
Suggestion of ibotty here:
http://www.reddit.com/r/haskell/comments/2go92u/beginner_error_messages_in_c_vs_haskell/cklm7jk
{{{
Prelude> print length
<interactive>:2:1:
No instance for (Show ([a0] -> Int)) arising from a use of ‘print’
but there is an instance for (Show Int);
maybe you omitted an argument to ‘length’ of type [a0]?
In the expression: print length
In an equation for ‘it’: it = print length
}}}
I guess the trickiest part will be figuring out what function is
underapplied.
--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/9613>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
More information about the ghc-tickets
mailing list