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.3 required=5.0 tests=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 concorde.inria.fr (concorde.inria.fr [192.93.2.39]) by yquem.inria.fr (Postfix) with ESMTP id C95ECBC69 for ; Sun, 24 Jun 2007 12:21:28 +0200 (CEST) Received: from smtp19.orange.fr (smtp19.orange.fr [80.12.242.17]) by concorde.inria.fr (8.13.6/8.13.6) with ESMTP id l5OALSPb007839 for ; Sun, 24 Jun 2007 12:21:28 +0200 Received: from me-wanadoo.net (localhost [127.0.0.1]) by mwinf1912.orange.fr (SMTP Server) with ESMTP id 53AB21C0008F for ; Sun, 24 Jun 2007 12:21:28 +0200 (CEST) Received: from [192.168.0.50] (ARouen-252-1-98-195.w90-23.abo.wanadoo.fr [90.23.145.195]) by mwinf1912.orange.fr (SMTP Server) with ESMTP id 03AA91C0009B for ; Sun, 24 Jun 2007 12:21:27 +0200 (CEST) X-ME-UUID: 20070624102128150.03AA91C0009B@mwinf1912.orange.fr Message-ID: <467E45AB.4070707@univ-paris12.fr> Date: Sun, 24 Jun 2007 12:21:31 +0200 From: =?UTF-8?B?RnLDqWTDqXJpYyBHYXZh?= Reply-To: gava@univ-paris12.fr Organization: =?UTF-8?B?VW5pdmVyc2l0w6kgZGUgUGFyaXMgMTIsIExBQ0w=?= User-Agent: Thunderbird 1.5.0.9 (X11/20070104) MIME-Version: 1.0 To: caml-list@yquem.inria.fr Subject: Anti-matching References: <20070608083625.GA17210@stirner.roentgeninstitut.de> <20070623210455.GA5526@stirner.roentgeninstitut.de> In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-Miltered: at concorde with ID 467E45A8.003 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 ric:98 12.:98 ric:98 exception:01 caml-list:01 assert:01 match:02 hump:02 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