Skip to content
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

Style suggestion: punning syntax for label arguments with casting coercion #2647

Open
mbarbin opened this issue Jan 30, 2025 · 0 comments
Open

Comments

@mbarbin
Copy link
Contributor

mbarbin commented Jan 30, 2025

This is a style suggestion to support the label punning when the labeled argument is casted with the :> syntax.

Current formatting
Please copy-paste your code and the formatting that is currently applied to it.

let f ~x = x
let coerce_punning x = f ~(x : int)
let cast_coerce_punning x = f ~x:(x :> int)

The coerce_punning works already. The request is about the second item.

Describe the formatting you'd like
A clear and concise description of what you want to happen.

let cast_coerce_punning x = f ~(x :> int)

Additional context

This is quite minor. This is motivated for more consistency. I don't know off-hand from which ocaml-version this punning syntax was supported. Thank you!

@mbarbin mbarbin changed the title Style suggestion: ... Style suggestion: punning syntax for label arguments with casting coercion Jan 30, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant