single-stepping and infinite recursion

Wolfgang Jeltsch g9ks157k at
Tue Nov 20 10:09:18 EST 2007


please consider the following program:

    main = putChar 'A' >> main

I load this into GHCi, enter :step main, followed by :step and a second :step.  
Although I would expect to get the As in the output step by step, GHCi now 
hangs inside the infinite loop.  Is this intentional?  To me, this seems 
rather weird.  I wanted to use GHCi’s debugger to find the reason for an 
infinite recursion but from my experience it looks as if this might not be 
possible. :-( 

Best wishes,

More information about the Glasgow-haskell-users mailing list