packages feed

arrows 0.4.4.0 → 0.4.4.1

raw patch · 2 files changed

+22/−1 lines, 2 filesPVP: major bump suggested

API removals or changes: PVP suggests a major version bump

API changes (from Hackage documentation)

- Control.Arrow.Operations: class Arrow a => ArrowError ex a | a -> ex
+ Control.Arrow.Operations: class Arrow a => ArrowError ex a | a -> ex where handle f h = tryInUnless f (arr snd) h newError f = handle (f >>> arr Right) (arr (Left . snd))

Files

Control/Arrow/Transformer/Automaton.hs view
@@ -47,12 +47,33 @@ 	first (Automaton f) = 		Automaton (first f >>> 			 arr (\((x', c), y) -> ((x', y), first c)))+	second (Automaton f) =+		Automaton (second f >>>+			 arr (\(x, (y', c)) -> ((x, y'), second c)))+	Automaton f1 *** Automaton f2 =+		Automaton ((f1 *** f2) >>>+			 arr (\((x', c1), (y', c2)) -> ((x', y'), c1 *** c2)))+	Automaton f1 &&& Automaton f2 =+		Automaton ((f1 &&& f2) >>>+			 arr (\((x1, c1), (x2, c2)) -> ((x1, x2), c1 &&& c2)))  instance ArrowChoice a => ArrowChoice (Automaton a) where 	left (Automaton f) = left_f 		where	left_f = Automaton (left f >>> arr combine) 			combine (Left (y, cf)) = (Left y, left cf) 			combine (Right z) = (Right z, left_f)+	right (Automaton f) = right_f+		where	right_f = Automaton (right f >>> arr combine)+			combine (Left z) = (Left z, right_f)+			combine (Right (y, cf)) = (Right y, right cf)+	Automaton f1 +++ Automaton f2 =+		Automaton ((f1 +++ f2) >>> arr combine)+		where	combine (Left  (x, c)) = (Left x,  c +++ Automaton f2)+			combine (Right (x, c)) = (Right x, Automaton f1 +++ c)+	Automaton f1 ||| Automaton f2 =+		Automaton ((f1 +++ f2) >>> arr combine)+		where	combine (Left  (x, c)) = (x, c ||| Automaton f2)+			combine (Right (x, c)) = (x, Automaton f1 ||| c)  instance ArrowZero a => ArrowZero (Automaton a) where 	zeroArrow = Automaton zeroArrow
arrows.cabal view
@@ -1,5 +1,5 @@ Name:           arrows-Version:        0.4.4.0+Version:        0.4.4.1 Build-Depends:  base >= 4.0 && < 6, Stream Build-Type:     Simple License:        BSD3