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 nez-perce.inria.fr (nez-perce.inria.fr [192.93.2.78]) by yquem.inria.fr (Postfix) with ESMTP id 3C470BB84 for ; Tue, 9 May 2006 20:24:54 +0200 (CEST) Received: from nz-out-0102.google.com (nz-out-0102.google.com [64.233.162.199]) by nez-perce.inria.fr (8.13.0/8.13.0) with ESMTP id k49IOrwT008552 for ; Tue, 9 May 2006 20:24:53 +0200 Received: by nz-out-0102.google.com with SMTP id o37so1503715nzf for ; Tue, 09 May 2006 11:24:53 -0700 (PDT) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=JAL/w20c6bIITpmn+CSQWT8ch/x5GI6D+udEhWkUMPphwTPGxO0lOshb9/Pi52t/lqo8SHNmqNEuBpH7cwdv9GtUATK7BWu8gYzE2w6Gq7cNlt7qiTcLusbm7/GVNChBEDwdGgK3uPhXyxwU1Cd14jh0DbaW3oA4okgBt7h7Dlg= Received: by 10.36.108.9 with SMTP id g9mr3808660nzc; Tue, 09 May 2006 11:24:53 -0700 (PDT) Received: by 10.36.120.1 with HTTP; Tue, 9 May 2006 11:24:53 -0700 (PDT) Message-ID: Date: Wed, 10 May 2006 06:24:53 +1200 From: "Jonathan Roewen" To: "Arne Ehrlich" Subject: Re: [Caml-list] is this a bug ? Cc: caml-list@yquem.inria.fr In-Reply-To: <200605091547.47017.arne.ehrlich@groknet.de> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: quoted-printable Content-Disposition: inline References: <44609473.6030004@univ-savoie.fr> <200605091547.47017.arne.ehrlich@groknet.de> X-j-chkmail-Score: MSGID : 4460DE75.000 on nez-perce : j-chkmail score : X : 0/20 1 X-Miltered: at nez-perce with ID 4460DE75.000 by Joe's j-chkmail (http://j-chkmail.ensmp.fr)! X-Spam: no; 0.00; bug:01 bug:01 semantics:01 inference:01 caml-list:01 naming:01 patterns:01 semantic:02 semantic:02 match:02 variables:02 types:02 depends:04 problem:05 problem:05 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=RCVD_BY_IP autolearn=disabled version=3.0.3 > You found an semantic problem in the gramar ^^ > or-patterns do not play well with "when" > > I think it's a bug in the semantics... I don't believe so. It depends on the type. In fact, it works very well with sum types (I did a very small inference engine which used or patterns with when to great effect). The problem is the two match clauses are not different. They look different for the fact that the variables are bound in a different order -- which is why the warning occurs. For matching, variable naming has no semantic impact, hence the confusion. Jonathan