You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
What do people think of adding typeclasses that only add new laws (ie. have no new functionality, but restrict which implementations are valid.)
I'm specifically thinking of something like CommutativeMonad, which would add a commutativity restriction to Monad (so that e.g. a distributive law can be derived which would allow composition, see #332 and the related discussion re: Traverse).
Since we have discipline, the extra laws can be checked by implementers fairly easily, and it opens up new avenues for writing slightly more general combinators in cats.
The text was updated successfully, but these errors were encountered:
What do people think of adding typeclasses that only add new laws (ie. have no new functionality, but restrict which implementations are valid.)
I'm specifically thinking of something like CommutativeMonad, which would add a commutativity restriction to Monad (so that e.g. a distributive law can be derived which would allow composition, see #332 and the related discussion re: Traverse).
Since we have discipline, the extra laws can be checked by implementers fairly easily, and it opens up new avenues for writing slightly more general combinators in cats.
The text was updated successfully, but these errors were encountered: