[Haskell] modern language design, stone age tools

John Meacham john at repetae.net
Wed Jun 23 18:26:35 EDT 2004


On Wed, Jun 23, 2004 at 10:39:08AM -0700, Fergus Henderson wrote:
> On 23-Jun-2004, MR K P SCHUPKE <k.schupke at imperial.ac.uk> wrote:
> > This may not be the right answer to the question (which is of
> > course lets write a debugger) - But I have never used a debugger,
> > and find them more or less the most unfriendly and useless things
> 
> So how do you debug problems like "Prelude.head: empty list"
> in large programs?

enable template haskell and use $head where $head is defined to generate
'head' with the error annotated with the current line number and file.

        John

-- 
John Meacham - ⑆repetae.net⑆john⑈ 


More information about the Haskell mailing list