CCA-0.1.3: preprocessor and library for Causal Commutative Arrows (CCA)

Control.CCA

Synopsis

Documentation

(>>>) :: Category cat => cat a b -> cat b c -> cat a c

Left-to-right composition

(<<<) :: Category cat => cat b c -> cat a b -> cat a c

Right-to-left composition

first :: Arrow a => forall b c d. a b c -> a (b, d) (c, d)

Send the first component of the input through the argument arrow, and copy the rest unchanged to the output.

second :: Arrow a => forall b c d. a b c -> a (d, b) (d, c)

A mirror image of first.

The default definition may be overridden with a more efficient version if desired.

(***) :: Arrow a => forall b c b' c'. a b c -> a b' c' -> a (b, b') (c, c')

Split the input between the two argument arrows and combine their output. Note that this is in general not a functor.

The default definition may be overridden with a more efficient version if desired.

(&&&) :: Arrow a => forall b c c'. a b c -> a b c' -> a b (c, c')

Fanout: send the input to both argument arrows and combine their output.

The default definition may be overridden with a more efficient version if desired.

loop :: ArrowLoop a => forall b d c. a (b, d) (c, d) -> a b c

class Category a => Arrow a where

The basic arrow class.

Minimal complete definition: arr and first.

The other combinators have sensible default definitions, which may be overridden for efficiency.

Methods

first :: a b c -> a (b, d) (c, d)

Send the first component of the input through the argument arrow, and copy the rest unchanged to the output.

second :: a b c -> a (d, b) (d, c)

A mirror image of first.

The default definition may be overridden with a more efficient version if desired.

(***) :: a b c -> a b' c' -> a (b, b') (c, c')

Split the input between the two argument arrows and combine their output. Note that this is in general not a functor.

The default definition may be overridden with a more efficient version if desired.

(&&&) :: a b c -> a b c' -> a b (c, c')

Fanout: send the input to both argument arrows and combine their output.

The default definition may be overridden with a more efficient version if desired.

Instances

Arrow (->) 
Arrow ASyn 
Monad m => Arrow (Kleisli m) 

class Arrow a => ArrowLoop a where

The loop operator expresses computations in which an output value is fed back as input, even though the computation occurs only once. It underlies the rec value recursion construct in arrow notation.

Methods

loop :: a (b, d) (c, d) -> a b c

Instances

class (Arrow a, ArrowLoop a) => ArrowInit a whereSource

Methods

arr' :: ExpQ -> (b -> c) -> a b cSource

init' :: ExpQ -> b -> a b bSource

Instances

constant :: (ArrowInit a, Lift b) => b -> a () bSource

norm :: ASyn t t1 -> ExpQSource