list-t 0.4.3 → 0.4.4
raw patch · 2 files changed
+8/−2 lines, 2 filesdep +mtlPVP ok
version bump matches the API change (PVP)
Dependencies added: mtl
API changes (from Hackage documentation)
+ ListT: instance MonadError e m => MonadError e (ListT m)
Files
- library/ListT.hs +6/−1
- list-t.cabal +2/−1
library/ListT.hs view
@@ -39,6 +39,7 @@ import BasePrelude hiding (uncons, toList, yield, fold, traverse, head, tail, take, drop, repeat, null, traverse_, splitAt) import Control.Monad.Morph hiding (MonadTrans(..)) import Control.Monad.IO.Class+import Control.Monad.Error.Class import Control.Monad.Trans.Class import Control.Monad.Trans.Reader import Control.Monad.Trans.Maybe@@ -54,7 +55,7 @@ -- <http://hackage.haskell.org/package/monadplus "monadplus"> -- with it. newtype ListT m a =- ListT (m (Maybe (a, ListT m a)))+ ListT { unListT :: m (Maybe (a, ListT m a)) } instance Monad m => Monoid (ListT m a) where mempty =@@ -148,6 +149,10 @@ Nothing -> mzero Just (h, t) -> cons h t #endif++instance MonadError e m => MonadError e (ListT m) where+ throwError = ListT . throwError+ catchError m handler = ListT $ catchError (unListT m) $ unListT . handler -- * Classes -------------------------
list-t.cabal view
@@ -1,7 +1,7 @@ name: list-t version:- 0.4.3+ 0.4.4 synopsis: ListT done right description:@@ -45,6 +45,7 @@ build-depends: mmorph == 1.0.*, monad-control >= 0.3 && < 1.1,+ mtl == 2.*, transformers-base == 0.4.*, transformers >= 0.2 && < 0.5, base-prelude == 0.1.*