From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: 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 09676BB91 for ; Thu, 27 Jan 2005 13:31:35 +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 j0RCVYHD016907 for ; Thu, 27 Jan 2005 13:31:34 +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 NAA22166 for ; Thu, 27 Jan 2005 13:31:34 +0100 (MET) Received: from will.iki.fi (will.iki.fi [217.169.64.20]) by concorde.inria.fr (8.13.0/8.13.0) with ESMTP id j0RCVXmv016904 for ; Thu, 27 Jan 2005 13:31:33 +0100 Received: from acerf.exomi.com (fa-3-0-0.fw.exomi.com [217.169.64.99]) by will.iki.fi (Postfix) with ESMTP id C64BD68; Thu, 27 Jan 2005 14:31:32 +0200 (EET) Subject: Re: [Caml-list] Strange matching-problem... ?! From: Ville-Pertti Keinonen To: Oliver Bandel Cc: caml-list@inria.fr In-Reply-To: <1106828434.41f8dc9213b6e@webmail.in-berlin.de> References: <1106828434.41f8dc9213b6e@webmail.in-berlin.de> Content-Type: text/plain Date: Thu, 27 Jan 2005 14:31:32 +0200 Message-Id: <1106829092.663.3.camel@localhost> Mime-Version: 1.0 X-Mailer: Evolution 2.0.3 FreeBSD GNOME Team Port Content-Transfer-Encoding: 7bit X-Miltered: at concorde with ID 41F8DF26.000 by Joe's j-chkmail (http://j-chkmail.ensmp.fr)! X-Miltered: at concorde with ID 41F8DF25.000 by Joe's j-chkmail (http://j-chkmail.ensmp.fr)! X-Spam: no; 0.00; caml-list:01 oliver:01 bandel:01 wrote:01 foo:01 foo:01 catch-all:01 ...:98 match:02 match:02 string:03 pattern:03 matches:05 thu:05 variable:06 X-Spam-Checker-Version: SpamAssassin 3.0.0 (2004-09-13) on yquem.inria.fr X-Spam-Status: No, score=0.9 required=5.0 tests=PLING_QUERY autolearn=disabled version=3.0.0 X-Spam-Level: On Thu, 2005-01-27 at 13:20 +0100, Oliver Bandel wrote: > # match Foo with > _Foo -> "foo" > |Bar -> "bar";; > Warning: this match case is unused. > - : string = "foo" Here, you're matching the value Foo against a catch-all pattern with a variable called _Foo. This is equivalent to writing: match with x -> "foo" | -> "bar" The first case matches any value.