Open turion opened 4 years ago
I'm still wrapping my head around dunai/rhine, but if ClSF and SN are profunctors, shouldn't we more simply just make MSF a profunctor?
That's absolutely right. If MSF
were a profunctor, ClSF
would automatically become one. SN
would require a separate instance, but it's not hard.
See also:
Similarly, I believe that at least ClSF
s are Traversing
. See https://github.com/ivanperez-keera/dunai/issues/224#issuecomment-825053518.
I think that for any functor
m
and clockscl, cl'
, allClSF m cl
,SN m cl
andResbuf m cl cl'
are instances ofProfunctor
. This means that we can pre- and postcompose them with pure functions, and that precomposition is contravariant. In arrows, precomposition is known as the (^>>) operator.To do
profunctor
packageProfunctor
instancesSometimes, operators like http://hackage.haskell.org/package/rhine-0.6.0/docs/FRP-Rhine-SN-Combinators.html#v:-62--62--62--94- can be reused.