| What do you think of improving the error messages like
| Prelude.take: negative argument
| (for say, take (-1) [(0,'b'),(1,'a')] )
That would be splendid. But I don't see how to do it.
take :: Int -> [a] -> [a]
Since take is polymorphic in a, I can't print a member of the
list. If you want to define your own take
mytake :: Show a => Int -> [a] -> [a]
that's fine, but it's a different function.
And for (head []) there's really no useful info to hand. So I'm stumped.
A long-standing, but alas un-implemented, plan is to use cost-centre
stacks to give a sort of back-trace.
Simon
- improving error messages S.D.Mechveliani
- Re: improving error messages Ketil Malde
- RE: improving error messages Simon Peyton-Jones
- RE: improving error messages Malcolm Wallace
- Re: improving error messages Fergus Henderson
- Re: improving error messages S.J.Thompson
- Re: improving error messages Jan Skibinski
- improving error messages S.D.Mechveliani
- Re: improving error messages Keith Wansbrough
- Re: improving error messages Malcolm Wallace
- RE: improving error messages Simon Peyton-Jones
- RE: improving error messages Sigbjorn Finne
- RE: improving error messages Malcolm Wallace
