darcs-2.18.2: a distributed, interactive, smart revision control system

Safe Haskell | None
Language | Haskell2010

Darcs.Util.SignalHandler

Synopsis

- withSignalsHandled :: IO a -> IO a
- withSignalsBlocked :: IO a -> IO a
- catchInterrupt :: IO a -> IO a -> IO a
- catchNonSignal :: IO a -> (SomeException -> IO a) -> IO a
- tryNonSignal :: IO a -> IO (Either SomeException a)
- stdoutIsAPipe :: IO Bool

# Documentation

withSignalsHandled :: IO a -> IO a #

withSignalsBlocked :: IO a -> IO a #

catchInterrupt :: IO a -> IO a -> IO a #

catchNonSignal :: IO a -> (SomeException -> IO a) -> IO a #

A drop-in replacement for `catch`, which allows us to catch anything but a signal. Useful for situations where we don't want to inhibit ctrl-C.

tryNonSignal :: IO a -> IO (Either SomeException a) #

stdoutIsAPipe :: IO Bool #