data Promise : Type -> TypetoPromise : ((a -> IO ()) -> IO ()) -> IO (Promise a)onPromise : Promise a -> (a -> IO b) -> (String -> IO b) -> IO (Promise b)Attaches two handlers to a promise.
onPromiseP : Promise a -> (a -> IO (Promise b)) -> (String -> IO (Promise b)) -> IO (Promise b)Like `onPromise` but the handlers themselves can return promises.