-
Notifications
You must be signed in to change notification settings - Fork 71
Extend ppx_metaquot with an extension point [%funty: _ -> _] #302
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
Conversation
|
Thanks Erik. That is a pretty neat PR and a great enhancement of our interface. I have a few comments though. I have some doubts about the name Did you check that this does not break existing graders? For instance, you could check that by compiling the |
|
Dear @yurug, thanks for your feedback!
Indeed, I agree that a "function type" would be a more precise naming than a "prototype". So I'm going to replace all occurrences of
Good point; I've tested the current version of the PR (as-is, and after merging it locally with latest |
|
Dear @yurug, I updated the PR as you suggested (using Regarding backward-compatibility, as I mentioned previously learn-ocaml-corpus is not impacted by the PR, but some of our PFITAXEL graders did not pass at first (either due to a missing |
|
Thanks to the CI and its |
2c6d76b to
efbbab0
Compare
|
The issue is now solved (to sum up, it was due to a typo in the ppx code, and a type issue related to the @yurug can you take a look at the current version? |
efbbab0 to
a04d3f9
Compare
0785d1a to
a880dc3
Compare
|
If you fix the conflicting files, I integrate this PR. Thank you for this contribution! |
* Note: keep these two GADTs abstract. * This is a first step towards implementing [%prot: int -> int].
* test_lib.mli: Move notations (!!), (@:) to fun_ty.mli; Put some [include (module type of Fun_ty)] instead. * Therefore: no need for [open Fun_ty] in existing n-ary graders code. * Add a deprecated synonym so that the renaming of Test_lib.ty_of_prot to Test_lib.ty_of_fun_ty yields no backward-compatibility issue.
a880dc3 to
c08394b
Compare
|
@yurug friendly ping :-) |
Kind: feature
Closes #50
Summary
I finally found the time to address what was proposed in #50, namely: implementing
an extension point[%prot: …]that allows one to generate a(_, _, _) protat ppx timean extension point
[%funty: …]that allows one to generate a(_, _, _) fun_tyat ppx time.This appears to be a key component for the learn-ocaml-editor automatic
test.mlgenerator,which will be able to automatically generate snippets such as
Thus, no need to guess by regexp or so what is the number of arguments of the specified function
(unlike the more traditional part of the API
test_function_N_against_solutionwithNamong1,2,3,4)As mentioned in the commit messages, this PR includes a small refactoring (to move the
prot-specific definitions in its own library) and two small tests incorporated in the demo.Cc @yurug, @leunam217