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

functoria: Quote Runtime_arg.call #1522

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

Julow
Copy link
Contributor

@Julow Julow commented Apr 23, 2024

Fixes codes that use an arg call as an argument to a function:

code ~pos:__POS__ "f ~arg:%a"
  Runtime_arg.call my_arg

Fixes codes that use an arg call as an argument to a function:

    code ~pos:__POS__ "f ~arg:%a"
      Runtime_arg.call my_arg
@samoht
Copy link
Member

samoht commented Apr 24, 2024

Thanks! Do you have a use-case for this? Devices are not supposed to call function (the initial goal was that only functoria would use this)

@Julow
Copy link
Contributor Author

Julow commented Apr 24, 2024

I found this problem when updating this to mirage 4.5: https://github.com/robur-coop/caldav/blob/main/mirage/config.ml#L91

Key.serialize_call prints something that can be on the RHS of a label argument (either parenthesized or an identifier) but Runtime_arg.call do not and I hoped to swap one for the other.

@samoht
Copy link
Member

samoht commented Apr 24, 2024

With the new API the argument name is passed as the last parameters of the call to connect. You can then just use it directly, you don't need to serialize it yourself.

We should probably remove that function from the public API to avoid people doing this :-)

@Julow
Copy link
Contributor Author

Julow commented Apr 24, 2024

This is indeed not needed in robur-coop/caldav#36, thanks!

Runtime_arg.call is still needed within mirage, so I think quoting doesn't hurt.

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

Successfully merging this pull request may close these issues.

None yet

2 participants