sweet-monads
sweet-monads copied to clipboard
Add compatibility with Fantasy Land
It would be great if the implementation would be compatible with Fantasy Land: https://github.com/fantasyland/fantasy-land
Yes, it sounds great. I will try to investigate it. Could you also share your opinion on what should be added or changed to be more compatible?
There's actually not too much. Fantasy Land specifies type classes and methods that are available on these type classes. Your implementation can integrate these methods and it'll be automatically compatible with other Fantasy Land implementations like Sanctuary.js. Here's Sanctuary's type class implementation: https://github.com/sanctuary-js/sanctuary-type-classes
Another example is Fluture that offers an alternative to Promises and is also compatible with Fantasy Land.