+-- when abandoning a computation we have to
+-- (a) kill the thread with an async exception, so that the
+-- computation itself is stopped, and
+-- (b) fill in the MVar. This step is necessary because any
+-- thunks that were under evaluation will now be updated
+-- with the partial computation, which still ends in takeMVar,
+-- so any attempt to evaluate one of these thunks will block
+-- unless we fill in the MVar.
+-- See test break010.
+abandon_ :: Resume -> IO ()
+abandon_ r = do
+ killThread (resumeThreadId r)
+ putMVar (resumeBreakMVar r) ()
+