Re: [Haskell-cafe] Closure trace?

2006-06-14 Thread Neil Mitchell
Hi Michael, I have defined fromJustNote and headNote, which take an extra parameter, for example: fromJustNote msg (Just x) = x fromJustNote msg Nothing = error $ fromJustNote failed, ++ msg I also have lookupJust which does a lookup and a fromJust, since this is a common pattern in my

Re: [Haskell-cafe] Closure trace?

2006-06-14 Thread Bulat Ziganshin
Hello Michael, Wednesday, June 14, 2006, 1:19:03 PM, you wrote: frequently we are seeing messages like List.head: empty list or Maybe.fromJust: Nothing. It is clear what happened and where the one time i complained the close problem SPJ answered me (see ghc-users mail-list at 23 may 2005): |

Re: [Haskell-cafe] Closure trace?

2006-06-14 Thread Ketil Malde
Bulat Ziganshin [EMAIL PROTECTED] 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

Re: [Haskell-cafe] Closure trace?

2006-06-14 Thread Esa Ilari Vuokko
Hi Michael, On 6/14/06, Michael Marte [EMAIL PROTECTED] wrote: I wonder whether it is possible to print a closure trace similar to a stack trace in procedural programming. Say we have two modules A and B: I wrote small (external) utility that does something like that for ghc-built binaries.