data SigAct = SAIgnore | SADefault | SACatch DialogueThe corresponding continuation-style I/O function is the unsurprising:
sigAction :: Int -> SigAct -> FailCont -> SuccCont -> DialogueWhen a signal handler is installed with `SACatch', receipt of the signal causes the current top-level computation to be abandoned, and the specified dialogue to be executed instead. The abandoned computation may leave some partially evaluated expressions in a non-resumable state. If you believe that your top-level computation and your signal handling dialogue may share subexpressions, you should execute your program with the `-N' RTS option, to prevent black-holing. The `-N' option is not available with concurrent/parallel programs, so great care should be taken to avoid shared subexpressions between the top-level computation and any signal handlers when using threads.