Closed marcosh closed 1 year ago
Just to make sure that I understand correctly, are you proposing to add top-level functions with the same type signatures as splitStrong
and fanout
? Or are you proposing something else?
yes, I would like to add to the library the following functions:
(***) :: (Category p, Strong p) => p a b -> p c d -> p (a, c) (b, d)
(&&&) :: (Category p, Strong g) => p a b -> p a c -> p a (b, c)
(+++) :: (Category p, Choice p) => p a b -> p c d -> p (Either a c) (Either b d)
(|||) :: (Category p, Choice p) => p a c -> p b c -> p (Either a b) c
I'm not sure how I feel about giving them the same names as Arrow
's class methods, as that could possibly be confusing. I think I would prefer explicit names, such as the ones that purescript
uses. Otherwise, I have no objection to adding these.
agreed that the naming could be confusing. I'll create a PR with explicit names
Would it make sense to add implementations for
(***)
and(&&&)
for aStrong
profunctor when it is also aCategory
, similarly to what Purescript does?Similarly
(+++)
and(|||)
could be added forChoice
, when it is also aCategory