packages feed

atl 15322.2 → 15409.1

raw patch · 3 files changed

+16/−1 lines, 3 filesPVP ok

version bump matches the API change (PVP)

API changes (from Hackage documentation)

+ Control.Arrow.Reader: instance ArrowChoice s => ArrowChoice (ReaderT r s)
+ Control.Arrow.Writer: instance (Monoid w, ArrowChoice r) => ArrowChoice (WriterT w r)

Files

Control/Arrow/Reader.hs view
@@ -38,6 +38,14 @@   ReaderT f <+> ReaderT g = ReaderT (f <+> g); }; +instance (ArrowChoice s) => ArrowChoice (ReaderT r s) where {+  left (ReaderT x) = ReaderT $ let {+                       f :: (Either a b, r) -> Either (a, r) b;+                       f (Left  x, r) = Left (x, r);+                       f (Right y, r) = Right y;+                     } in arr f >>> left x;+};+ instance (ArrowLoop s) => ArrowLoop (ReaderT r s) where {   loop = ReaderT . loop . (<<< swap_snds_A) . runReaderT; };
Control/Arrow/Writer.hs view
@@ -41,6 +41,13 @@   WriterT f <+> WriterT g = WriterT (f <+> g); }; +instance (Monoid w, ArrowChoice r) => ArrowChoice (WriterT w r) where {+  left (WriterT x) = WriterT $ let {+                       f (Left (x, w)) = (Left x, w);+                       f (Right y)     = (Right y, mempty);+                     } in left x >>> arr f;+};+ instance (Monoid w, ArrowLoop r) => ArrowLoop (WriterT w r) where {   loop = WriterT . loop . (>>> swap_snds_A) . runWriterT; };
atl.cabal view
@@ -1,5 +1,5 @@ Name:atl-Version:15322.2+Version:15409.1 Description:Arrow Transformer Library License:LGPL License-File:license.txt