Join GitHub today
Convert between Promises and Futures #98
Promises and Futures are pretty similar, with two major exceptions: Futures have a case for "the computation was cancelled", and they allow you to have futures of futures. Other than that, they're pretty much the same, so it makes sense to be able to convert between them easily.
This means we'd have two basic functions:
promiseToFuture :: (Promise a b) => Future a b futureToPromise :: (Future a b) => Promise a b
Due to the limitation of promises, the following design decisions should be considered:
Where does this go?
Refer to existing