(a -> IO ()) -> Maybe a -> IO ()

closeFdWith :: (Fd -> IO ()) -> Fd -> IO ()
base GHC.Conc.IO, base GHC.Conc
Close a file descriptor in a concurrency-safe way (GHC only). If you are using threadWaitRead or threadWaitWrite to perform blocking I/O, you must use this function to close file descriptors, or blocked threads may not be woken. Any threads that are blocked on the file descriptor via threadWaitRead or threadWaitWrite will be unblocked by having IO exceptions thrown.
traverse_ :: (Foldable t, Applicative f) => (a -> f b) -> t a -> f ()
base Data.Foldable
Map each element of a structure to an action, evaluate these actions from left to right, and ignore the results.
for_ :: (Foldable t, Applicative f) => t a -> (a -> f b) -> f ()
base Data.Foldable
for_ is traverse_ with its arguments flipped.
closeFd :: EventManager -> (Fd -> IO ()) -> Fd -> IO ()
base System.Event
Close a file descriptor in a race-safe way.
mapM_ :: (Foldable t, Monad m) => (a -> m b) -> t a -> m ()
base Data.Foldable
Map each element of a structure to a monadic action, evaluate these actions from left to right, and ignore the results.
forM_ :: (Foldable t, Monad m) => t a -> (a -> m b) -> m ()
base Data.Foldable
forM_ is mapM_ with its arguments flipped.
extMp :: (MonadPlus m, Typeable a, Typeable b) => (a -> m a) -> (b -> m b) -> a -> m a
syb Data.Generics.Aliases
Extend a generic MonadPlus transformation by a type-specific case
(<=<) :: Monad m => (b -> m c) -> (a -> m b) -> (a -> m c)
base Control.Monad
Right-to-left Kleisli composition of monads. (>=>), with the arguments flipped
(>=>) :: Monad m => (a -> m b) -> (b -> m c) -> (a -> m c)
base Control.Monad
Left-to-right Kleisli composition of monads.
extM :: (Monad m, Typeable a, Typeable b) => (a -> m a) -> (b -> m b) -> a -> m a
syb Data.Generics.Aliases
Extend a generic monadic transformation by a type-specific case
gunfold :: Data a => (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c a
base Data.Data
mkMp :: (MonadPlus m, Typeable a, Typeable b) => (b -> m b) -> a -> m a
syb Data.Generics.Aliases
Make a generic monadic transformation for MonadPlus; use "const mzero" (i.e., failure) instead of return as default.
gmapMo :: (Data a, MonadPlus m) => (forall d. Data d => d -> m d) -> a -> m a
base Data.Data
gmapMp :: (Data a, MonadPlus m) => (forall d. Data d => d -> m d) -> a -> m a
base Data.Data
gfoldl :: Data a => (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> a -> c a
base Data.Data
mkM :: (Monad m, Typeable a, Typeable b) => (b -> m b) -> a -> m a
syb Data.Generics.Aliases
Make a generic monadic transformation; start from a type-specific case; resort to return otherwise
gmapM :: (Data a, Monad m) => (forall d. Data d => d -> m d) -> a -> m a
base Data.Data
ext1M :: (Monad m, Data d, Typeable1 t) => (forall e. Data e => e -> m e) -> (forall f. Data f => t f -> m (t f)) -> d -> m d
syb Data.Generics.Aliases
Type extension of monadic transformations for type constructors
ext2M :: (Monad m, Data d, Typeable2 t) => (forall e. Data e => e -> m e) -> (forall d1 d2. (Data d1, Data d2) => t d1 d2 -> m (t d1 d2)) -> d -> m d
syb Data.Generics.Aliases
Type extension of monadic transformations for type constructors