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
Compiler option to implicitely add the new [@tailcall] to all functions #6892
Comments
Comment author: @gasche I think you could rather easily implement this as an external -ppx tool. One slightly tricky part is to detect the "innermost" application node to add the attribute (I don't think anything terrible would happen if you annotated each node, except clobbering the AT), but then programmatically adding the attribute should be very simple. |
Comment author: @alainfrisch I must have missing something, but do you suggest to reject: let y = f x in ? |
Comment author: berenger I don't know about ppx things yet. |
Comment author: @damiendoligez Like @Frisch, I'm wondering what kind of code you write. Do all your function calls, constructors and records have only variables and constants as arguments? |
Comment author: berenger I thought the [@tailcall] annotation is on the function declaration. |
Comment author: berenger My old dream was that we could have the compiler warn when |
Original bug ID: 6892
Reporter: berenger
Status: closed (set by @alainfrisch on 2015-06-15T17:31:26Z)
Resolution: not a bug
Priority: normal
Severity: feature
Category: ~DO NOT USE (was: OCaml general)
Bug description
Sometimes, I dream that before releasing a library for general consumption
I could compile it with "--only-tailcalls" before.
I am pretty sure I would even turn this warning into an error for most of my projects ...
The text was updated successfully, but these errors were encountered: