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

Feature request: make avilable __FUNC_NAME__ in #8824

Et7f3 opened this issue Jul 23, 2019 · 2 comments


Copy link

commented Jul 23, 2019

# let func_name () () =
    print_endline __FUNC_NAME__;;
val func_name : unit -> unit -> unit = <fun>
# func_name () ();;
- : unit = ()

I don't know which __FUNC_NAME__ will be useful in case of partial application. Maybe __FUNC_NAMES__ it will be a concatenation of func name, list of func name or the last name.

I don't know which name will be useful for anonymous function.


This comment has been minimized.

Copy link

commented Jul 23, 2019

I don't think there's anything about this which couldn't be solved with a ppx? It's not unrelated to the #trace directive in the toplevel.


This comment has been minimized.

Copy link

commented Jul 25, 2019

Oh I have forgotten #trace. Is there a similar mechanism for executable? Something inside OCAMLRUNPARAM for instance to activate trace ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet
2 participants
You can’t perform that action at this time.