From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.1.3 (2006-06-01) on yquem.inria.fr X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=none autolearn=disabled version=3.1.3 X-Original-To: caml-list@yquem.inria.fr Delivered-To: caml-list@yquem.inria.fr Received: from mail1-relais-roc.national.inria.fr (mail1-relais-roc.national.inria.fr [192.134.164.82]) by yquem.inria.fr (Postfix) with ESMTP id 287D9BC6C for ; Thu, 31 Jan 2008 23:01:27 +0100 (CET) X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AgAAAOrToUfAXQImh2dsb2JhbACBWI5KAQEBCAopn3w X-IronPort-AV: E=Sophos;i="4.25,287,1199660400"; d="asc'?vcf'?scan'208";a="7490257" Received: from discorde.inria.fr ([192.93.2.38]) by mail1-smtp-roc.national.inria.fr with ESMTP; 31 Jan 2008 23:01:27 +0100 Received: from mail4-relais-sop.national.inria.fr (mail4-relais-sop.national.inria.fr [192.134.164.105]) by discorde.inria.fr (8.13.6/8.13.6) with ESMTP id m0VM1QZQ019794 (version=TLSv1/SSLv3 cipher=RC4-SHA bits=128 verify=OK) for ; Thu, 31 Jan 2008 23:01:26 +0100 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AgAAAGjUoUfUGypAi2dsb2JhbACBWI5KAQEBCAQGCQgICQeffQ X-IronPort-AV: E=Sophos;i="4.25,287,1199660400"; d="asc'?vcf'?scan'208";a="22033511" Received: from smtp7-g19.free.fr ([212.27.42.64]) by mail4-smtp-sop.national.inria.fr with ESMTP; 31 Jan 2008 23:01:25 +0100 Received: from smtp7-g19.free.fr (localhost [127.0.0.1]) by smtp7-g19.free.fr (Postfix) with ESMTP id ED7C8322807; Thu, 31 Jan 2008 23:01:25 +0100 (CET) Received: from Tocksi.local (lns-bzn-48f-81-56-220-129.adsl.proxad.net [81.56.220.129]) by smtp7-g19.free.fr (Postfix) with ESMTP id 0BA9C32286C; Thu, 31 Jan 2008 23:01:24 +0100 (CET) Message-ID: <47A2452F.7010109@univ-savoie.fr> Date: Thu, 31 Jan 2008 23:01:19 +0100 From: Christophe Raffalli User-Agent: Thunderbird 2.0.0.9 (Macintosh/20071031) MIME-Version: 1.0 To: David Teller Cc: =?UTF-8?B?QsO8bnpsaSBEYW5pZWw=?= , caml-list List , Andrej.Bauer@andrej.com Subject: Re: [Caml-list] [OSR] Exceptionless error management References: <9d3ec8300801310157r77b86fc0k80f40b1df36091c2@mail.gmail.com> <0640C30E-07B5-4885-AC38-671755BB79AA@erratique.ch> <47A1D68B.70700@fmf.uni-lj.si> <1201811141.6565.21.camel@Blefuscu> In-Reply-To: <1201811141.6565.21.camel@Blefuscu> X-Enigmail-Version: 0.95.6 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="------------enigD60FEFAD318E422AF908ECD2" X-Miltered: at discorde with ID 47A24536.000 by Joe's j-chkmail (http://j-chkmail . ensmp . fr)! X-Spam: no; 0.00; christophe:01 raffalli:01 christophe:01 raffalli:01 univ-savoie:01 recursive:01 camlp:01 expr:01 translated:01 expr:01 chablais:01 73376:01 univ-savoie:01 norma:98 lama:01 X-Attachments: cset="UTF-8" cset="utf-8" name="Christophe_Raffalli.vcf" name="Christophe_Raffalli.vcf" type="application/pgp-signature" name="signature.asc" name="signature.asc" This is an OpenPGP/MIME signed message (RFC 2440 and 3156) --------------enigD60FEFAD318E422AF908ECD2 Content-Type: multipart/mixed; boundary="------------010608040808080000060205" This is a multi-part message in MIME format. --------------010608040808080000060205 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: quoted-printable >> match try Some (f x) with e -> None with >> | None -> .. >> | Some v -> ... >> >> Because I need tail recursive functions. >> =20 > > =20 For tail call and exception, the best is to keep exception and use "let=20 try" contruct (a camlp4 extension is available, but the coding is quite simple): let try x =3D expr in normal_case with e -> exc_case is translated to (try let x =3D expr in fun () -> normal_case with e -> fun () -> exc_case) () This way you get tail call in norma_case and exc_case. Hope this helps, Christophe --=20 Christophe Raffalli Universite de Savoie Batiment Le Chablais, bureau 21 73376 Le Bourget-du-Lac Cedex tel: (33) 4 79 75 81 03 fax: (33) 4 79 75 87 42 mail: Christophe.Raffalli@univ-savoie.fr www: http://www.lama.univ-savoie.fr/~RAFFALLI --------------------------------------------- IMPORTANT: this mail is signed using PGP/MIME At least Enigmail/Mozilla, mutt or evolution=20 can check this signature. The public key is stored on www.keyserver.net --------------------------------------------- --------------010608040808080000060205 Content-Type: text/x-vcard; charset=utf-8; name="Christophe_Raffalli.vcf" Content-Transfer-Encoding: base64 Content-Disposition: attachment; filename="Christophe_Raffalli.vcf" YmVnaW46dmNhcmQNCmZuOkNocmlzdG9waGUgUmFmZmFsbGkNCm46UmFmZmFsbGk7Q2hyaXN0 b3BoZQ0Kb3JnOkxBTUEgKFVNUiA1MTI3KQ0KZW1haWw7aW50ZXJuZXQ6Y2hyaXN0b3BoZS5y YWZmYWxsaUB1bml2LXNhdm9pZS5mcg0KdGl0bGU7cXVvdGVkLXByaW50YWJsZTpNYT1DMz1B RXRyZSBkZSBjb25mPUMzPUE5cmVuY2VzDQp0ZWw7d29yazorMzMgNCA3OSA3NSA4MSAwMw0K bm90ZTpodHRwOi8vd3d3LmxhbWEudW5pdi1zYXZvaWUuZnIvfnJhZmZhbGxpDQp4LW1vemls bGEtaHRtbDpUUlVFDQp2ZXJzaW9uOjIuMQ0KZW5kOnZjYXJkDQoNCg== --------------010608040808080000060205-- --------------enigD60FEFAD318E422AF908ECD2 Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.7 (Darwin) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD8DBQFHokU0i9jr/RgYAS4RAlOUAJ9T0crDI1xyHI35XN7/l1eDIwcwBACgqBwg 3gVNW6gKMYgKSPFFGmaHy68= =VgfE -----END PGP SIGNATURE----- --------------enigD60FEFAD318E422AF908ECD2--