
#9173: Better type error messages -------------------------------------+------------------------------------- Reporter: simonpj | Owner: Type: bug | Status: new Priority: normal | Milestone: Component: Compiler | Version: 7.8.2 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: Type of failure: Incorrect | Unknown/Multiple warning at compile-time | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Wiki Page: | -------------------------------------+------------------------------------- Comment (by chreekat): Replying to [comment:20 sgillespie]:
I'd like to have a look. What is the proposed message? Should we use the original message below?
{{{ Foo.hs:2:20 inferred: "Just 5" has type "Maybe a0" expected: second argument of "($)" must have type "Int" in the expression: addThree $ Just 5 }}}
I vote for the simpler wording change rather than whatever acrobatics would be required to overcome the problems listed here: https://mail.haskell.org/pipermail/ghc-devs/2015-August/009559.html I guess that the patch mentioned above makes those bigger changes possible, but still. For the wording change, I think adding "...from context" is universally desired. See my comment:14, and the one following it, for suggested text. Incidentally, I dislike the eldest proposal (quoted in this comment) because it splits the necessary information over a couple lines, which is not so nice for integrating with vim's `:make` command. ;) -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/9173#comment:21 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler