type error formatting

Joachim Breitner mail at joachim-breitner.de
Sat Oct 24 09:29:52 UTC 2015


Hi,

Am Samstag, den 24.10.2015, 10:08 +0100 schrieb Malcolm Wallace:
> On 24 Oct 2015, at 09:17, Joachim Breitner wrote:
> 
> > 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)
> > 
> > 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.
> 
> As someone who spends a lot of time maintaining code that I did not
> write, I have to say that it is not enough that the "programmer knows
> his bindings".  She might, but I do not.  This kind of helpful
> signposting of exactly what file + linenumber + character position to
> look at, is really useful for someone who is not familiar with the
> code.

sure, there is a trade off. But the file can by default to be assumed
to be the file of the error. And are you really going to note the line
number and go to that line, instead of just issuing /syllables?

When error messages reach the vertical size of a terminal window, the
benefit of adding such details diminishes.

Greetings,
Joachim


-- 
Joachim “nomeata” Breitner
  mail at joachim-breitner.dehttp://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/0b185b65/attachment.sig>


More information about the Glasgow-haskell-users mailing list