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 309327EEF3 for ; Mon, 1 Jun 2015 13:53:17 +0200 (CEST) Received-SPF: None (mail2-smtp-roc.national.inria.fr: no sender authenticity information available from domain of gabriel.scherer@gmail.com) identity=pra; client-ip=209.85.223.176; receiver=mail2-smtp-roc.national.inria.fr; envelope-from="gabriel.scherer@gmail.com"; x-sender="gabriel.scherer@gmail.com"; x-conformance=sidf_compatible Received-SPF: Pass (mail2-smtp-roc.national.inria.fr: domain of gabriel.scherer@gmail.com designates 209.85.223.176 as permitted sender) identity=mailfrom; client-ip=209.85.223.176; receiver=mail2-smtp-roc.national.inria.fr; envelope-from="gabriel.scherer@gmail.com"; x-sender="gabriel.scherer@gmail.com"; x-conformance=sidf_compatible; x-record-type="v=spf1" Received-SPF: None (mail2-smtp-roc.national.inria.fr: no sender authenticity information available from domain of postmaster@mail-ie0-f176.google.com) identity=helo; client-ip=209.85.223.176; receiver=mail2-smtp-roc.national.inria.fr; envelope-from="gabriel.scherer@gmail.com"; x-sender="postmaster@mail-ie0-f176.google.com"; x-conformance=sidf_compatible X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: A0DGAQB/RmxVlLDfVdFcg2ReBoMYrFeOOYINgneDAAKBJQc8EAEBAQEBAQERAQEBAQcLCwkfMIQiAQEBAwESER0BGxILAQMBCwYFBAcNDR0CAiIBEQEFAQoSBhMIChCHdQEDBgQIDaYZPjGLP4FrgnmYfwoZJwMJAVeEHwEBAQEBBQEBAQEBAQEVAQUOizWFAgQHgmiBRQWFSgqGAYtqglKEC4FnlAESI4EMCYIJghQ8MYJHAQEB X-IPAS-Result: A0DGAQB/RmxVlLDfVdFcg2ReBoMYrFeOOYINgneDAAKBJQc8EAEBAQEBAQERAQEBAQcLCwkfMIQiAQEBAwESER0BGxILAQMBCwYFBAcNDR0CAiIBEQEFAQoSBhMIChCHdQEDBgQIDaYZPjGLP4FrgnmYfwoZJwMJAVeEHwEBAQEBBQEBAQEBAQEVAQUOizWFAgQHgmiBRQWFSgqGAYtqglKEC4FnlAESI4EMCYIJghQ8MYJHAQEB X-IronPort-AV: E=Sophos;i="5.13,532,1427752800"; d="scan'208";a="161226388" Received: from mail-ie0-f176.google.com ([209.85.223.176]) by mail2-smtp-roc.national.inria.fr with ESMTP/TLS/RC4-SHA; 01 Jun 2015 13:53:16 +0200 Received: by iesa3 with SMTP id a3so106681918ies.2; Mon, 01 Jun 2015 04:53:15 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc:content-type; bh=TrltTE0626Fs+VDVJP6xka9aJrAsOiowx3MrOKP7yM8=; b=Bd8adOJFLcCnYorOeJ4xUmqFMx6ocxTNbi/YuEz9IYxuTIO/jtgA05JzPLKV4clTQQ str0yL53fuH6H0+31SJfI/+LCdAhLWpRs4ZZ6s4v3mqcwSMl6W0ctmpb513ewltpd11V X2Q/RzoCXNeeHyDUQ5spCDOe4Ux3a/VRgzjWrbIGHE1kqLj8rAUiANtgVVUybJYx7REw RyQq1eLa0joxE/DB4PQMf054/o2KhW2SsFhf4jTXET7kT/sL3GJE9ylEMI3tfJ2XgB9y Ad9YamNjbcs2/K0DFGJ/TReE7bt6J6PBqUHhrklLsl+oGp85CyZOyysN0OBomTWmB8xc 3Q7g== X-Received: by 10.43.171.202 with SMTP id nv10mr28368157icc.30.1433159595047; Mon, 01 Jun 2015 04:53:15 -0700 (PDT) MIME-Version: 1.0 Received: by 10.79.92.131 with HTTP; Mon, 1 Jun 2015 04:52:34 -0700 (PDT) In-Reply-To: References: <556C4512.2050002@free.fr> From: Gabriel Scherer Date: Mon, 1 Jun 2015 13:52:34 +0200 Message-ID: To: Fabrice Le Fessant Cc: Gustave Nimant , Ocaml Mailing List Content-Type: multipart/alternative; boundary=001a11c2f33e91c2620517737837 Subject: Re: [Caml-list] getting the name of a function from its body --001a11c2f33e91c2620517737837 Content-Type: text/plain; charset=UTF-8 "Recent" is 4.02 in that case -- although the implementors forgot to indicate it as such using @since tags in the documentation. On Mon, Jun 1, 2015 at 1:46 PM, Fabrice Le Fessant < Fabrice.Le_fessant@inria.fr> wrote: > Recent versions of OCaml provide "__LOC__", "__FILE__", "__LINE__", > "__MODULE__" and "__POS__" primitives that can be used to display > precise error messages. > > --Fabrice > > On Mon, Jun 1, 2015 at 1:42 PM, Gustave Nimant > wrote: > > Hello, > > > > is there any way in OCaml to get the name of a function from its body, in > > order to write precise error messages for instance ? > > > > Regards > > Gustave > > > > -- > > Caml-list mailing list. Subscription management and archives: > > https://sympa.inria.fr/sympa/arc/caml-list > > Beginner's list: http://groups.yahoo.com/group/ocaml_beginners > > Bug reports: http://caml.inria.fr/bin/caml-bugs > > > > -- > Fabrice LE FESSANT > Chercheur en Informatique > INRIA Paris Rocquencourt -- OCamlPro > Programming Languages and Distributed Systems > > -- > Caml-list mailing list. Subscription management and archives: > https://sympa.inria.fr/sympa/arc/caml-list > Beginner's list: http://groups.yahoo.com/group/ocaml_beginners > Bug reports: http://caml.inria.fr/bin/caml-bugs > --001a11c2f33e91c2620517737837 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
"Recent" is 4.02 in that case -- although the im= plementors forgot to indicate it as such using @since tags in the documenta= tion.

On= Mon, Jun 1, 2015 at 1:46 PM, Fabrice Le Fessant <Fabrice.Le_fes= sant@inria.fr> wrote:
Recen= t versions of OCaml provide "__LOC__", "__FILE__", &quo= t;__LINE__",
"__MODULE__" and "__POS__" primitives that can be used = to display
precise error messages.

--Fabrice

On Mon, Jun 1, 2015 at 1:42 PM, Gustave Nimant <gustave.nimant@free.fr> wrote:
> Hello,
>
> is there any way in OCaml to get the name of a function from its body,= in
> order to write precise error messages for instance ?
>
> Regards
> Gustave
>
> --
> Caml-list mailing list.=C2=A0 Subscription management and archives:
> https://sympa.inria.fr/sympa/arc/caml-list
> Beginner's list: http://groups.yahoo.com/group/ocaml_beginners
> Bug reports:
http://caml.inria.fr/bin/caml-bugs



--
Fabrice LE FESSANT
Chercheur en Informatique
INRIA Paris Rocquencourt -- OCamlPro
Programming Languages and Distributed Systems

--
Caml-list mailing list.=C2=A0 Subscription management and archives:
ht= tps://sympa.inria.fr/sympa/arc/caml-list
Beginner's list: http://groups.yahoo.com/group/ocaml_beginners
Bug reports: http://caml.inria.fr/bin/caml-bugs

--001a11c2f33e91c2620517737837--