úÎ×Ò²B      !"#$ % & '()*+,- . / 0 1 2 3 4 5 6789:;<=>?@A +non-portable (multi-parameter type classes) experimentalross@soi.city.ac.ukBCportable experimentalross@soi.city.ac.uk,Construct a new arrow from an existing one. 'A transformation of arrows, preserving D, E and F. !Typical usage in arrow notation:  proc p -> ...  (|lift cmd|) +non-portable (multi-parameter type classes) experimentalross@soi.city.ac.ukBAn arrow type that can be used to interpret synchronous circuits. A delay component. the value to return initially. #an arrow that propagates its input  with a one-tick delay. 4An arrow type that includes errors (or exceptions). Minimal definition:  and  . TODO:E the operations here are inconsistent with other arrow transformers. Raise an error. !Traditional exception construct. !Typical usage in arrow notation:  proc p -> ...  body `handle` \ex -> handler "computation that may raise errors computation to handle errors $Exception construct in the style of Exceptional Syntax, $ by Nick Benton and Andrew Kennedy, JFP 11(4):395-410, July 2001. !Typical usage in arrow notation:  proc p -> ...  (|tryInUnless  body  (\res -> success)  (\ex -> handler)  |) "computation that may raise errors *computation to receive successful results computation to handle errors +Handler that returns the error as a value. 7An arrow type that collects additional output (of some G type). "Add a piece of additional output. >Run a subcomputation in the same arrow, making its additional  output accessible. !Typical usage in arrow notation:  proc p -> do  ... ' (value, output) <- (|newWriter cmd|) 0An arrow type that provides a modifiable state,  based of section 9 of Generalising Monads to Arrows, by John Hughes,  Science of Computer Programming 37:67-111, May 2000. 'Obtain the current value of the state. !Assign a new value to the state. @An arrow type that provides a read-only state (an environment). + If you also need to modify the state, use . 'Obtain the current value of the state. =Run a subcomputation in the same arrow, but with a different ; environment. The environment of the outer computation is  unaffected. !Typical usage in arrow notation:  proc p -> ...  (|newReader cmd|) env A suitable value for   when the arrow type belongs to  H%. To use it, you must define either  or  . "computation that may raise errors *computation to receive successful results computation to handle errors        +non-portable (multi-parameter type classes) experimentalross@soi.city.ac.uk Adding a ,Control.Arrow.Transformer.Stream.StreamArrow to an A arrow type, but not necessarily as the outer arrow transformer. ?Typically a composite arrow type is built by applying a series A of arrow transformer to a base arrow (usually either a function  arrow or a IJ* arrow. One can add a transformer to the  top of this stack using the Control.Arrow.Transformer.lift  method of the *Control.Arrow.Transformer.ArrowTransformer class, C or remove a state transformer from the top of the stack using the  *Control.Arrow.Transformer.Stream.runStream encapsulation operator. F The methods of this class add and remove state transformers anywhere  in the stack. In the instance  6 instance Arrow a => ArrowAddStream (ArrowStream a) a they are equivalent to Control.Arrow.Transformer.lift and  *Control.Arrow.Transformer.Stream.runStream respectively. 6 Instances are lifted through other transformers with ! instance ArrowAddStream a a' => , ArrowAddStream (FooArrow a) (FooArrow a') =Lift a computation from an arrow to a stream processing one. !Typical usage in arrow notation:  proc p -> ...  (|liftStream cmd|) .Run a stream processor on a stream of inputs,  obtaining a stream of outputs. !Typical usage in arrow notation:   proc p -> do  ... & ys <- (|elimStream (\x -> ...)|) xs Here xs refers to the input stream and x to individual  elements of that stream. ys is bound to the output stream.  Adding a *Control.Arrow.Transformer.Error.ErrorArrow to an A arrow type, but not necessarily as the outer arrow transformer. ?Typically a composite arrow type is built by applying a series A of arrow transformer to a base arrow (usually either a function  arrow or a IJ* arrow. One can add a transformer to the  top of this stack using the Control.Arrow.Transformer.lift  method of the *Control.Arrow.Transformer.ArrowTransformer class, C or remove a state transformer from the top of the stack using the  (Control.Arrow.Transformer.Error.runError encapsulation operator. F The methods of this class add and remove state transformers anywhere  in the stack. In the instance  : instance Arrow a => ArrowAddError ex (ArrowError ex a) a they are equivalent to Control.Arrow.Transformer.lift and  (Control.Arrow.Transformer.Error.runError respectively. 6 Instances are lifted through other transformers with  # instance ArrowAddError ex a a' => . ArrowAddError ex (FooArrow a) (FooArrow a') This could be combined with &Control.Arrow.Transformer.Error.handle, ? since the resulting arrow is always the arrow of the handler. I Separating them has the advantage of consistency with the other arrows, 2 and might give more helpful type error messages. =Lift a computation from an arrow to one with error handling. !Typical usage in arrow notation:  proc p -> ...  (|liftError cmd|) *Elimination of errors from a computation, $ by completely handling any errors. !Typical usage in arrow notation:  proc p -> ... " body `elimError` \ex -> handler  Adding a ,Control.Arrow.Transformer.Writer.WriterArrow to an A arrow type, but not necessarily as the outer arrow transformer. ?Typically a composite arrow type is built by applying a series A of arrow transformer to a base arrow (usually either a function  arrow or a IJ* arrow. One can add a transformer to the  top of this stack using the Control.Arrow.Transformer.lift  method of the *Control.Arrow.Transformer.ArrowTransformer class, C or remove a state transformer from the top of the stack using the  *Control.Arrow.Transformer.Writer.runWriter encapsulation operator. F The methods of this class add and remove state transformers anywhere  in the stack. In the instance  : instance Arrow a => ArrowAddWriter w (ArrowWriter w a) a they are equivalent to Control.Arrow.Transformer.lift and  *Control.Arrow.Transformer.Writer.runWriter respectively. 6 Instances are lifted through other transformers with # instance ArrowAddWriter w a a' => . ArrowAddWriter w (FooArrow a) (FooArrow a') ;Lift a computation from an arrow to one with added output. !Typical usage in arrow notation:  proc p -> ...  (|liftWriter cmd|) 4Elimination of an output writer from a computation, # providing the accumulated output. !Typical usage in arrow notation:  proc p -> do  ... ) (result, output) <- (|elimWriter cmd|)  Adding a ,Control.Arrow.Transformer.Reader.ReaderArrow to an A arrow type, but not necessarily as the outer arrow transformer. ?Typically a composite arrow type is built by applying a series A of arrow transformer to a base arrow (usually either a function  arrow or a IJ* arrow. One can add a transformer to the  top of this stack using the Control.Arrow.Transformer.lift  method of the *Control.Arrow.Transformer.ArrowTransformer class, C or remove a state transformer from the top of the stack using the  *Control.Arrow.Transformer.Reader.runReader encapsulation operator. F The methods of this class add and remove state transformers anywhere  in the stack. In the instance  : instance Arrow a => ArrowAddReader r (ArrowReader r a) a they are equivalent to Control.Arrow.Transformer.lift and  *Control.Arrow.Transformer.Reader.runReader respectively. 6 Instances are lifted through other transformers with # instance ArrowAddReader r a a' => . ArrowAddReader r (FooArrow a) (FooArrow a') CLift a computation from an arrow to one with an added environment. !Typical usage in arrow notation:  proc p -> ...  (|liftReader cmd|) 2Elimination of a state reader from a computation,  taking a value for the state. !Typical usage in arrow notation:  proc p -> ...  (|elimReader cmd|) env ! Adding a *Control.Arrow.Transformer.State.StateArrow to an A arrow type, but not necessarily as the outer arrow transformer. ?Typically a composite arrow type is built by applying a series A of arrow transformer to a base arrow (usually either a function  arrow or a IJ* arrow. One can add a transformer to the  top of this stack using the Control.Arrow.Transformer.lift  method of the *Control.Arrow.Transformer.ArrowTransformer class, C or remove a state transformer from the top of the stack using the  (Control.Arrow.Transformer.State.runState encapsulation operator. F The methods of this class add and remove state transformers anywhere  in the stack. In the instance  8 instance Arrow a => ArrowAddState s (ArrowState s a) a they are equivalent to Control.Arrow.Transformer.lift and  (Control.Arrow.Transformer.State.runState respectively. 6 Instances are lifted through other transformers with " instance ArrowAddState s a a' => - ArrowAddState s (FooArrow a) (FooArrow a') "=Lift a computation from an arrow to one with an added state. !Typical usage in arrow notation:  proc p -> ...  (|liftState cmd|) #7Elimination of a state transformer from a computation, ( exposing the initial and final states. !Typical usage in arrow notation:  proc p -> do  ... 8 (result, final_state) <- (|elimState cmd|) init_state  !"#  !"#"# +non-portable (multi-parameter type classes) experimentalross@soi.city.ac.uk$EAn arrow type comprising Mealy-style automata, each step of which is . is a computation in the original arrow type. %&@Encapsulating an automaton by running it on a stream of inputs,  obtaining a stream of outputs. !Typical usage in arrow notation:   proc p -> do  ... ( ys <- (|runAutomaton (\x -> ...)|) xs Here xs refers to the input stream and x to individual  elements of that stream. ys is bound to the output stream. $%&$%&$%%&+non-portable (multi-parameter type classes) experimentalross@soi.city.ac.uk'?An arrow that augments an existing arrow with possible errors.  The 1 class contains methods for raising and handling  these errors. (K)*Encapsulate an error-raising computation, $ by completely handling any errors. !Typical usage in arrow notation:  proc p -> ... ! body `runError` \ex -> handler "computation that may raise errors computation to handle errors L'()'()'(()+non-portable (multi-parameter type classes) experimentalross@soi.city.ac.uk*@An arrow type that augments an existing arrow with a modifiable  state. The . class contains the operations on this state. +M,AEncapsulation of a state-using computation, exposing the initial  and final states. !Typical usage in arrow notation:  proc p -> do  ... 7 (result, final_state) <- (|runState cmd|) init_state !"#*+,*+,!"#*++, +non-portable (multi-parameter type classes) experimentalross@soi.city.ac.uk -DA special case is monads applied to the whole arrow, in contrast to  IJ6 arrows, in which the monad is applied to the output. .A special case. /JAn arrow type that augments the underlying arrow with static information. N012345 -./012345 /-.012345 -./012345+non-portable (multi-parameter type classes) experimentalross@soi.city.ac.uk6In-place state updates. Note: this is an arrow type, and  can be used to promote arrows  from IJ (O s),: the resulting arrow updates the state for D each stream element in turn, and as long as the final state in not ! required all is well. However,  does not preserve composition,  because this monad isn'-t commutative. In particular, a composition  of :s of state transformers will not work, as the second will ' require the final state of the first. 7Mappings of streams 8Arrows between streams. Note:  is only a functor if P in the underlying arrow is. 9Q:ARun a stream processor on a stream of inputs, obtaining a stream  of outputs. !Typical usage in arrow notation:   proc p -> do  ... % ys <- (|runStream (\x -> ...)|) xs Here xs refers to the input stream and x to individual  elements of that stream. ys is bound to the output stream. ;Encapsulate a local state. 6789:; 89:76;67899:;+non-portable (multi-parameter type classes) experimentalross@soi.city.ac.uk<@An arrow type that augments an existing arrow with accumulating  output. The  ) class contains the relevant operations. =>IEncapsulation of a writer computation, providing the accumulated output. !Typical usage in arrow notation:  proc p -> do  ... ( (result, output) <- (|runWriter cmd|) RST<=><=><==>+non-portable (multi-parameter type classes) experimentalross@soi.city.ac.uk?EAn arrow type that augments an existing arrow with a read-only state  (or environment). The  class contains the operations  on this state. @AEEncapsulation of a state-reading computation, taking a value for the  state. !Typical usage in arrow notation:  proc p -> ...  (|runReader cmd|) env U ?@A?@A ?@@A / !"#$%&'()*+,-./0123456789:;<=>?@AV   ! " # $ % & ' ( ) * + , - . / 0 0 1223445 6 7 8 9 : ; < = >?@AABCDDEFFGHIJKLJMNJKOJPQJKRJKSJKSTUV WJXYJKZ[T\]V^arrows-0.4.3.0!Control.Arrow.Transformer.CoStateControl.Arrow.TransformerControl.Arrow.Operations Control.Arrow.Transformer.StreamControl.Arrow.Transformer.Error Control.Arrow.Transformer.Writer Control.Arrow.Transformer.ReaderControl.Arrow.Transformer.State#Control.Arrow.Transformer.Automaton Control.Arrow.Transformer.StaticControl.Arrow.InternalsControl.Arrow.Transformer.All CoStateArrowArrowTransformerlift ArrowCircuitdelay ArrowErrorraisehandle tryInUnlessnewError ArrowWriterwrite newWriter ArrowStatefetchstore ArrowReader readState newReadertryInUnlessDefaultArrowAddStream liftStream elimStream ArrowAddError liftError elimErrorArrowAddWriter liftWriter elimWriterArrowAddReader liftReader elimReader ArrowAddState liftState elimState Automaton runAutomaton ErrorArrowrunError StateArrowrunStateStaticMonadArrowStaticArrowArrow StaticArrowwrapunwrapwrapAunwrapAwrapMunwrapM StreamMapST StreamMap StreamArrow runStream runStreamST WriterArrow runWriter ReaderArrow runReaderzipMapunzipMapbase Control.ArrowarrControl.Category>>>first Data.MonoidMonoid ArrowChoiceKleisli rstrengthassocsumswapsndSAGHC.STST***genmapunitjoin