#7222: The text "Possible fix: add an instance declaration for ..." is redundant and not usually helpful ------------------------------+--------------------------------------------- Reporter: maltem | Owner: Type: bug | Status: new Priority: normal | Component: Compiler Version: 7.4.2 | Keywords: Os: Unknown/Multiple | Architecture: Unknown/Multiple Failure: Other | Testcase: Blockedby: | Blocking: Related: | ------------------------------+--------------------------------------------- The current state of affairs: Given a typical type error, for example
{{{ "a" + "b" }}} we get {{{ No instance for (Num [Char]) arising from a use of `+' Possible fix: add an instance declaration for (Num [Char]) In the expression: "a" + "b" In an equation for `it': it = "a" + "b" }}} I'm concerned with the third line here: 1) It is redundant, for it just repeats information from the first line. In my experience, the redundancy sometimes hinders usability, namely, when the types get very long, visually burying the problematic expression. 2) Furthermore it is often misleading: Everyday type errors stem from incorrect usage of a library, not from missing bits of a library. The line tends to be confusing especially for new users: the only ones who might have profited from the redundancy. 3) To expand a bit on (1): An imported bit of information in the type error is the fact that the type mismatch lies in the application of (+) to "a". The user gains this information by combination of lines 2 and 4. It is incovenient that line 3 visually seperates those lines. I propose that the problematic line be simply removed. -- Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/7222> GHC <http://www.haskell.org/ghc/> The Glasgow Haskell Compiler _______________________________________________ Glasgow-haskell-bugs mailing list Glasgow-haskell-bugs@haskell.org http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs