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=0.0 required=5.0 tests=AWL autolearn=disabled version=3.1.3 X-Original-To: caml-list@yquem.inria.fr Delivered-To: caml-list@yquem.inria.fr Received: from mail1-relais-roc.national.inria.fr (mail1-relais-roc.national.inria.fr [192.134.164.82]) by yquem.inria.fr (Postfix) with ESMTP id 59A00BB84 for ; Fri, 20 Jun 2008 18:26:23 +0200 (CEST) X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: ApoEAPh2W0hQRFuw/2dsb2JhbACvcw X-IronPort-AV: E=Sophos;i="4.27,680,1204498800"; d="scan'208";a="14182724" Received: from concorde.inria.fr ([192.93.2.39]) by mail1-smtp-roc.national.inria.fr with ESMTP; 20 Jun 2008 18:26:23 +0200 Received: from mail1-relais-roc.national.inria.fr (mail1-relais-roc.national.inria.fr [192.134.164.82]) by concorde.inria.fr (8.13.6/8.13.6) with ESMTP id m5KGQKUW004715 (version=TLSv1/SSLv3 cipher=RC4-SHA bits=128 verify=OK) for ; Fri, 20 Jun 2008 18:26:23 +0200 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: ApoEAPh2W0hQRFuw/2dsb2JhbACvcw X-IronPort-AV: E=Sophos;i="4.27,680,1204498800"; d="scan'208";a="14182723" Received: from furbychan.cocan.org ([80.68.91.176]) by mail1-smtp-roc.national.inria.fr with ESMTP; 20 Jun 2008 18:26:20 +0200 Received: from rich by furbychan.cocan.org with local (Exim 4.63) (envelope-from ) id 1K9jRJ-0001H4-VB; Fri, 20 Jun 2008 17:26:18 +0100 Date: Fri, 20 Jun 2008 17:26:17 +0100 To: Jeremy Yallop Cc: Nathaniel Gray , caml-list@inria.fr Subject: Re: [Caml-list] ANN: patterns v0.4 Message-ID: <20080620162617.GA4530@annexia.org> References: <48579E13.8070706@ed.ac.uk> <4858338B.3020103@ed.ac.uk> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <4858338B.3020103@ed.ac.uk> User-Agent: Mutt/1.5.13 (2006-08-11) From: Richard Jones X-Miltered: at concorde with ID 485BDA2C.000 by Joe's j-chkmail (http://j-chkmail . ensmp . fr)! X-Spam: no; 0.00; 0100,:01 ocaml:01 camlp:01 camlp:01 -like:01 icfp:01 variants:01 ocaml:01 0.4:98 polymorphic:01 wrote:01 wrote:01 caml-list:01 jambon:01 seems:03 On Tue, Jun 17, 2008 at 10:58:35PM +0100, Jeremy Yallop wrote: > Nathaniel Gray wrote: > >On Tue, Jun 17, 2008 at 4:20 AM, Jeremy Yallop > >wrote: > >>I'm pleased to announce a new release of `patterns', an OCaml > >>framework for writing extensions to pattern matching using Camlp4. > > > >Ooh, very interesting! Have you looked at "active patterns" in F#? > >They look really useful and I've been wanting to code them up in > >camlp4 for a while now but haven't had the time. It sounds like your > >framework could make that much easier. > > Yes, one of the reason for writing the framework was to be able to > implement F#-like active patterns. I think it should be reasonably > straightforward to do -- in fact, I'd expect design considerations to > take up more time than actual implementation work (although I say that > from the perspective of being already familiar with the "patterns" > framework, of course). If I remember rightly, there's a note at the end > of the ICFP07 active patterns paper about using polymorphic variants to > add active patterns in OCaml, which seems like it might be a good > starting point. Can someone summarise active patterns for us? The MSDN site containing the paper is down at the moment. > You might also be interested in the "views" feature of Martin Jambon's > "Micmatch", which is along the same lines as active patterns: > > http://martin.jambon.free.fr/micmatch-manual.html#htoc10 Is anyone working on upgrading micmatch to 3.10? Rich. -- Richard Jones Red Hat