From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Original-To: caml-list@sympa.inria.fr Delivered-To: caml-list@sympa.inria.fr Received: from mail2-relais-roc.national.inria.fr (mail2-relais-roc.national.inria.fr [192.134.164.83]) by sympa.inria.fr (Postfix) with ESMTPS id A1BF77EE7D for ; Mon, 1 Jun 2015 19:38:16 +0200 (CEST) Received-SPF: None (mail2-smtp-roc.national.inria.fr: no sender authenticity information available from domain of gustave.nimant@free.fr) identity=pra; client-ip=212.27.42.6; receiver=mail2-smtp-roc.national.inria.fr; envelope-from="gustave.nimant@free.fr"; x-sender="gustave.nimant@free.fr"; x-conformance=sidf_compatible Received-SPF: None (mail2-smtp-roc.national.inria.fr: no sender authenticity information available from domain of gustave.nimant@free.fr) identity=mailfrom; client-ip=212.27.42.6; receiver=mail2-smtp-roc.national.inria.fr; envelope-from="gustave.nimant@free.fr"; x-sender="gustave.nimant@free.fr"; x-conformance=sidf_compatible Received-SPF: None (mail2-smtp-roc.national.inria.fr: no sender authenticity information available from domain of postmaster@smtp6-g21.free.fr) identity=helo; client-ip=212.27.42.6; receiver=mail2-smtp-roc.national.inria.fr; envelope-from="gustave.nimant@free.fr"; x-sender="postmaster@smtp6-g21.free.fr"; x-conformance=sidf_compatible X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: A0CFAQCkl2xVnAYqG9Rcg2Regx69IYV3AoE1PBABAQEBAQEBEQEBAQEBBg0JCSEuhCMBAQQjFVELGAICBSECAg8CRgYNCAKIEwEZCbRJngwJhV8sgSGKIoUNgmiBRQWLV4tvhmCBaYYTjzyEHW0BgkYBAQE X-IPAS-Result: A0CFAQCkl2xVnAYqG9Rcg2Regx69IYV3AoE1PBABAQEBAQEBEQEBAQEBBg0JCSEuhCMBAQQjFVELGAICBSECAg8CRgYNCAKIEwEZCbRJngwJhV8sgSGKIoUNgmiBRQWLV4tvhmCBaYYTjzyEHW0BgkYBAQE X-IronPort-AV: E=Sophos;i="5.13,534,1427752800"; d="scan'208";a="161301890" Received: from smtp6-g21.free.fr ([212.27.42.6]) by mail2-smtp-roc.national.inria.fr with ESMTP/TLS/ADH-AES256-SHA; 01 Jun 2015 19:38:16 +0200 Received: from [192.168.0.11] (unknown [82.226.95.82]) by smtp6-g21.free.fr (Postfix) with ESMTP id 2502A8232B for ; Mon, 1 Jun 2015 19:34:32 +0200 (CEST) Message-ID: <556C9887.70502@free.fr> Date: Mon, 01 Jun 2015 19:38:15 +0200 From: Gustave Nimant User-Agent: Mozilla/5.0 (X11; Linux i686; rv:31.0) Gecko/20100101 Icedove/31.2.0 MIME-Version: 1.0 To: "caml-list@inria.fr" References: <556C4512.2050002@free.fr> <556C89F3.3000206@free.fr> <556C8C74.5030809@inria.fr> In-Reply-To: <556C8C74.5030809@inria.fr> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [Caml-list] getting the name of a function from its body On 01/06/2015 18:46, Francois Berenger wrote: >> >> It seems that the functions described in >> http://caml.inria.fr/pub/docs/manual-ocaml/libref/Pervasives.html >> do not answer my question : >> "how to get the name of the current function ?" > > It is currently not possible. > > There is no __FUNCTION__ like you have in C. > I was also quite interested by this feature a long time ago. > For loggers it is quite useful. > > I cannot find the thread back, I don't know where to search the archives > of caml-list. > Gabriel Scherer mentioned there is not always a function name since > they can be inlined by the compiler, if I remember correctly. I hope the argument of the inlining case is not serious, is it ? Best, Gustave