3 ms·
I don't think this is correct. My understanding is that it's not a library issue, and in terms of Haskell types (<=<) is not a generalisation of (.) (although
by tome 13y ago
I don't think this is correct.
My understanding is that it's not a library issue, and in terms of Haskell types (<=<) is not a generalisation of (.) (although it is mathematically speaking).
If you want a -> m b to be a Category instance so you can use (.) you need the Kleisli newtype wrapper. If you want a -> b to work in any monad so you can use (<=<) you need to compose with return to get Monad m => a -> m b.
Either way you have to explicitly specify the isomorphism explicitly and I don't think there's any getting around that.