
14 Jun
2006
14 Jun
'06
6:10 a.m.
Bulat Ziganshin
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