I’m new to Haskell and I’m getting an annoying behaviour when debugging.
- I add my break point using :break
- I run main
- Everything is ok
- I type :continue to finish the execution
When I rerun main, the breakpoint does not hit anymore but the breakpoint wasn’t removed because :show breaks lists it. Anyone knows what’s going on?
I’m on Ubuntu 11.10, 64 bits. I’ll test it on a different environment tomorrow.
Thanks
It’s hard to know without seeing the code, but it sounds likely that on the second run of main the breakpoint is never reached because the result is cached because of lazy evaluation. It probably was a THUNK (a suspended evaluation) first time, and the second time it is already evaluated.