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 mail3-relais-sop.national.inria.fr (mail3-relais-sop.national.inria.fr [192.134.164.104]) by sympa.inria.fr (Postfix) with ESMTPS id 44E417EE7C for ; Wed, 27 Apr 2016 19:17:10 +0200 (CEST) IronPort-PHdr: 9a23:UqizYBaIhiP0QNjThUy4IKb/LSx+4OfEezUN459isYplN5qZpcuzbnLW6fgltlLVR4KTs6sC0LqG9fC6Ejdcqb+681k8M7V0HycfjssXmwFySOWkMmbcaMDQUiohAc5ZX0Vk9XzoeWJcGcL5ekGA6ibqtW1aJBzzOEJPK/jvHcaK1oLsh7D0q8eYOFkArQH+SI0xBS3+lR/WuMgSjNkqAYcK4TyNnEF1ff9Lz3hjP1OZkkW0zM6x+Jl+73YY4Kp5pIZoGJ/3dKUgTLFeEC9ucyVsvJWq5lH/Sl6g73EGU2gS2iFDAwXf4QuyCpj4uDH7u+47wyKaMNf7V5g7XD2j6+FgTxq+2wkdMDts2W3Ni8F2xIRSrB+770h2z5TVbYe9Mv1ifeXaZ9xMFjkJZdpYSyEUWtD0VIAIFedUeL8A94Q= Authentication-Results: mail3-smtp-sop.national.inria.fr; spf=None smtp.pra=adrien@notk.org; spf=Pass smtp.mailfrom=adrien@notk.org; spf=None smtp.helo=postmaster@nautica.notk.org Received-SPF: None (mail3-smtp-sop.national.inria.fr: no sender authenticity information available from domain of adrien@notk.org) identity=pra; client-ip=91.121.71.147; receiver=mail3-smtp-sop.national.inria.fr; envelope-from="adrien@notk.org"; x-sender="adrien@notk.org"; x-conformance=sidf_compatible Received-SPF: Pass (mail3-smtp-sop.national.inria.fr: domain of adrien@notk.org designates 91.121.71.147 as permitted sender) identity=mailfrom; client-ip=91.121.71.147; receiver=mail3-smtp-sop.national.inria.fr; envelope-from="adrien@notk.org"; x-sender="adrien@notk.org"; x-conformance=sidf_compatible; x-record-type="v=spf1" Received-SPF: None (mail3-smtp-sop.national.inria.fr: no sender authenticity information available from domain of postmaster@nautica.notk.org) identity=helo; client-ip=91.121.71.147; receiver=mail3-smtp-sop.national.inria.fr; envelope-from="adrien@notk.org"; x-sender="postmaster@nautica.notk.org"; x-conformance=sidf_compatible X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: A0CdDAAq8yBX/5NHeVtegzhTfQG5eIF1IoVtAoExOhIBAQEBAQEBAWQnQRIBgVmCFAEBAQQjVhALGAICBRMHBwICDwUYMYhBCrJCkTEBAQEHAgEdfIUlhEuELYMQK4IrBY1UhTiFBIV8iBEKZYECTogjhDmGJIkMJwgzgjaBNzowAYVag1MBAQE X-IPAS-Result: A0CdDAAq8yBX/5NHeVtegzhTfQG5eIF1IoVtAoExOhIBAQEBAQEBAWQnQRIBgVmCFAEBAQQjVhALGAICBRMHBwICDwUYMYhBCrJCkTEBAQEHAgEdfIUlhEuELYMQK4IrBY1UhTiFBIV8iBEKZYECTogjhDmGJIkMJwgzgjaBNzowAYVag1MBAQE X-IronPort-AV: E=Sophos;i="5.24,542,1454972400"; d="scan'208";a="175986395" Received: from nautica.notk.org ([91.121.71.147]) by mail3-smtp-sop.national.inria.fr with ESMTP/TLS/ADH-AES256-GCM-SHA384; 27 Apr 2016 19:17:09 +0200 Received: by nautica.notk.org (Postfix, from userid 1003) id 74FF3C009; Wed, 27 Apr 2016 19:17:06 +0200 (CEST) Date: Wed, 27 Apr 2016 19:17:06 +0200 From: Adrien Nader To: Gabriel Scherer Cc: William , caml users Message-ID: <20160427171706.GA26005@notk.org> References: <572084CC.1080408@libertysurf.fr> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.21 (2010-09-15) Subject: Re: [Caml-list] ocaml 4.03 and warning 52 : argument of this constructor should not be matched against a constant pattern On Wed, Apr 27, 2016, Gabriel Scherer wrote: > We now have a section of the reference manual (which has been updated to > 4.03) on Warnings, and this particular warning is documented there: > http://caml.inria.fr/pub/docs/manual-ocaml/comp.html#s:comp-warnings > > Feedback (for example as Mantis tickets) on which warnings are confusing > and would deserve additional documentation -- or even patches to provide > this documentation -- are warmly welcome. Thanks for the documentation update. I've found the warning fairly confusing and this makes it clear. As a small note, in a library I use (I won't name it because I haven't checked if there were a version more recent than a couple years), C bindings use the built-in Failure exception. I guess this is because it is so much more convenient when it comes to making C bindings. Am I right that such scenario will always trigger this warning because the warning attribute will never be removed from the OCaml upstream definition of Failure? PS: my only comment about the warning is maybe to state that all(?) exceptions from the stdlib have the corresponding attribute set. -- Adrien Nader