-
Notifications
You must be signed in to change notification settings - Fork 11
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
Embed errors in the AST instead of raising #12
Conversation
I converted the function
and the |
This method did not work on List.iter lbls ~f:(fun { pld_name; pld_loc; _ } ->
if List.mem generated_funs pld_name.txt ~equal:String.equal
then
Error (Location.Error.createf
~loc:pld_loc
"ppx_fields_conv: field name %S conflicts with one of the generated functions"
pld_name.txt)) |
I went through the resources you sent but I am stumped on the application in some functions and where to use a certain method instead of the other. |
Hello @Burnleydev1! This is already a good start. Let me give some hints/remarks:
(* has side effects (can raise), but returns unit *)
check_at_least_one_record ...;
(* if we reach this line, there is at least one record *)
rest_of_the_function However, once So, at the call sites of Similarly, look at the type of |
Thanks @panglesd for the remarks/tips, I will hop on this. |
For this, I used |
Hi @panglesd, this is an attempt to fix the call site for |
Signed-off-by: Burnleydev1 <[email protected]>
Signed-off-by: Burnleydev1 <[email protected]>
Signed-off-by: Burnleydev1 <[email protected]>
Signed-off-by: Burnleydev1 <[email protected]>
Signed-off-by: Burnleydev1 <[email protected]>
Signed-off-by: Burnleydev1 <[email protected]>
Signed-off-by: Burnleydev1 <[email protected]>
Signed-off-by: Burnleydev1 <[email protected]>
This reverts commit 3cbb971. Signed-off-by: Burnleydev1 <[email protected]>
This reverts commit ed97ee8.
This reverts commit 3cbb971.
Signed-off-by: Burnleydev1 <[email protected]>
Signed-off-by: Burnleydev1 <[email protected]>
Signed-off-by: Burnleydev1 <[email protected]>
Signed-off-by: Burnleydev1 <[email protected]>
Closes #10
Hello @panglesd, I'm sorry, I messed up the previous pr and my changes were no longer reflected there when I pushed.