diff options
author | Nicolás Ojeda Bär <n.oje.bar@gmail.com> | 2020-05-12 11:20:34 +0200 |
---|---|---|
committer | Nicolás Ojeda Bär <n.oje.bar@gmail.com> | 2020-05-13 20:57:21 +0200 |
commit | 4a44bf17678ee6fba23484f63fc2f48101d9354a (patch) | |
tree | cda0553c33a2163e2864943d673fbe656c921155 /stdlib/stdlib.mli | |
parent | 6e3f710d78e7ed6799df4e82351acb26850d5a15 (diff) | |
download | ocaml-4a44bf17678ee6fba23484f63fc2f48101d9354a.tar.gz |
Expose %loc_FUNCTION as __FUNCTION__
Diffstat (limited to 'stdlib/stdlib.mli')
-rw-r--r-- | stdlib/stdlib.mli | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/stdlib/stdlib.mli b/stdlib/stdlib.mli index 94d2b4ca3c..3330a5b24b 100644 --- a/stdlib/stdlib.mli +++ b/stdlib/stdlib.mli @@ -273,6 +273,12 @@ external __POS__ : string * int * int * int = "%loc_POS" @since 4.02.0 *) +external __FUNCTION__ : string = "%loc_FUNCTION" +(** [__FUNCTION__] returns the name of the current function or method, including + any enclosing modules or classes. + + @since 4.12.0 *) + external __LOC_OF__ : 'a -> string * 'a = "%loc_LOC" (** [__LOC_OF__ expr] returns a pair [(loc, expr)] where [loc] is the location of [expr] in the file currently being parsed by the |