| 432 | | As you can see |
| 433 | | |
| | 432 | When the expression thread hits a breakpoint it waits on `breakMVar`. When the user decides to continue execution after a breakpoint, the GHCi thread fills `breakMVar`, which wakes up the expression thread and allows it to continue execution. |
| | 433 | |
| | 434 | Now we must return to `statusMVar` and look at it in more detail. We introduce a new type called `Status`: |
| | 435 | {{{ |
| | 436 | data Status a |
| | 437 | = Break RunResult |
| | 438 | | Complete (Either Exception a) |
| | 439 | }}} |
| | 440 | It represents the execution status of the expression thread, which is either `Complete` (with an exception or a value of some type), or `Break`, to indicate that the thread has hit a breakpoint. `statusMVar` simply contains a `Status` value: |
| | 441 | {{{ |
| | 442 | statusMVar :: MVar (Status a) |
| | 443 | }}} |