From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Original-To: caml-list@yquem.inria.fr Delivered-To: caml-list@yquem.inria.fr Received: from concorde.inria.fr (concorde.inria.fr [192.93.2.39]) by yquem.inria.fr (Postfix) with ESMTP id CECD0BB84 for ; Thu, 20 Apr 2006 13:53:48 +0200 (CEST) Received: from [128.93.8.130] (macadam.inria.fr [128.93.8.130]) by concorde.inria.fr (8.13.0/8.13.0) with ESMTP id k3KBrmjE011608 for ; Thu, 20 Apr 2006 13:53:48 +0200 Mime-Version: 1.0 (Apple Message framework v749.3) In-Reply-To: <20060417093635.GB13523@anthony.ics.uci.edu> References: <1145221898.16349.259200911@webmail.messagingengine.com> <200604170106.23660.jon@ffconsultancy.com> <20060417093635.GB13523@anthony.ics.uci.edu> Content-Type: text/plain; charset=US-ASCII; delsp=yes; format=flowed Message-Id: <1DFAD14E-CCAE-44BE-B778-640349EC825A@inria.fr> Content-Transfer-Encoding: 7bit From: Damien Doligez Subject: Re: [Caml-list] recursion/iterator question Date: Thu, 20 Apr 2006 13:53:49 +0200 To: caml-list X-Mailer: Apple Mail (2.749.3) X-Miltered: at concorde with ID 4447764C.000 by Joe's j-chkmail (http://j-chkmail.ensmp.fr)! X-Spam: no; 0.00; damien:01 damien:01 recursion:01 iterator:01 ocaml:01 compiler:01 2006:98 wrote:01 assert:01 caml-list:01 doligez:01 doligez:01 complains:01 matched:01 short:01 X-Spam-Checker-Version: SpamAssassin 3.0.3 (2005-04-27) on yquem.inria.fr X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=none autolearn=disabled version=3.0.3 On 2006-04-17, at 11:36, Christian Stork wrote: > Question to the rest of the list: The ocaml compiler complains with > ... > Warning P: this pattern-matching is not exhaustive. > Here is an example of a value that is not matched: > (1, []) > (However, some guarded clause may match this value.) > ... > > Am I right to assume there's no way to get rid of this warning > short of > disabling P-warnings on the command line? (I can't list all the > lacking > patterns since they depend on n, right?) Since nobody has pointed out the obvious, I'll do it: You can always disable this warning for a particular pattern-matching by adding the following as the last clause: | _ -> assert false -- Damien