| Safe Haskell | None |
|---|---|
| Language | GHC2021 |
Ecluse.Runtime.Server.Halt
Description
The local-development immediate-halt wiring: an interactive session's
"quit now" key, inert outside a terminal. Ecluse.Runtime.Server's runWarp
wraps the whole run in withInteractiveHalt.
Synopsis
- data InteractiveHalt = InteractiveHalt {
- haltOnInteractive :: IO Bool
- awaitHaltSignal :: IO ()
- halt :: IO ()
- defaultInteractiveHalt :: InteractiveHalt
- withInteractiveHalt :: InteractiveHalt -> IO a -> IO a
Documentation
data InteractiveHalt Source #
The local-development immediate-halt wiring, as injection points a test drives without a terminal. Ctrl-D exits the process at once and aborts the drain. It is inert on a non-TTY.
Constructors
| InteractiveHalt | |
Fields
| |
defaultInteractiveHalt :: InteractiveHalt Source #
The real local-dev halt: armed only on a terminal and fired by end-of-input, exiting at once without a drain. Status 130 is the conventional "terminated from the terminal" code.
withInteractiveHalt :: InteractiveHalt -> IO a -> IO a Source #
Run an action with the immediate-halt watcher armed only when haltOnInteractive is
True. The watcher lives exactly as long as the action, so it never outlives it.