[Haskell-cafe] Re: how do you debug programs?
David Roundy
droundy at darcs.net
Thu Sep 7 09:56:50 EDT 2006
On Thu, Sep 07, 2006 at 06:21:01AM +0100, Jn Fairbairn wrote:
> David Roundy <droundy at darcs.net> writes:
>
> > 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.
>
> Curiously, the only bug in darcs that has bitten me so far
> was a use of fromJust. Perhaps that indicates a weakness in
> the style, rather than the tools?
Yeah, in general fromJust is a dangerous business, and most of the
uses of it in darcs can lead to trouble for partial repositories, for
instance. I was just yesterday discussing with Jason the possibility
of switching away from a Maybe approach for lazily reading patches.
--
David Roundy
More information about the Haskell-Cafe
mailing list