atl 15310.92 → 15320.1
raw patch · 9 files changed
+24/−24 lines, 9 filesPVP ok
version bump matches the API change (PVP)
API changes (from Hackage documentation)
- Control.Arrow.Abort: instance (ArrowChoice r, ArrowTrans xT, Arrow (xT (AbortT v r))) => ArrowAbort v (xT (AbortT v r))
- Control.Arrow.Abort: instance ArrowTrans (AbortT v)
- Control.Arrow.Reader: instance (Arrow s, ArrowTrans xT, Arrow (xT (ReaderT r s))) => ArrowReader r (xT (ReaderT r s))
- Control.Arrow.Reader: instance ArrowTrans (ReaderT r)
- Control.Arrow.State: instance (Arrow r, ArrowTrans xT, Arrow (xT (StateT s r))) => ArrowState s (xT (StateT s r))
- Control.Arrow.State: instance ArrowTrans (StateT s)
- Control.Arrow.Trans: class ArrowTrans xT
- Control.Arrow.Trans: lift :: (ArrowTrans xT, Arrow r) => r a b -> xT r a b
- Control.Arrow.Trans: tmap :: (ArrowTrans xT, Arrow r, Arrow s) => (forall a b. r a b -> s a b) -> xT r a b -> xT s a b
+ Control.Arrow.Abort: instance (ArrowChoice r, ArrowTransformer xT, Arrow (xT (AbortT v r))) => ArrowAbort v (xT (AbortT v r))
+ Control.Arrow.Abort: instance ArrowTransformer (AbortT v)
+ Control.Arrow.Reader: instance (Arrow s, ArrowTransformer xT, Arrow (xT (ReaderT r s))) => ArrowReader r (xT (ReaderT r s))
+ Control.Arrow.Reader: instance ArrowTransformer (ReaderT r)
+ Control.Arrow.State: instance (Arrow r, ArrowTransformer xT, Arrow (xT (StateT s r))) => ArrowState s (xT (StateT s r))
+ Control.Arrow.State: instance ArrowTransformer (StateT s)
+ Control.Arrow.Transformer: class ArrowTransformer xT
+ Control.Arrow.Transformer: lift :: (ArrowTransformer xT, Arrow r) => r a b -> xT r a b
+ Control.Arrow.Transformer: tmap :: (ArrowTransformer xT, Arrow r, Arrow s) => (forall a b. r a b -> s a b) -> xT r a b -> xT s a b
Files
- Control/Arrow/Abort.hs +3/−3
- Control/Arrow/Abort/Class.hs +1/−1
- Control/Arrow/List/Class.hs +1/−1
- Control/Arrow/Reader.hs +3/−3
- Control/Arrow/Reader/Class.hs +1/−1
- Control/Arrow/State.hs +3/−3
- Control/Arrow/Trans.hs +0/−10
- Control/Arrow/Transformer.hs +10/−0
- atl.cabal +2/−2
Control/Arrow/Abort.hs view
@@ -5,7 +5,7 @@ import Control.Monad; import Control.Category; import Control.Arrow;-import Control.Arrow.Trans;+import Control.Arrow.Transformer; import Control.Arrow.Abort.Class; newtype AbortT v r a b = AbortT { unwrapAbortT :: r a (Either v b) };@@ -13,7 +13,7 @@ runAbortT :: Arrow r => AbortT v r a v -> r a v; runAbortT = (>>> arr (either id id)) . unwrapAbortT; -instance ArrowTrans (AbortT v) where {+instance ArrowTransformer (AbortT v) where { lift = AbortT . (>>> arr Right); tmap f = AbortT . f . unwrapAbortT; };@@ -33,6 +33,6 @@ abort = AbortT $ arr Left; }; -instance (ArrowChoice r, ArrowTrans xT, Arrow (xT (AbortT v r))) => ArrowAbort v (xT (AbortT v r)) where {+instance (ArrowChoice r, ArrowTransformer xT, Arrow (xT (AbortT v r))) => ArrowAbort v (xT (AbortT v r)) where { abort = lift abort; };
Control/Arrow/Abort/Class.hs view
@@ -3,7 +3,7 @@ module Control.Arrow.Abort.Class where import Control.Arrow;-import Control.Arrow.Trans;+import Control.Arrow.Transformer; class Arrow r => ArrowAbort v r | r -> v where { abort :: r v a; -- terminate with final value
Control/Arrow/List/Class.hs view
@@ -1,7 +1,7 @@ module Control.Arrow.List.Class where import Control.Arrow;-import Control.Arrow.Trans;+import Control.Arrow.Transformer; class Arrow r => ArrowList r where { arrL :: ( a -> [b]) -> r a b;
Control/Arrow/Reader.hs view
@@ -5,7 +5,7 @@ import Control.Monad; import Control.Category; import Control.Arrow;-import Control.Arrow.Trans;+import Control.Arrow.Transformer; import Control.Arrow.Reader.Class; newtype ReaderT r s a b = ReaderT { runReaderT :: r -> s a b };@@ -16,7 +16,7 @@ outlineReaderT :: (Arrow s) => s (r, a) b -> ReaderT r s a b; outlineReaderT = ReaderT . flip ((>>>) . arr . (&&& id) . const); -instance ArrowTrans (ReaderT r) where {+instance ArrowTransformer (ReaderT r) where { lift = ReaderT . const; tmap f = ReaderT . liftM f . runReaderT; };@@ -41,7 +41,7 @@ local = withReaderT; }; -instance (Arrow s, ArrowTrans xT, Arrow (xT (ReaderT r s))) => ArrowReader r (xT (ReaderT r s)) where {+instance (Arrow s, ArrowTransformer xT, Arrow (xT (ReaderT r s))) => ArrowReader r (xT (ReaderT r s)) where { ask = lift ask; local = undefined; };
Control/Arrow/Reader/Class.hs view
@@ -3,7 +3,7 @@ module Control.Arrow.Reader.Class where import Control.Arrow;-import Control.Arrow.Trans;+import Control.Arrow.Transformer; class Arrow s => ArrowReader r s | s -> r where { ask :: s () r;
Control/Arrow/State.hs view
@@ -3,13 +3,13 @@ import Prelude hiding ((.), id); import Control.Arrow;-import Control.Arrow.Trans;+import Control.Arrow.Transformer; import Control.Arrow.State.Class; import Control.Category; newtype StateT s r a b = StateT { runStateT :: r (a, s) (b, s) }; -instance ArrowTrans (StateT s) where {+instance ArrowTransformer (StateT s) where { lift = StateT . (*** id); tmap f = StateT . f . runStateT; };@@ -36,7 +36,7 @@ put = StateT $ arr $ \ (s, _) -> ((), s); }; -instance (Arrow r, ArrowTrans xT, Arrow (xT (StateT s r))) => ArrowState s (xT (StateT s r)) where {+instance (Arrow r, ArrowTransformer xT, Arrow (xT (StateT s r))) => ArrowState s (xT (StateT s r)) where { get = lift get; put = lift put; };
− Control/Arrow/Trans.hs
@@ -1,10 +0,0 @@-{-# LANGUAGE ExistentialQuantification #-}--module Control.Arrow.Trans where--import Control.Arrow;--class ArrowTrans xT where {- lift :: Arrow r => r a b -> xT r a b;- tmap :: (Arrow r, Arrow s) => (∀ a b . r a b -> s a b) -> xT r a b -> xT s a b;-};
+ Control/Arrow/Transformer.hs view
@@ -0,0 +1,10 @@+{-# LANGUAGE ExistentialQuantification #-}++module Control.Arrow.Transformer where++import Control.Arrow;++class ArrowTransformer xT where {+ lift :: Arrow r => r a b -> xT r a b;+ tmap :: (Arrow r, Arrow s) => (∀ a b . r a b -> s a b) -> xT r a b -> xT s a b;+};
atl.cabal view
@@ -1,5 +1,5 @@ Name:atl-Version:15310.92+Version:15320.1 Description:Arrow Transformer Library License:LGPL License-File:license.txt@@ -13,5 +13,5 @@ Library { Build-Depends: base >= 4 && < 5 Extensions: UnicodeSyntax, RankNTypes, MultiParamTypeClasses, FlexibleInstances, FlexibleContexts- Exposed-Modules: Control.Arrow.Trans, Control.Arrow.Reader, Control.Arrow.Reader.Class, Control.Arrow.List.Class, Control.Arrow.Abort, Control.Arrow.Abort.Class, Control.Arrow.State, Control.Arrow.State.Class+ Exposed-Modules: Control.Arrow.Transformer, Control.Arrow.Reader, Control.Arrow.Reader.Class, Control.Arrow.List.Class, Control.Arrow.Abort, Control.Arrow.Abort.Class, Control.Arrow.State, Control.Arrow.State.Class }