Module

Promise.Lazy

Package
purescript-js-promise
Repository
purescript-contrib/purescript-js-promise

#Box Source

data Box a

A trivial box that adds a layer between promises to prevent automatic flattening.

Constructors

#LazyPromise Source

newtype LazyPromise a

A pure Promise that has not been executed yet. This type can be used with do syntax.

Constructors

Instances

#new Source

new :: forall a. Executor a -> LazyPromise a

#catch Source

catch :: forall a b. (Rejection -> LazyPromise b) -> LazyPromise a -> LazyPromise b

#finally Source

#all Source

all :: forall a. Array (LazyPromise a) -> LazyPromise (Array a)

#race Source

race :: forall a. Array (LazyPromise a) -> LazyPromise a

#fromPromise Source

fromPromise :: forall a. Effect (Promise a) -> LazyPromise a

#toPromise Source

toPromise :: forall a b. Flatten a b => LazyPromise a -> Effect (Promise b)