Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Needs runPromiseAffE_ helpers? #12

Open
justinwoo opened this issue Jul 28, 2018 · 2 comments
Open

Needs runPromiseAffE_ helpers? #12

justinwoo opened this issue Jul 28, 2018 · 2 comments

Comments

@justinwoo
Copy link
Contributor

e.g.

runPromiseAffE1 :: forall a o. FU.Fn1 a (Effect (Promise o)) -> a -> Aff o
runPromiseAffE1 f a = Promise.toAffE $ FU.runFn1 f a

runPromiseAffE2 :: forall a b o. FU.Fn2 a b (Effect (Promise o)) -> a -> b -> Aff o
runPromiseAffE2 f a b = Promise.toAffE $ FU.runFn2 f a b

runPromiseAffE3 :: forall a b c o. FU.Fn3 a b c (Effect (Promise o)) -> a -> b -> c -> Aff o
runPromiseAffE3 f a b c =  Promise.toAffE $ FU.runFn3 f a b c

runPromiseAffE4 :: forall a b c d o. FU.Fn4 a b c d (Effect (Promise o)) -> a -> b -> c -> d -> Aff o
runPromiseAffE4 f a b c d =  Promise.toAffE $ FU.runFn4 f a b c d
@nwolverson
Copy link
Owner

Not EffFnX? Don't see any problem with adding this but I'm just curious if it happens to come up this way frequently - I take it you've found yourself using similar already?

@justinwoo
Copy link
Contributor Author

Using this when handling puppeteer things: https://github.com/justinwoo/purescript-toppokki/blob/master/src/Toppoki.purs#L171-L181

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants