From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail3-relais-sop.national.inria.fr (mail3-relais-sop.national.inria.fr [192.134.164.104]) by sympa.inria.fr (Postfix) with ESMTPS id 202A57EE7C for ; Wed, 27 Apr 2016 11:36:14 +0200 (CEST) IronPort-PHdr: 9a23:r074iBb6r8NC8SrhC2jPhNz/LSx+4OfEezUN459isYplN5qZpcm/bnLW6fgltlLVR4KTs6sC0LqG9fC5EjRQqb+681k8M7V0HycfjssXmwFySOWkMmbcaMDQUiohAc5ZX0Vk9XzoeWJcGcL5ekGA6ibqtW1aJBzzOEJPK/jvHcaK1oLsh7D0q8SYO1UArQH+SI0xBS3+lR/WuMgSjNkqAYcK4TyNnEF1ff9Lz3hjP1OZkkW0zM6x+Jl+73YY4Kp5pIYTGZn9Kps5SbhZBTFuZ3pzv+XvtBPOVxee/WYGXCMYiEwbLRLC6UTWV5Hwvy/NnH57yi2bdZn6RLY1VDDk5bpmTg3siQ8KLSQw7GDOl8E2h6IN80HpnAB234OBONLdD/F5ZK6IJd4= Authentication-Results: mail3-smtp-sop.national.inria.fr; spf=None smtp.pra=daniel.buenzli@erratique.ch; spf=None smtp.mailfrom=daniel.buenzli@erratique.ch; spf=None smtp.helo=postmaster@smtp.webfaction.com Received-SPF: None (mail3-smtp-sop.national.inria.fr: no sender authenticity information available from domain of daniel.buenzli@erratique.ch) identity=pra; client-ip=74.55.86.74; receiver=mail3-smtp-sop.national.inria.fr; envelope-from="daniel.buenzli@erratique.ch"; x-sender="daniel.buenzli@erratique.ch"; x-conformance=sidf_compatible Received-SPF: None (mail3-smtp-sop.national.inria.fr: no sender authenticity information available from domain of daniel.buenzli@erratique.ch) identity=mailfrom; client-ip=74.55.86.74; receiver=mail3-smtp-sop.national.inria.fr; envelope-from="daniel.buenzli@erratique.ch"; x-sender="daniel.buenzli@erratique.ch"; x-conformance=sidf_compatible Received-SPF: None (mail3-smtp-sop.national.inria.fr: no sender authenticity information available from domain of postmaster@smtp.webfaction.com) identity=helo; client-ip=74.55.86.74; receiver=mail3-smtp-sop.national.inria.fr; envelope-from="daniel.buenzli@erratique.ch"; x-sender="postmaster@smtp.webfaction.com"; x-conformance=sidf_compatible X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: A0AEAQDmhiBXkEpWN0pevwGBdIYPAoFxEwEBAQEBAQEBEQEBAQEHDQkJIS9BDgGBXYIVAQEEIwRSEAsaAh8HAgJHEAYbiCIEszeRNgEBCAEBAQEcfIhugQKEPYMAK4IrAQSYEI9oh1sOhVePMCIDglMggTeGIYN3AQEB X-IPAS-Result: A0AEAQDmhiBXkEpWN0pevwGBdIYPAoFxEwEBAQEBAQEBEQEBAQEHDQkJIS9BDgGBXYIVAQEEIwRSEAsaAh8HAgJHEAYbiCIEszeRNgEBCAEBAQEcfIhugQKEPYMAK4IrAQSYEI9oh1sOhVePMCIDglMggTeGIYN3AQEB X-IronPort-AV: E=Sophos;i="5.24,540,1454972400"; d="scan'208";a="175924657" Received: from mail6.webfaction.com (HELO smtp.webfaction.com) ([74.55.86.74]) by mail3-smtp-sop.national.inria.fr with ESMTP/TLS/DHE-RSA-AES256-SHA; 27 Apr 2016 11:36:13 +0200 Received: from [172.20.10.2] (94.234.197.178.dynamic.wless.lssmb00p-cgnat.res.cust.swisscom.ch [178.197.234.94]) by smtp.webfaction.com (Postfix) with ESMTP id 6560020A3531; Wed, 27 Apr 2016 09:36:07 +0000 (UTC) Date: Wed, 27 Apr 2016 11:36:06 +0200 From: =?utf-8?Q?Daniel_B=C3=BCnzli?= To: William Cc: caml-list@inria.fr Message-ID: <32C540F73D89478D9E6D2AF2599F639F@erratique.ch> In-Reply-To: <572084CC.1080408@libertysurf.fr> References: <572084CC.1080408@libertysurf.fr> X-Mailer: sparrow 1.6.4 (build 1178) MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Content-Disposition: inline Subject: Re: [Caml-list] ocaml 4.03 and warning 52 : argument of this constructor should not be matched against a constant pattern Le mercredi, 27 avril 2016 =C3=A0 11:22, William a =C3=A9crit : > How are we supposed to handle this nicely with the standard library ? Is > there a better approach to catch those exceptions ? Capture them immediately around the function call that raises with a _ patt= ern.=20=20 For example:=20=20 match (try Some (List.hd lst) with Failure _ -> None) with | None -> Printf.printf "empty list\n" | Some hd -> =E2=80=A6 That's the way these functions should have been defined in the first place. Best,=20=20 Daniel