sweet-monads icon indicating copy to clipboard operation
sweet-monads copied to clipboard

Add compatibility with Fantasy Land

Open jceb opened this issue 1 year ago • 2 comments

It would be great if the implementation would be compatible with Fantasy Land: https://github.com/fantasyland/fantasy-land

jceb avatar Sep 18 '23 10:09 jceb

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?

JSMonk avatar Sep 18 '23 12:09 JSMonk

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.

jceb avatar Sep 18 '23 12:09 jceb