3 ms·
I think maybe he's not saying that type classes themselves aren't composable but rather they interfere with the composability of more fundamental things like fu
by lgas 8y ago
I think maybe he's not saying that type classes themselves aren't composable but rather they interfere with the composability of more fundamental things like functions which are easier to compose in the absence of type class constraints.
For example it's easy to compose two functions of type a -> b and b -> c but two functions of type MonadX m => a -> m b and MonadY m => b -> m c suddenly require you to weave together something that provides the full context.
And obviously in practice the tangle of constraints can be more complex... especially with (even common and useful) complications like MultiParamTypeClasses.