From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from concorde.inria.fr (concorde.inria.fr [192.93.2.39]) by yquem.inria.fr (Postfix) with ESMTP id 40E6BBC2F for ; Mon, 29 Nov 2004 19:45:42 +0100 (CET) Received: from pauillac.inria.fr (pauillac.inria.fr [128.93.11.35]) by concorde.inria.fr (8.13.0/8.13.0) with ESMTP id iATIjfPo006009 for ; Mon, 29 Nov 2004 19:45:41 +0100 Received: from concorde.inria.fr (concorde.inria.fr [192.93.2.39]) by pauillac.inria.fr (8.7.6/8.7.3) with ESMTP id TAA06194 for ; Mon, 29 Nov 2004 19:45:41 +0100 (MET) Received: from hugh.cs.washington.edu (hugh.cs.washington.edu [128.208.2.43]) by concorde.inria.fr (8.13.0/8.13.0) with ESMTP id iATIjdQW005999 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=FAIL) for ; Mon, 29 Nov 2004 19:45:41 +0100 Received: from [128.208.2.33] (gerald.cs.washington.edu [128.208.2.33]) by hugh.cs.washington.edu (8.13.1/8.13.1/1.5) with ESMTP id iATIjcio025270; Mon, 29 Nov 2004 10:45:39 -0800 (envelope-from djg@cs.washington.edu) Message-ID: <41AB6E4D.9010701@cs.washington.edu> Date: Mon, 29 Nov 2004 10:45:33 -0800 From: Dan Grossman User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.2) Gecko/20040804 Netscape/7.2 (ax) X-Accept-Language: en-us, en MIME-Version: 1.0 To: Dan Grossman Cc: Christophe Raffalli , caml-list@inria.fr Subject: Re: [Caml-list] partial match in let References: <41AB5819.2020206@univ-savoie.fr> <41AB6D0F.5010107@cs.washington.edu> In-Reply-To: <41AB6D0F.5010107@cs.washington.edu> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-Miltered: at concorde with ID 41AB6E55.000 by Joe's j-chkmail (http://j-chkmail.ensmp.fr)! X-Miltered: at concorde with ID 41AB6E53.000 by Joe's j-chkmail (http://j-chkmail.ensmp.fr)! X-Spam: no; 0.00; caml-list:01 oops:01 foo:01 wrote:01 foo:01 christophe:01 raffalli:01 wrote:01 usefull:01 caml-list:01 beginner's:01 ocaml:01 beginners:01 bug:01 assert:01 X-Spam-Checker-Version: SpamAssassin 3.0.0 (2004-09-13) on yquem.inria.fr X-Spam-Status: No, score=0.0 required=5.0 tests=none autolearn=disabled version=3.0.0 X-Spam-Level: Oops, a bit too hasty on the send (flaky mail reader): let (x,y) = (match f(x) with [x1;y1] -> (x,y) | _ -> assert false) in foo Dan Grossman wrote: > > let g x = match f(x) with [x1;y1] -> (x,y) | assert false > let (x,y) = g x in foo > > Christophe Raffalli wrote: > >> >> Wish: I had like a way to avoid the partial match warning in code like >> >> let [x;y] = f (x) in foo >> >> Because if foo is long writing >> >> match f(x) with [x;y] -> foo | _ -> assert false >> >> is really ennoying, especially if you have a long sequence of let. >> >> I find usefull the partial match warning for match and function but >> not for let (if you write a let, I think you are aware that your >> matching will be partial for any data type with more than one >> constructor, you do not need a warning) >> > > _______________________________________________ > Caml-list mailing list. Subscription management: > http://yquem.inria.fr/cgi-bin/mailman/listinfo/caml-list > Archives: http://caml.inria.fr > Beginner's list: http://groups.yahoo.com/group/ocaml_beginners > Bug reports: http://caml.inria.fr/bin/caml-bugs