summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorjoe <joe@jerkface.net>2014-07-30 01:22:50 -0400
committerjoe <joe@jerkface.net>2014-07-30 01:22:50 -0400
commitab8927d7d78d70f5074bb7b1415c9ac4547ea9b3 (patch)
tree34924648f50a48483f7ecfbf5efb71280d6dee0d
parentacd9892756839df0de60ef4d9c25a7057f8d40b6 (diff)
cabal file adjustments
-rw-r--r--TraversableT.hs12
-rw-r--r--presence.cabal6
2 files changed, 14 insertions, 4 deletions
diff --git a/TraversableT.hs b/TraversableT.hs
index 98a97bf6..cc187951 100644
--- a/TraversableT.hs
+++ b/TraversableT.hs
@@ -4,7 +4,7 @@ import Data.Traversable
4import Control.Monad (join,MonadPlus(..)) 4import Control.Monad (join,MonadPlus(..))
5import Control.Monad.Trans.Class 5import Control.Monad.Trans.Class
6import Control.Applicative 6import Control.Applicative
7import Data.Foldable (Foldable(foldMap)) 7import Data.Foldable (Foldable(foldMap), toList)
8import Data.Maybe (maybeToList) 8import Data.Maybe (maybeToList)
9 9
10-- | 10-- |
@@ -82,3 +82,13 @@ liftMaybe = liftT . maybeToList
82liftIOMaybe :: IO (Maybe a) -> TraversableT [] IO a 82liftIOMaybe :: IO (Maybe a) -> TraversableT [] IO a
83liftIOMaybe = liftMT . fmap maybeToList 83liftIOMaybe = liftMT . fmap maybeToList
84 84
85handleT :: ( Monad m
86 , Traversable t ) =>
87 (t a -> TraversableT t m a)
88 -> TraversableT t m a
89 -> TraversableT t m a
90handleT catcher body = TraversableT $ do
91 tx <- runTraversableT body
92 if null (toList tx)
93 then runTraversableT $ catcher tx
94 else return tx
diff --git a/presence.cabal b/presence.cabal
index a54213bb..cbf857f7 100644
--- a/presence.cabal
+++ b/presence.cabal
@@ -16,10 +16,10 @@ data-dir: ""
16executable presence 16executable presence
17 build-depends: base -any, stm -any, text (>=0.11.2.0), xml-types -any, containers -any, 17 build-depends: base -any, stm -any, text (>=0.11.2.0), xml-types -any, containers -any,
18 network -any, time -any, transformers -any, resourcet -any, bytestring -any, 18 network -any, time -any, transformers -any, resourcet -any, bytestring -any,
19 mtl -any, mmorph -any, conduit (>=1.0.4), xml-conduit -any, void -any, random -any, 19 mtl -any, mmorph -any, conduit (>=1.0.4), void -any, random -any,
20 data-default -any, blaze-builder-conduit -any, blaze-builder -any, unix -any, 20 data-default -any, blaze-builder -any, unix -any, conduit-extra -any,
21 binary -any, directory -any, cpu -any, template-haskell -any, deepseq -any, 21 binary -any, directory -any, cpu -any, template-haskell -any, deepseq -any,
22 filepath -any, hinotify -any, process -any 22 filepath -any, hinotify -any, process -any, xml-conduit -any
23 main-is: xmppServer.hs 23 main-is: xmppServer.hs
24 buildable: True 24 buildable: True
25 cpp-options: -DRENDERFLUSH 25 cpp-options: -DRENDERFLUSH