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=2.1 required=5.0 tests=AWL,DNS_FROM_RFC_ABUSE, DNS_FROM_RFC_POST,DNS_FROM_RFC_WHOIS 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 866ABBC69 for ; Sun, 24 Jun 2007 12:52:40 +0200 (CEST) Received: from web30511.mail.mud.yahoo.com (web30511.mail.mud.yahoo.com [68.142.201.239]) by discorde.inria.fr (8.13.6/8.13.6) with SMTP id l5OAqdCi013295 for ; Sun, 24 Jun 2007 12:52:40 +0200 Received: (qmail 82439 invoked by uid 60001); 24 Jun 2007 10:52:38 -0000 DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.com; h=Message-ID:X-YMail-OSG:Received:Date:From:Subject:To:In-Reply-To:MIME-Version:Content-Type:Content-Transfer-Encoding; b=CWelp7epgkdTnY5yndh6FxSMPndOY5FHVM0VwUp7KlVfWdhG8up4RPOXAPF7q2jdPYordVsNpOZOujA2/0XODBNw9V4r1L0Shh+jS7YQsO4vcxsCYZ4Wf0OTJp6Ch19ZnQfALbOX9xCxlgll/gd+Vic/UWQA/Asxo8vLLC3tn28= ; Message-ID: <20070624105238.82437.qmail@web30511.mail.mud.yahoo.com> X-YMail-OSG: 6HVIIhkVM1n_BhMhp9OpQRyg4mYvNP1OW33k1k71IWaVtFPaYziyTYzTeUd28iv_AD2DX6fhHzCCl9XIxO6bD9OHjeGAsJIPXHidYODznrxuOm1HfU8EjXiicDFMNw-- Received: from [216.157.192.71] by web30511.mail.mud.yahoo.com via HTTP; Sun, 24 Jun 2007 03:52:38 PDT Date: Sun, 24 Jun 2007 03:52:38 -0700 (PDT) From: David Thomas Subject: Re: [Caml-list] Anti-matching To: caml-list@yquem.inria.fr In-Reply-To: <467E45AB.4070707@univ-paris12.fr> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit X-Miltered: at discorde with ID 467E4CF7.000 by Joe's j-chkmail (http://j-chkmail . ensmp . fr)! X-Spam: no; 0.00; gava:01 gava:01 ocaml:01 syntax:01 ocaml:01 camlp:01 ocaml's:01 beginner's:01 bug:01 12.:98 beginners:01 wrote:01 exception:01 caml-list:01 caml-list:01 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. --- Frédéric Gava wrote: > Dear Caml-list > > I have read the following feature of TOM, > anti-matching: > http://tom.loria.fr/soft/release-2.4/manual-2.4/manual003.html#toc8 > > > that allow to specify what you don't want to match. > For example in a > OCaml like syntax (for the type 'a option = None | > Some of 'a): > > (function !(Some _) -> assert false) > > would raise an exception in case of None. Ok, this > is not a really > interesting example but is it a good feature for > ocaml ? Is some one > have do a camlp4 extension for this ? I do not find > any library for this > in the the ocaml's hump... > > Best, > Frédéric Gava > > _______________________________________________ > 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 > ____________________________________________________________________________________ Shape Yahoo! in your own image. Join our Network Research Panel today! http://surveylink.yahoo.com/gmrs/yahoo_panel_invite.asp?a=7