[Haskell-cafe] Closure trace?
Ketil Malde
ketil+haskell at ii.uib.no
Wed Jun 14 06:10:19 EDT 2006
Bulat Ziganshin <bulat.ziganshin at gmail.com> writes:
> I'm not belittling the underlying problem, which is real. But there do
> seem to be many possible design choices without an obvious optimium. If
> someone can boil out a principled and simple solution, it'd be a good
> contribution.
You can also use CPP macros for the worst offenders. Something like
(untested, but you get the idea):
#define BUG(X) (error (X++" failed, __FILE__,__LINE__")
#define head (\x -> case x of (x:_) -> x; _ -> BUG("head"))
#define fromJust ...
It's also worthwhile to check out the darcs code for some fancy bug/error handling.
-k
--
If I haven't seen further, it is by standing in the footprints of giants
More information about the Haskell-Cafe
mailing list