
Claus Reinke wrote:
Consider this code and session:
f x y z | x
...
Things to note:
- when reaching the breakpoint "in" 'f', one isn't actually in 'f' yet - nothing about 'f' can be inspected - at no point in the session was 'x' inspectable, even though it is likely to contain information needed to understand 'f', especially when we are deep in a recursion of a function that can be called from many places; this information doesn't happen to be needed in the current branch, but debugging the current expression always happens in a context, and accessing information about this context is what the GHCi debugger doesn't seem to support well
In this particular example, the second item is most likely a bug (the free variables of the guard were never offered for inspection).
Indeed it was a bug, the same as #2740, and I've just fixed it. Thanks for boiling it down to a nice small example. Cheers, Simon