-
Notifications
You must be signed in to change notification settings - Fork 8
Open
Description
Is your feature request related to a problem? Please describe.
Often, I want to pass a Python function around (e.g. to map), but always call it asynchronously. Currently, the only way to do that is wrap it:
fn foo_async(x) {
async foo(x)
}
// ...
map(foo_async, items)Where map takes a function pointer.
Describe the solution you'd like
I'd like to be able to do:
map(async foo, items)
Implementation
At compile-time, async foo should create a new https://wiki.haskell.org/Lifting version of foo which always runs asynchronously. This could work similar to the import lifting (see wrap_foreign_function in https://github.com/condense9/teal-lang/blob/master/src/hark_lang/hark_compiler/compiler.py).
The parser rules would need to be modified too.
Reactions are currently unavailable