Closed alang9 closed 6 years ago
I want to point out 2 things:
type MachineT m k o = TranslateT m (Is o) k
We are not able to write instances for Functor
, Monad
, Applicative
, Foldable
. We could newtype MachineT
to allow for these instances, but that seems more annoying.
Another thing I want to mention is that I chose the type argument order for TranslateT
so that it can allow Profunctor
-like functions
lmap1 :: (forall t. j t -> i t) -> TranslateT m i k -> TranslateT m j k
rmap1 :: (forall t. k t -> l t) -> TranslateT m j k -> TranslateT m j l
But this means that it's kind of flipped compared to the order in MachineT
.
Also, when composing 2 TranslateT
s, like f . g
. g
is the more downstream TranslateT
, which is kind of opposite from the direction of function composition.
Any thoughts about whether the order should be flipped?
Is this PR still ongoing?
I'm closing. Feel free to ping if you need that MR to move forward.
Just want to request comments on this change. The most important changes are in
Data.Machine.Type