-
Notifications
You must be signed in to change notification settings - Fork 89
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
drop the result
compatibility package dependency
#279
drop the result
compatibility package dependency
#279
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
src_plugins/eq/ppx_deriving_eq.ml
Outdated
| true, ([%type: ([%t? ok_t], [%t? err_t]) result] | | ||
[%type: ([%t? ok_t], [%t? err_t]) Result.result]) -> | ||
[%type: ([%t? ok_t], [%t? err_t]) result]) -> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The two cases are now the same. Same in a bunch of other plugins.
But I wonder what implications this change has because this is a fully syntactic pattern. Code which previously derived explicitly for Result.result
would no longer match here and fail to derive, no?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
that's fair. I didn't catch this as it was mostly find / replace. I think it might probably be warranted to keep this case here, which is just matching on an ident Result.result
. Since that doesn't re-introduce back the result dependency I think it should be reverted.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks good! I'll fix @sim642 suggestion and merge if that's fine by you @anmonteiro.
Signed-off-by: Nathan Rebours <[email protected]>
CHANGES: * Fix the unintentional removal of `Ppx_deriving_runtime.Result` in ocaml-ppx/ppx_deriving#279 ocaml-ppx/ppx_deriving#282 (@NathanReb)
Result
module was only added in OCaml 4.08:{Pervasives,Stdlib}.result
has been added as far back as OCaml 4.03