type error formatting
Joachim Breitner
mail at joachim-breitner.de
Sat Oct 24 08:17:49 UTC 2015
Hi,
thanks for starting this discussion, and I agree with your suggestion.
Maybe we can brainstorm some more fine refinements.
Given that our error message are on the rather verbose side, maybe
there is detail that can be omitted.
For example in
> Relevant bindings include
> syllables :: [(a1, Syllable)]
> (bound at Derive/Call/India/Pakhawaj.hs:141:16)
> best_match :: [(a1, Syllable)]
> -> Maybe (Int, ([(a1, Syllable)], [(a1, Sequence Bol)]))
> (bound at Derive/Call/India/Pakhawaj.hs:141:5)
do we really need to know what file these come from? I guess, in all
but very obscure cases (or really all) they are from the same file. So
why not omit the filename?
Also, unless the programmer is doing weird things with shadowing, is
the "bound at" information really valuable? I’d say no: Usually, the
programmer knows his bindings, and even if not, she will not have any
problems finding the right binding.
So I suggest to drop the "bound at" line unless the binding is from a
different file.
> This would make this section much easier to parse and grasp visually.
Greetings,
Joachim
--
Joachim “nomeata” Breitner
mail at joachim-breitner.de • http://www.joachim-breitner.de/
Jabber: nomeata at joachim-breitner.de • GPG-Key: 0xF0FBF51F
Debian Developer: nomeata at debian.org
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: This is a digitally signed message part
URL: <http://mail.haskell.org/pipermail/glasgow-haskell-users/attachments/20151024/1079819c/attachment.sig>
More information about the Glasgow-haskell-users
mailing list