Skip to content

Conversation

@jpsamaroo
Copy link
Member

Uses MacroTools' @capture in the @spawn parser to parse calls, and in the process adds support for do-block syntax and direct calls to anonymous functions:

# Do-block syntax
Dagger.@spawn sum(A) do a
  return a+1
end

# Direct call to anonymous function
Dagger.@spawn A->sum(A; dims=1)+2

This should make it easier for users to apply Dagger.@spawn to arbitrary calls. Note that I am not tackling #514, as that is significantly more difficult to do (it requires finding and transforming all values which might be a DTask).

Fixes #480
Fixes #479
Fixes #421

@jpsamaroo jpsamaroo merged commit b2fd2ab into master Jun 19, 2024
@jpsamaroo jpsamaroo deleted the jps/parser-fixes branch June 19, 2024 03:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

2 participants