Sat Jul 21 20:23:18 EDT 2018
Arrow is Strong Category?
first' :: p a b -> p (a, c) (b, c)
second' :: p a b -> p (c, a) (c, b)
dimap :: (a -> b) -> (c -> d) -> p b c -> p a d
So Strong is the ability to funnel through some extra information, and
Profunctor allows the transform the beginning and end of the Category
class (Strong p, Category p) => Arrow p
instance (Strong p, Category p) => Arrow p
So prove that.
Or be lazy and google it:
"the monoid and the strength must also be compatible"
So what do I want out of this? In rtl.txt there is the strong
suspicion that the reason for Seq to be a monad is _only_ because of
the metaprogramming functionality. The underlying combinatorial
language definitely has a fixed computational structure.
Now, I know that there is the Applicative subset, but that does not
seem to be enough. It does not capture sharing (circuit fanout).
Arrows do it, but Arrows are awkward to use. Strong Profunctor should
be enough according to the above. Does that actually help?
Let's define instances.
EDIT: Not necessary. Kleisli already has all the instances.
So what does this buy?
Arrows are Strong Monads: