úÎÒ•ÎÂ@      !"#$%&'() * + ,-./0 1 2 3 4 5 6 789:;<=>? portable experimentalross@soi.city.ac.ukLazy zip of a pair of streams. !Lazy unzip of a pair of streams. 7An infinite sequence obtained by padding the list with @ . -The infinite list corresponding to a stream. An infinite sequence. head of the stream tail of the stream A+non-portable (multi-parameter type classes) experimentalross@soi.city.ac.uk,Construct a new arrow from an existing one. 'A transformation of arrows, preserving B , C  and D . !Typical usage in arrow notation:  proc p -> ...  (|lift cmd|) +non-portable (multi-parameter type classes) experimentalross@soi.city.ac.uk A suitable value for  when the arrow type belongs to  E %. To use it, you must define either  or . BAn arrow type that can be used to interpret synchronous circuits. A delay component. 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 $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)  |) +Handler that returns the error as a value. 7An arrow type that collects additional output (of some F  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    +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 G H * 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 G H * 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 G H * 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 G H * 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 G H * 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)@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. *EAn arrow type comprising Mealy-style automata, each step of which is . is a computation in the original arrow type. )**) +non-portable (multi-parameter type classes) experimentalross@soi.city.ac.uk+++non-portable (multi-parameter type classes) experimentalross@soi.city.ac.uk,*Encapsulate an error-raising computation, $ by completely handling any errors. !Typical usage in arrow notation:  proc p -> ... ! body `runError` \ex -> handler -?An arrow that augments an existing arrow with possible errors.  The  1 class contains methods for raising and handling  these errors. ,--,+non-portable (multi-parameter type classes) experimentalross@soi.city.ac.uk.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 /@An arrow type that augments an existing arrow with a modifiable  state. The . class contains the operations on this state. &'(.//.&'( +non-portable (multi-parameter type classes) experimentalross@soi.city.ac.uk4DA special case is monads applied to the whole arrow, in contrast to  G H 6 arrows, in which the monad is applied to the output. 5A special case. 6JAn arrow type that augments the underlying arrow with static information. 01234566450123+non-portable (multi-parameter type classes) experimentalross@soi.city.ac.uk7ARun 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. 8Encapsulate a local state. 9In-place state updates. Note: this is an arrow type, and  can be used to promote arrows  from G H  (I  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. :Mappings of streams ;Arrows between streams. Note:  is only a functor if J  in the underlying arrow is. 789:;;7:98+non-portable (multi-parameter type classes) experimentalross@soi.city.ac.uk<IEncapsulation of a writer computation, providing the accumulated output. !Typical usage in arrow notation:  proc p -> do  ... ( (result, output) <- (|runWriter cmd|) =@An arrow type that augments an existing arrow with accumulating  output. The ) class contains the relevant operations.  !"<==< !"+non-portable (multi-parameter type classes) experimentalross@soi.city.ac.uk>EEncapsulation of a state-reading computation, taking a value for the  state. !Typical usage in arrow notation:  proc p -> ...  (|runReader cmd|) env ?EAn arrow type that augments an existing arrow with a read-only state  (or environment). The  class contains the operations  on this state. #$%>??>#$%& !"#$%&'()*+,-./0123456789:;<=>?K !"#$%&'()*+,-./0123456789:; < = >?@AB C D E F G H IJKLMNOPQR ST U V W X Y Z Z [ \] arrows-0.2 Data.StreamControl.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.CoState Control.Arrow.Transformer.StaticbaseGHC.Err Control.Arrow Data.MonoidControl.Arrow.InternalsGHC.STControl.Arrow.Transformer.All zipStream unzipStream listToStream streamToListStreamshdstlArrowTransformerlifttryInUnlessDefault ArrowCircuitdelay ArrowErrorraisehandle tryInUnlessnewError ArrowWriterwrite newWriter ArrowStatefetchstore ArrowReader readState newReaderArrowAddStream liftStream elimStream ArrowAddError liftError elimErrorArrowAddWriter liftWriter elimWriterArrowAddReader liftReader elimReader ArrowAddState liftState elimState runAutomaton Automaton CoStateArrowrunError ErrorArrowrunState StateArrowwrapAunwrapAwrapMunwrapMStaticMonadArrowStaticArrowArrow StaticArrow runStream runStreamST StreamMapST StreamMap StreamArrow runWriter WriterArrow runReader ReaderArrow undefinedConsarr>>>first ArrowChoiceMonoidKleisliST***