Module

Web.Promise.Lazy

Package
purescript-web-promise
Repository
purescript-web/purescript-web-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)