summaryrefslogtreecommitdiff
path: root/stdlib/stdlib.mli
diff options
context:
space:
mode:
authorNicolás Ojeda Bär <n.oje.bar@gmail.com>2020-05-12 11:20:34 +0200
committerNicolás Ojeda Bär <n.oje.bar@gmail.com>2020-05-13 20:57:21 +0200
commit4a44bf17678ee6fba23484f63fc2f48101d9354a (patch)
treecda0553c33a2163e2864943d673fbe656c921155 /stdlib/stdlib.mli
parent6e3f710d78e7ed6799df4e82351acb26850d5a15 (diff)
downloadocaml-4a44bf17678ee6fba23484f63fc2f48101d9354a.tar.gz
Expose %loc_FUNCTION as __FUNCTION__
Diffstat (limited to 'stdlib/stdlib.mli')
-rw-r--r--stdlib/stdlib.mli6
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