Safe Haskell | None |
---|---|
Language | Haskell2010 |
- faceted :: (Profunctor w, Choice w, UniqueMember a a', UniqueMember b b', Diversify (Complement a' '[a]) b') => w a b -> w (Which a') (Which b')
- faceted' :: (Profunctor w, Choice w) => w a b -> w (Which '[a]) (Which '[b])
- injected :: (Profunctor w, Choice w, Reinterpret a a', Diversify b (AppendUnique (Complement a' a) b), Diversify (Complement a' a) (AppendUnique (Complement a' a) b), Complement a a' ~ '[]) => proxy a' -> w (Which a) (Which b) -> w (Which a') (Which (AppendUnique (Complement a' a) b))
- (+||+) :: forall w a1 b1 a2 b2. (Category w, Profunctor w, Choice w, Reinterpret a2 (Append a1 a2), a1 ~ Complement (Append a1 a2) a2, Diversify b1 (AppendUnique b1 b2), Diversify b2 (AppendUnique b1 b2)) => w (Which a1) (Which b1) -> w (Which a2) (Which b2) -> w (Which (Append a1 a2)) (Which (AppendUnique b1 b2))
- (>||>) :: forall w a b c d. (Category w, Profunctor w, Choice w, Reinterpret c b, Diversify d (AppendUnique (Complement b c) d), Diversify (Complement b c) (AppendUnique (Complement b c) d), Complement c b ~ '[]) => w a (Which b) -> w (Which c) (Which d) -> w a (Which (AppendUnique (Complement b c) d))
- (<||<) :: (Category w, Profunctor w, Choice w, Reinterpret c b, Diversify d (AppendUnique (Complement b c) d), Diversify (Complement b c) (AppendUnique (Complement b c) d), Complement c b ~ '[]) => w (Which c) (Which d) -> w a (Which b) -> w a (Which (AppendUnique (Complement b c) d))
Combinators similar to Profunctor Choice
faceted :: (Profunctor w, Choice w, UniqueMember a a', UniqueMember b b', Diversify (Complement a' '[a]) b') => w a b -> w (Which a') (Which b') Source #
injected :: (Profunctor w, Choice w, Reinterpret a a', Diversify b (AppendUnique (Complement a' a) b), Diversify (Complement a' a) (AppendUnique (Complement a' a) b), Complement a a' ~ '[]) => proxy a' -> w (Which a) (Which b) -> w (Which a') (Which (AppendUnique (Complement a' a) b)) Source #
(+||+) :: forall w a1 b1 a2 b2. (Category w, Profunctor w, Choice w, Reinterpret a2 (Append a1 a2), a1 ~ Complement (Append a1 a2) a2, Diversify b1 (AppendUnique b1 b2), Diversify b2 (AppendUnique b1 b2)) => w (Which a1) (Which b1) -> w (Which a2) (Which b2) -> w (Which (Append a1 a2)) (Which (AppendUnique b1 b2)) infixr 2 Source #
Split the input between the two argument arrows, retagging and merging their outputs.
The output is merged into a Which
of unique types.
Analogous to a Which
combination of both +++
and |||
.
It is a compile error if the types are not distinct after Append
ing both argument arrows inputs.
This is to prevent accidently processing an input type twice.
The compile error will be due to (Append a1 a2)
which will not satisfy
UniqueMember
constraints in Reinterpret
.
(>||>) :: forall w a b c d. (Category w, Profunctor w, Choice w, Reinterpret c b, Diversify d (AppendUnique (Complement b c) d), Diversify (Complement b c) (AppendUnique (Complement b c) d), Complement c b ~ '[]) => w a (Which b) -> w (Which c) (Which d) -> w a (Which (AppendUnique (Complement b c) d)) infixr 2 Source #
Left-to-right chaining of arrows one after another, where left over possibilities not handled
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 types are not distinct of each of the argument arrow output,
or if the input of the second arrow is not a subset of the output of the first arrow.
This is to prevent surprises behaviour of the second arrow being ignored.
The compile error will be due to the Complement c b ~ '[]
constraint.
(<||<) :: (Category w, Profunctor w, Choice w, Reinterpret c b, Diversify d (AppendUnique (Complement b c) d), Diversify (Complement b c) (AppendUnique (Complement b c) d), Complement c b ~ '[]) => w (Which c) (Which d) -> w a (Which b) -> w a (Which (AppendUnique (Complement b c) d)) infixl 2 Source #
right-to-left version of '(>||>)'