Closed b-studios closed 9 years ago
What's the status of these commits?
So I propose to rearrange the commits and only merge the delegate stuff.
The Cobind typeclass gives us some standard operators like <<=
and =<=
. These might be helpful (or not) once we deeply understood the semantics of delegate (== duplicate).
In addition, so far we always followed the "implement all operations as instances of appropriate typeclasses" approach. Cobind sadly is only defined as one part of Comonad, so I inlined it here.
For me, the point of implementing operators as methods of standard type classes is that there is existing code that works generically for all instances of the type class. By also supporting the type class, we can reuse this existing code. For example, by supporting Applicative for our parsers, we can use combinators like traverse
.
This particular argument for type classes doesn't work for self-defined classes like CoBind.
Split into #4 and #6,closing.
For dicussion. Also see https://github.com/Toxaris/coalgebraic-parsing/commit/803305b0b50474064092fea1451ef00b068a0058#commitcomment-11757924