-
Notifications
You must be signed in to change notification settings - Fork 99
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
Gensym improvements #285
Gensym improvements #285
Conversation
e4b8f65
to
4e40d4f
Compare
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.
Thanks, LGTM!
I'm not very familiar with name_type_params_in_td
. Why is it better to use a
, b
, ... as a prefix for the name instead of v_x
or no prefix at all?
The While I was at it, it occurred to me that |
Oh nice, thanks for all the explanation! Using |
What gen_symbol generates has no apostrophe. But when wrapped in Ptyp_var and rendered back as ocaml syntax, there would be an apostrophe there. |
Signed-off-by: Carl Eastlund <ceastlund@janestreet.com>
Signed-off-by: Carl Eastlund <ceastlund@janestreet.com>
Signed-off-by: Carl Eastlund <ceastlund@janestreet.com>
Signed-off-by: Carl Eastlund <ceastlund@janestreet.com>
Signed-off-by: Carl Eastlund <ceastlund@janestreet.com>
add PR attribution to gen_symbol fix Co-authored-by: Sonja Heinze <sonjaleaheinze@gmail.com> Signed-off-by: Carl Eastlund <ceastlund@janestreet.com>
add PR attribution to name_type_params_in_td change Co-authored-by: Sonja Heinze <sonjaleaheinze@gmail.com> Signed-off-by: Carl Eastlund <ceastlund@janestreet.com>
2d45c55
to
234f26a
Compare
CHANGES: - Add support for OCaml 4.14 (ocaml-ppx/ppxlib#304, @kit-ty-kate) - Expand nodes before applying derivers or other inline attributes based transformation, allowing better interactions between extensions and derivers (ocaml-ppx/ppxlib#279, ocaml-ppx/ppxlib#297, @NathanReb) - Add support for registering ppx_import as a pseudo context-free rule (ocaml-ppx/ppxlib#271, @NathanReb) - Add `input_name` to the `Expansion_context.Extension` and `Expansion_context.Deriver` modules (ocaml-ppx/ppxlib#284, @tatchi) - Improve `gen_symbol` to strip previous unique suffix before adding a new one (ocaml-ppx/ppxlib#285, @ceastlund) - Improve `name_type_params_in_td` to use prefixes `a`, `b`, ... instead of `v_x`. (ocaml-ppx/ppxlib#285, @ceastlund) - Fix a bug in `type_is_recursive` and `really_recursive` where they would consider a type declaration recursive if the type appeared inside an attribute payload (ocaml-ppx/ppxlib#299, @NathanReb)
Improved two aspects of
gen_symbol
:gen_symbol
result as~prefix
to another no longer results in a double-suffixname_type_params_in_td
produces more sensible variable namesFirst added tests for both behaviors, then improved them and updated tests.