Open BebeSparkelSparkel opened 1 month ago
I like the concept a lot, since it lets us have more generality. I'd recommend looking at the difference in code gen at a core level to see whether we're taking a performance hit even though we're using Identity
We also need to think about how this would break backwards compatibility as well as the fact that many structures wouldn't have monadic implementations like this.
Would we remove the pure versions from the classes and implement them in terms of the Monadic, or have both and define them in terms of each other? Would this mean eg updateMap wouldn't be defined with updateWithKey? Or do we keep the hierarchies as they are?
I do not think that we can break the interface.
Existing classes can have a monadic class added to them with the *M
names.
For future classes depending on what makes the most sense, we can require that either
I'm not sure if this is a good idea or not but I have been thinking about monadic interfaces and the pure interface can just use
Identity
to use the monadic instance or theRULES
pragma for the specific type function. Example