[Haskell-cafe] Re: Haskell stacktrace

Ketil Malde ketil at malde.org
Tue Sep 9 17:18:18 EDT 2008


"Justin Bailey" <jgbailey at gmail.com> writes:

> are using tail (or could be calling something that uses tail) and use
> the "trace" function to output logging info.

Another cheap trick is to use CPP with something like:

#define head (\xs -> case xs of { (x:_) -> x ; _ -> error("head failed at line"++__FILE__++show __LINE__)})

-k
-- 
If I haven't seen further, it is by standing in the footprints of giants


More information about the Haskell-Cafe mailing list