[Haskell-cafe] Re: how do you debug programs?
Chris Kuklewicz
haskell at list.mightyreason.com
Wed Sep 6 16:23:19 EDT 2006
David Roundy wrote:
> On Wed, Sep 06, 2006 at 09:56:17AM -0700, Jason Dagit wrote:
>> Or maybe even more extreme you could use template haskell or the c
>> preprocessor to fill in the line number + column.
>
> Which is precisely what darcs does for fromJust (which we use a lot):
> we define a C preprocessor macro fromJust. It's ugly, but beats any
> other choice I'm aware of. I wish that built in functions that call
> error could be automatically this way...
This old mailing list message may help:
http://www.mail-archive.com/haskell-cafe@haskell.org/msg13034.html
> Suggested by a question from sethk on #haskell irc channel.
> Solves an FAQ where people have often resorted to cpp or m4:
> a `trace' that prints line numbers.
--
Chris
More information about the Haskell-Cafe
mailing list