From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.1.3 (2006-06-01) on yquem.inria.fr X-Spam-Level: * X-Spam-Status: No, score=1.0 required=5.0 tests=AWL,SPF_FAIL autolearn=disabled version=3.1.3 X-Original-To: caml-list@yquem.inria.fr Delivered-To: caml-list@yquem.inria.fr Received: from discorde.inria.fr (discorde.inria.fr [192.93.2.38]) by yquem.inria.fr (Postfix) with ESMTP id 2FD4BBC69 for ; Sun, 24 Jun 2007 14:32:05 +0200 (CEST) Received: from smtp2e.orange.fr (smtp2e.orange.fr [80.12.242.112]) by discorde.inria.fr (8.13.6/8.13.6) with ESMTP id l5OCW4GV005145 for ; Sun, 24 Jun 2007 14:32:05 +0200 Received: from me-wanadoo.net (localhost [127.0.0.1]) by mwinf2e13.orange.fr (SMTP Server) with ESMTP id AF8C57000093 for ; Sun, 24 Jun 2007 14:32:04 +0200 (CEST) Received: from [192.168.0.50] (ARouen-252-1-98-195.w90-23.abo.wanadoo.fr [90.23.145.195]) by mwinf2e13.orange.fr (SMTP Server) with ESMTP id 59C977000090; Sun, 24 Jun 2007 14:32:04 +0200 (CEST) X-ME-UUID: 20070624123204367.59C977000090@mwinf2e13.orange.fr Message-ID: <467E6447.4030606@univ-paris12.fr> Date: Sun, 24 Jun 2007 14:32:07 +0200 From: =?ISO-8859-1?Q?Fr=E9d=E9ric_Gava?= Reply-To: gava@univ-paris12.fr Organization: =?ISO-8859-1?Q?Universit=E9_de_Paris_12=2C_LACL?= User-Agent: Thunderbird 1.5.0.9 (X11/20070104) MIME-Version: 1.0 To: David Thomas Cc: caml-list@yquem.inria.fr Subject: Re: [Caml-list] Anti-matching References: <20070624105238.82437.qmail@web30511.mail.mud.yahoo.com> In-Reply-To: <20070624105238.82437.qmail@web30511.mail.mud.yahoo.com> Content-Type: text/plain; charset=iso-8859-1; format=flowed Content-Transfer-Encoding: 8bit X-Miltered: at discorde with ID 467E6444.000 by Joe's j-chkmail (http://j-chkmail . ensmp . fr)! X-Spam: no; 0.00; gava:01 gava:01 simulating:01 camlp:01 12.:98 caml-list:01 frederic:03 classical:03 pattern:04 matching:06 ecrit:06 examples:07 complexity:08 matches:10 matches:10 David Thomas a écrit : > Isn't "!(x) -> a | _ -> b" the same as "x -> b | _ -> > a"? I don't really see much of a benefit, at the cost > (I assume) of complexity. In this case, yes. But you can express interesting (more easier) thinks as (examples of TOM) !f(x,x) -> // matches either something different from f, or an f with x1 != x2 f(x,!g(x)) -> { // matches an f which has either x2!=g or x2=g(y) with y != x1 You can simulating this using classical pattern matching. So I thinks that is possible using camlp4. But, looking for someone you have do this work or plan to do this. FG