Safe Haskell | None |
---|---|
Language | Haskell2010 |
- type Pieced a b s t = (Had a s, t ~ Replaced a b s)
- pieced :: forall w a b s t. (Profunctor w, Strong w, Pieced a b s t) => w a b -> w s t
- piecedK :: forall m a b s t. (Monad m, Pieced a b s t) => (a -> m b) -> s -> m t
- type Projected a1 a2 b1 b2 = (Select a1 a2, Amend a1 b1 a2, b2 ~ Replaces a1 b1 a2)
- projected :: forall w a1 a2 b1 b2. (Strong w, Projected a1 a2 b1 b2) => w (Many a1) (Many b1) -> w (Many a2) (Many b2)
- projectedK :: forall m a1 a2 b1 b2. (Monad m, Projected a1 a2 b1 b2) => (Many a1 -> m (Many b1)) -> Many a2 -> m (Many b2)
- type MakeFrom a1 a2 a3 = (Select a1 a3, Select a2 a3, a3 ~ AppendUnique a1 a2)
- type MakeBoth b1 b2 b3 = b3 ~ Append b1 b2
- makeBesides :: forall w a1 a2 a3 b1 b2 b3. (Category w, Strong w, MakeFrom a1 a2 a3, MakeBoth b1 b2 b3) => w (Many a1) (Many b1) -> w (Many a2) (Many b2) -> w (Many a3) (Many b3)
- makeBesidesK :: forall m a1 a2 a3 b1 b2 b3. (Monad m, MakeFrom a1 a2 a3, MakeBoth b1 b2 b3) => (Many a1 -> m (Many b1)) -> (Many a2 -> m (Many b2)) -> Many a3 -> m (Many b3)
- thenMake :: forall w a a2 b1 b2 b3. (Category w, Strong w, Projected a2 b1 b2 b3) => w a (Many b1) -> w (Many a2) (Many b2) -> w a (Many b3)
- thenMakeK :: forall m a a2 b1 b2 b3. (Monad m, Projected a2 b1 b2 b3) => (a -> m (Many b1)) -> (Many a2 -> m (Many b2)) -> a -> m (Many b3)
Combinators similar to Profunctor Strong
type Pieced a b s t = (Had a s, t ~ Replaced a b s) Source #
A friendlier constraint synonym for pieced
.
type Projected a1 a2 b1 b2 = (Select a1 a2, Amend a1 b1 a2, b2 ~ Replaces a1 b1 a2) Source #
A friendlier constraint synonym for projected
.
projected :: forall w a1 a2 b1 b2. (Strong w, Projected a1 a2 b1 b2) => w (Many a1) (Many b1) -> w (Many a2) (Many b2) Source #
projectedK :: forall m a1 a2 b1 b2. (Monad m, Projected a1 a2 b1 b2) => (Many a1 -> m (Many b1)) -> Many a2 -> m (Many b2) Source #
makeBesides :: forall w a1 a2 a3 b1 b2 b3. (Category w, Strong w, MakeFrom a1 a2 a3, MakeBoth b1 b2 b3) => w (Many a1) (Many b1) -> w (Many a2) (Many b2) -> w (Many a3) (Many b3) infixr 3 Source #
Split the input between the two argument arrows and combine their output.
The type of the resultant input is a Many
of all the unique types in the argument arrows' inputs,
The type of the resultant output is a concatenated Many
of the arguments arrows' outputs.
Analogous to a Many
combination of both of ***
and &&&
.
It is a compile error if the types are not distinct in each of the argument arrow inputs.
makeBesidesK :: forall m a1 a2 a3 b1 b2 b3. (Monad m, MakeFrom a1 a2 a3, MakeBoth b1 b2 b3) => (Many a1 -> m (Many b1)) -> (Many a2 -> m (Many b2)) -> Many a3 -> m (Many b3) infixr 3 Source #
thenMake :: forall w a a2 b1 b2 b3. (Category w, Strong w, Projected a2 b1 b2 b3) => w a (Many b1) -> w (Many a2) (Many b2) -> w a (Many b3) infixr 3 Source #
Left-to-right chaining of arrows one after another, where left over input not consumed by the right arrow is forwarded to the output. It is a compile error if the types are not distinct in each of the argument arrow inputs, or if the input of the second arrow is not a complete subset of the output of the first arrow.