ghci debugger: showing function argumetns when stopped at its definition

Isaac Dupree ml at
Mon Jul 13 20:48:42 EDT 2009

Peter Hercek wrote:
> Simon Marlow wrote:
>> On 10/07/2009 15:31, Peter Hercek wrote:
>>> Hi,
>>> It would be cool if ghci debugger could grab not only the free variables
>>> in the selected expression but in one case a bit more. The case is when
>>> we stop at a function definition the first time (when just entering it).
>> The problem is that functions can be defined with multiple equations, 
>> each giving different names for the arguments. e.g. in
>> f x 0 = x
>> f 0 x = x
>> when we stop at f, what do you want to see?
> Right, I did not realize this problem. But your idea of using _arx<N> 
> naming in case of more equations seems best to me. I would still like to 
> have it available.

Even in one equation, pattern match can make it undesirable. Say, in
fromJust (Just x) = ...
doesn't allow you access to the argument directly.  Can _argN be 
provided in *all* cases (possibly in addition to other bindings)?


More information about the Glasgow-haskell-users mailing list