lambdabot-utils-4.2.2: Utility libraries for the advanced IRC bot, Lambdabot

Safe HaskellNone



The signal story. Posix signals are external events that invoke signal handlers in Haskell. The signal handlers in turn throw dynamic exceptions. Our instance of MonadError for LB maps the dynamic exceptions to SignalCaughts, which can then be caught by a normal catchIrc or handleIrc



withHandler :: (MonadIO m, MonadError e m) => Signal -> Handler -> m () -> m ()Source

withHandlerList :: (MonadError e m, MonadIO m) => [Signal] -> (Signal -> Handler) -> m () -> m ()Source

releaseSignals :: IO ()Source

Release all signal handlers

withIrcSignalCatch :: (MonadError e m, MonadIO m) => m () -> m ()Source

Register signal handlers to catch external signals