:l shell.hs :def shell (\s -> do shell s; return "") -- We have this structure of modules: -- A (imports B.boot) -- B (imports A) -- B.boot (imports A) -- C (imports A and B) -- And we load C, to debug some function in A which enters B. -- But first we touch A, and reload. B.boot will be reloaded, but not B, which will end up with an empty modbreaks. When we :step into B, ghci will die with an out of bounds access in B's break array. -- The effect we want is B.boot being reloaded while B is not. :shell cp A1.hs A.hs :l C :shell echo >> A.hs :r :break a a () :st :st -- here we step into B, and produce the exception