GHCi debugger status

Simon Marlow marlowsd at gmail.com
Mon Nov 24 04:13:52 EST 2008


Peter Hercek wrote:
> Daniil Elovkov wrote:
>> I'd like to know, how do ghc developers and users feel about the 
>> debugger?
> 
> Sometimes it is better/quicker than "printf debugging" :)
> 
>> Now I see it mess up the list of bindings in a funny way. For example, 
>> in a previous trace session I had a variable, say, prev. It was bound 
>> during pattern matching in a function, say, prevFunc. Now I'm having 
>> another trace session, actually stepping from the very beginning. A 
>> couple of steps after the beginning, prev suddenly appears in the 
>> bindings where prevFunc absolutely has not yet been invoked. It's 
>> completely unrelated. In 'show bindings' prev has a wrong type - 
>> SomeType (it's ADT). Its real type (when in scope) is [t]. I ask 
>> 'length prev' and get 0 :)
> 
> It is supposed to show only free variables in the selected expression.
>  I'm sure I had cases when I was able to access variables which were
>  not free in the selected expression but which would have been in
>  scope if used in the selected expression. The values available seemed
>  correct (contrary to your case). I thought it was a step to get all
>  the variables in scope to be visible but later I learned it is not
>  feasible and my lucky experience was probably a bug. If I encounter
>  it again should I fill a bug report? I mean: is it really a bug?

At the least it's suspicious, and could be a bug.   Please do report it, as 
long as you can describe exactly how to reproduce the problem.

Cheers,
	Simon


More information about the Glasgow-haskell-users mailing list