Skip to content

Conversation

@vouillon
Copy link
Member

No description provided.

Simpler code + make sure we don't lose any existing attribute.
Use Ast_builder.Default.pexp_fun, which takes care of extending a
function with an additional parameter.
let params =
{ pparam_desc =
Pparam_val (nolabel, None, Pat.var ~loc:gloc (mknoloc name))
; pparam_loc = { fun_.pexp_loc with loc_ghost = true }
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The loc is changed from fun_.pexp_loc to gloc (aka. !default_loc). Can you make sure this is fine ?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this fun_.pexp_loc comes from the parameter ~loc:glob on line 831.

@vouillon vouillon force-pushed the ppx-fix branch 2 times, most recently from 6fe001d to 4027779 Compare October 28, 2025 12:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants