diff options
author | joe <joe@jerkface.net> | 2014-03-05 20:51:25 -0500 |
---|---|---|
committer | joe <joe@jerkface.net> | 2014-03-05 20:51:25 -0500 |
commit | e2515cf8d4fe6e775fcec5863f87acca5295e92c (patch) | |
tree | 1db88e1287464202cd4cf0d423a14dde602ce99a /TraversableT.hs | |
parent | a9934d3ccc5ab92b345eda277472d88e7f7edad7 (diff) |
untested: inform clients about remote presences
Diffstat (limited to 'TraversableT.hs')
-rw-r--r-- | TraversableT.hs | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/TraversableT.hs b/TraversableT.hs index cd04731c..98a97bf6 100644 --- a/TraversableT.hs +++ b/TraversableT.hs | |||
@@ -5,6 +5,7 @@ import Control.Monad (join,MonadPlus(..)) | |||
5 | import Control.Monad.Trans.Class | 5 | import Control.Monad.Trans.Class |
6 | import Control.Applicative | 6 | import Control.Applicative |
7 | import Data.Foldable (Foldable(foldMap)) | 7 | import Data.Foldable (Foldable(foldMap)) |
8 | import Data.Maybe (maybeToList) | ||
8 | 9 | ||
9 | -- | | 10 | -- | |
10 | -- | 11 | -- |
@@ -75,4 +76,9 @@ liftCatch :: (m (t a) -> (e -> m (t a)) -> m (t a)) -> | |||
75 | liftCatch catchError m h = TraversableT $ runTraversableT m | 76 | liftCatch catchError m h = TraversableT $ runTraversableT m |
76 | `catchError` \e -> runTraversableT (h e) | 77 | `catchError` \e -> runTraversableT (h e) |
77 | 78 | ||
79 | liftMaybe :: Monad m => Maybe a -> TraversableT [] m a | ||
80 | liftMaybe = liftT . maybeToList | ||
81 | |||
82 | liftIOMaybe :: IO (Maybe a) -> TraversableT [] IO a | ||
83 | liftIOMaybe = liftMT . fmap maybeToList | ||
78 | 84 | ||