packages feed

pipes-errors 0.2.1 → 0.3

raw patch · 9 files changed

+84/−80 lines, 9 filesdep ~errors

Dependency ranges changed: errors

Files

CHANGELOG.md view
@@ -3,13 +3,18 @@ follows the formatting recommendations from [Keep a CHANGELOG](http://keepachangelog.com/). +## [0.3][0.3] - 2015-5-21+### Changed+- Upgrade errors dependency to 2.0.0.+ ## [0.2.1][0.2.1] - 2015-4-13+### Changed - Increase upper bounds for `base`. - Set upper bounds for `errors-2.0` which is known to fail.  ## [0.2][0.2] - 2014-3-11 ### Added-- Add `flipEP`.+- `flipEP`.  ### Changed - Move orphan instances to a single module.@@ -18,4 +23,6 @@ ## 0.1 - 2014-3-1 - Initial release. +[0.3]: https://github.com/jdnavarro/pipes-errors/compare/v0.3...HEAD+[0.2.1]: https://github.com/jdnavarro/pipes-errors/compare/v0.2...v0.2.1 [0.2]: https://github.com/jdnavarro/pipes-errors/compare/v0.1...v0.2
− Pipes/Lift/EitherRT.hs
@@ -1,31 +0,0 @@-module Pipes.Lift.EitherRT where--import Control.Monad ((>=>))-import Pipes (Proxy, lift)-import Pipes.Lift (distribute)-import Pipes.Internal (unsafeHoist)-import Control.Error-  ( EitherT(..)-  , EitherRT(..)-  , runEitherT-  , runEitherRT-  , flipET-  , flipE-  )-import Pipes.Lift.EitherT---- | Turn 'EitherT' in the base monad into 'EitherRT'-eitherRP :: Monad m-         => Proxy a' a b' b (EitherT e m) r-         -> Proxy a' a b' b (EitherRT r m) e-eitherRP = unsafeHoist lift . runEitherP-       >=> lift . EitherRT . EitherT . return-{-# INLINABLE eitherRP #-}---- | Turn 'EitherRT' in the base monad into 'EitherT'-runEitherRP :: Monad m-            => Proxy a' a b' b (EitherRT r m) e-            -> Proxy a' a b' b (EitherT e m) r-runEitherRP = unsafeHoist lift . runEitherT . flipET . runEitherRT . distribute-          >=> lift . EitherT . return . flipE-{-# INLINABLE runEitherRP #-}
− Pipes/Lift/EitherT.hs
@@ -1,30 +0,0 @@-module Pipes.Lift.EitherT where--import Control.Monad ((>=>))-import Pipes (Proxy, lift)-import Pipes.Lift (distribute)-import Pipes.Internal (unsafeHoist)-import Control.Error (EitherT(..), runEitherT, flipE)-import Pipes.Lift.Error.Instances ()---- | Wrap the base monad in 'EitherT'.-eitherP :: Monad m-        => Proxy a' a b' b m (Either e r)-        -> Proxy a' a b' b (EitherT e m) r-eitherP = unsafeHoist lift >=> lift . EitherT . return-{-# INLINABLE eitherP #-}---- | Run 'EitherT' in the base monad.-runEitherP :: Monad m-           => Proxy a' a b' b (EitherT e m) r-           -> Proxy a' a b' b m (Either e r)-runEitherP = runEitherT . distribute-{-# INLINABLE runEitherP #-}---- | Flip the type variables in the 'EitherT' base monad.-flipEP :: Monad m-       => Proxy a' a b' b (EitherT a m) b-       -> Proxy a' a b' b (EitherT b m) a-flipEP = unsafeHoist lift . runEitherT . distribute-     >=> lift . EitherT . return . flipE-{-# INLINABLE flipEP #-}
Pipes/Lift/Error.hs view
@@ -1,9 +1,9 @@ module Pipes.Lift.Error   (   -- * Re-exports-    module Pipes.Lift.EitherT-  , module Pipes.Lift.EitherRT+    module Pipes.Lift.ExceptT+  , module Pipes.Lift.ExceptRT   ) where -import Pipes.Lift.EitherT-import Pipes.Lift.EitherRT+import Pipes.Lift.ExceptT+import Pipes.Lift.ExceptRT
Pipes/Lift/Error/Instances.hs view
@@ -2,10 +2,7 @@ module Pipes.Lift.Error.Instances where  import Pipes (MFunctor, hoist)-import Control.Error (EitherT(..), EitherRT(..), runEitherT)--instance MFunctor (EitherT e) where-    hoist nat m = EitherT (nat (runEitherT m))+import Control.Error (ExceptRT(ExceptRT, runExceptRT)) -instance MFunctor (EitherRT r) where-    hoist nat m = EitherRT (hoist nat (runEitherRT m))+instance MFunctor (ExceptRT r) where+    hoist nat m = ExceptRT (hoist nat (runExceptRT m))
+ Pipes/Lift/ExceptRT.hs view
@@ -0,0 +1,31 @@+module Pipes.Lift.ExceptRT where++import Control.Monad ((>=>))+import Pipes (Proxy, lift)+import Pipes.Lift (distribute)+import Pipes.Internal (unsafeHoist)+import Control.Error+  ( ExceptT(..)+  , ExceptRT(..)+  , runExceptT+  , runExceptRT+  , flipET+  , flipEither+  )+import Pipes.Lift.ExceptT++-- | Turn 'ExceptT' in the base monad into 'ExceptRT'+exceptRP :: Monad m+         => Proxy a' a b' b (ExceptT e m) r+         -> Proxy a' a b' b (ExceptRT r m) e+exceptRP = unsafeHoist lift . runExceptP+       >=> lift . ExceptRT . ExceptT . return+{-# INLINABLE exceptRP #-}++-- | Turn 'ExceptRT' in the base monad into 'ExceptT'+runExceptRP :: Monad m+            => Proxy a' a b' b (ExceptRT r m) e+            -> Proxy a' a b' b (ExceptT e m) r+runExceptRP = unsafeHoist lift . runExceptT . flipET . runExceptRT . distribute+          >=> lift . ExceptT . return . flipEither+{-# INLINABLE runExceptRP #-}
+ Pipes/Lift/ExceptT.hs view
@@ -0,0 +1,30 @@+module Pipes.Lift.ExceptT where++import Control.Monad ((>=>))+import Pipes (Proxy, lift)+import Pipes.Lift (distribute)+import Pipes.Internal (unsafeHoist)+import Control.Error (ExceptT(..), runExceptT, flipEither)+import Pipes.Lift.Error.Instances ()++-- | Wrap the base monad in 'ExceptT'.+exceptP :: Monad m+        => Proxy a' a b' b m (Either e r)+        -> Proxy a' a b' b (ExceptT e m) r+exceptP = unsafeHoist lift >=> lift . ExceptT . return+{-# INLINABLE exceptP #-}++-- | Run 'ExceptT' in the base monad.+runExceptP :: Monad m+           => Proxy a' a b' b (ExceptT e m) r+           -> Proxy a' a b' b m (Either e r)+runExceptP = runExceptT . distribute+{-# INLINABLE runExceptP #-}++-- | Flip the type variables in the 'ExceptT' base monad.+flipEP :: Monad m+       => Proxy a' a b' b (ExceptT a m) b+       -> Proxy a' a b' b (ExceptT b m) a+flipEP = unsafeHoist lift . runExceptT . distribute+     >=> lift . ExceptT . return . flipEither+{-# INLINABLE flipEP #-}
README.md view
@@ -1,8 +1,9 @@ # Pipes Errors +[![Hackage Version](https://img.shields.io/hackage/v/pipes-errors.svg)](https://hackage.haskell.org/package/pipes-errors) [![Build Status](https://img.shields.io/travis/plutonbrb/pipes-errors.svg)](https://travis-ci.org/jdnavarro/pipes-errors)+ This package is analogous to the [`errors`](http://hackage.haskell.org/package/errors) package but for base monad manipulation in the presence of `Proxy` monad transformers. -It also provides orphan `MFunctor` instances for `EitherT` and-`EitherRT`.+It also provides an orphan `MFunctor` instance for `ExceptRT`.
pipes-errors.cabal view
@@ -1,5 +1,5 @@ name:                pipes-errors-version:             0.2.1+version:             0.3 cabal-version:       >=1.10 tested-with:         GHC == 7.6.3, GHC == 7.8.4, GHC == 7.10.1 build-type:          Simple@@ -16,8 +16,7 @@   @<http://hackage.haskell.org/package/errors errors>@ package but for   base monad manipulation in the presence of @Proxy@ monad transformers.   .-  It also provides orphan @MFunctor@ instances for @EitherT@ and-  @EitherRT@.+  It also provides an orphan @MFunctor@ instance for @ExceptRT@. extra-source-files: CHANGELOG.md README.md  source-repository head@@ -27,10 +26,10 @@ library   exposed-modules:     Pipes.Lift.Error                      , Pipes.Lift.Error.Instances-                     , Pipes.Lift.EitherT-                     , Pipes.Lift.EitherRT+                     , Pipes.Lift.ExceptT+                     , Pipes.Lift.ExceptRT   build-depends:       base >=4.6 && <4.9,-                       errors >=1.3 && <2.0,+                       errors >=2.0.0,                        pipes >=4.0   default-language:    Haskell2010   ghc-options:         -Wall