Skip to content

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 force-pushed the fix-uncurried-fragment-signature branch from 24dc054 to a27bf33 Compare October 16, 2024 02:31
@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