- (>>>) :: Category cat => cat a b -> cat b c -> cat a c
- (<<<) :: Category cat => cat b c -> cat a b -> cat a c
- first :: Arrow a => forall b c d. a b c -> a (b, d) (c, d)
- second :: Arrow a => forall b c d. a b c -> a (d, b) (d, c)
- (***) :: Arrow a => forall b c b' c'. a b c -> a b' c' -> a (b, b') (c, c')
- (&&&) :: Arrow a => forall b c c'. a b c -> a b c' -> a b (c, c')
- loop :: ArrowLoop a => forall b d c. a (b, d) (c, d) -> a b c
- class Category a => Arrow a where
- class Arrow a => ArrowLoop a where
- loop :: a (b, d) (c, d) -> a b c
- class (Arrow a, ArrowLoop a) => ArrowInit a where
- arr :: ExpQ -> ExpQ
- init :: ExpQ -> ExpQ
- constant :: (ArrowInit a, Lift b) => b -> a () b
- norm :: ASyn t t1 -> ExpQ
- normOpt :: ASyn t t1 -> ExpQ
Documentation
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.
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.
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.
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.
loop :: a (b, d) (c, d) -> a b c