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

Fix Uncurried Fragment module signature #297

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

illusionalsagacity
Copy link

resolves #296

the module signature was not wrapped, and the implementation was wrapped in another fun that prevented the match in wrap_as_uncurried_fn from working as intended

I also fixed a warning 53 with the @@tailcall attribute I was getting for ocaml 5.1.1, maybe I ended up with different versions of something?

Comment on lines 1029 to 1033
wrap_as_uncurried_fn [%stri let parse (value : Raw.t) = [%e parse_fn]];
wrap_as_uncurried_fn
[%stri
let parse = (fun value -> [%e parse_fn] : Raw.t -> [%t type_name])];
wrap_as_uncurried_fn
[%stri
let serialize =
(fun value -> [%e serialize_fn] : [%t type_name] -> Raw.t)];
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've fiddled with this a few times and all the options seem to generate a lot of changes in the printed output.

generate_operation_implementation doesn't include any type annotations here, would that be preferable for this as well?

@illusionalsagacity illusionalsagacity force-pushed the fix-uncurried-fragment-signature branch 2 times, most recently from 1a08f56 to 24dc054 Compare October 16, 2024 02:23
resolves teamwalnut#296

the module signature was not wrapped, and the implementation was wrapped
in another fun that prevented the match in wrap_as_uncurried_fn from
working as intended

I also fixed a warning 53 with the @@tailcall attribute I was getting
for ocaml 5.1.1, maybe I ended up with different versions of something?

re-run tests
@illusionalsagacity illusionalsagacity marked this pull request as ready for review October 16, 2024 02:32
@illusionalsagacity
Copy link
Author

Are there other test projects I can try this build against?

@illusionalsagacity illusionalsagacity changed the title Fix-uncurried-fragment-signature Fix Uncurried Fragment module signature Oct 16, 2024
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.

Fragment parse and serialize implementation does not match module signature
1 participant