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

@wait macro fails with certain types of conditions #51

Open
hdavid16 opened this issue Apr 27, 2023 · 1 comment
Open

@wait macro fails with certain types of conditions #51

hdavid16 opened this issue Apr 27, 2023 · 1 comment
Milestone

Comments

@hdavid16
Copy link
Member

Need to make this macro more robust.

This fails,

@wait clock !isempty(input)

This is because the function is assumed to be ! and the isempty is not passed to fun internally. Need to recursively build the function to pass to fun inside the macro.

The current workaround is to wrap the function inside another function:

is_not_empty(input) = !isempty(input)
@wait clock is_not_empty(input)
@hdavid16 hdavid16 changed the title @wait macro fails with composite functions @wait macro fails with certain types of conditions May 1, 2023
@hdavid16
Copy link
Member Author

hdavid16 commented May 1, 2023

@wait also does not support using an anonymous function for the condition. This is because the expr.head of an anonymous function is :-> instead of :call

@pbayer pbayer added this to the 0.4 milestone Jul 12, 2023
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