mix-arrows-1.1: Mixing effects of one arrow into another one

Safe HaskellNone



Various ways of shuffling input and output components. Function types are mostly autogenerated.


swap :: (t1, t) -> (t, t1)Source

twist :: ((t1, t), t2) -> ((t1, t2), t)Source

assocLtoR :: ((t, t1), t2) -> (t, (t1, t2))Source

assocRtoL :: (t1, (t2, t)) -> ((t1, t2), t)Source

arrSwap :: Arrow a => a (t, t1) (t2, t3) -> a (t1, t) (t3, t2)Source

arrTwist :: Arrow a => a ((t1, t2), t) ((t4, t3), t5) -> a ((t1, t), t2) ((t4, t5), t3)Source

pack :: Either (a, t) (b, t) -> (Either a b, t)Source

unpack :: (Either t t1, t2) -> Either (t, t2) (t1, t2)Source

arrAssoc :: Arrow a => a ((t1, t2), t) ((t3, t4), t5) -> a (t1, (t2, t)) (t3, (t4, t5))Source

arrCancelUnit :: Arrow a => a ((), b) ((), d) -> a b dSource

arrUnpack :: Arrow a => a (Either (t, t2) (t1, t2)) (Either (a1, t3) (b, t3)) -> a (Either t t1, t2) (Either a1 b, t3)Source

(->>) :: Arrow a => a (input, i1) (middle, o1) -> a (middle, i2) (output, o2) -> a ((input, i1), i2) ((output, o1), o2)Source