GHCi Debugger hangs in nested break in an eta reduced function
Summary
GHCi hangs when setting a breakpoint in an eta reduced function and re-evaluating this function when the breakpoint is hit.
Steps to reproduce
Use the module Hang.hs
:
module Hang where
foo :: Int -> Int
foo = bar
bar :: Int -> Int
bar n = 2 * n
Do the following steps:
ghci Hang.hs
:break foo
foo 1 -- Evaluate function foo. GHCi stops at breakpoint
foo 2 -- Re-evaluate function foo from the breakpoint
-> GHCi now hangs!
Expected behavior
GHCi should not hang, it should stop at a nested breakpoint
Note
When I remove the eta reduction in the function foo
foo :: Int -> Int
foo x = bar x
then everything works fine!
Environment
- GHC version used: 7.10.3 - 8.10.2 and HEAD
Optional:
- Operating System: Debian 9
- System Architecture: x86-64