From mboxrd@z Thu Jan 1 00:00:00 1970 Received: (from majordomo@localhost) by pauillac.inria.fr (8.7.6/8.7.3) id NAA22756; Sun, 27 Jun 2004 13:40:14 +0200 (MET DST) X-Authentication-Warning: pauillac.inria.fr: majordomo set sender to owner-caml-list@pauillac.inria.fr using -f Received: from concorde.inria.fr (concorde.inria.fr [192.93.2.39]) by pauillac.inria.fr (8.7.6/8.7.3) with ESMTP id NAA22114 for ; Sun, 27 Jun 2004 13:40:13 +0200 (MET DST) Received: from nexus.stwing.upenn.edu (NEXUS.STWING.UPENN.EDU [165.123.132.61]) by concorde.inria.fr (8.12.10/8.12.10) with ESMTP id i5RBeBSH004238 for ; Sun, 27 Jun 2004 13:40:12 +0200 Received: from force.stwing.upenn.edu (force.stwing.upenn.edu [165.123.132.65]) by nexus.stwing.upenn.edu (8.12.10/8.12.9) with ESMTP id i5RBeAfn019652 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=FAIL) for ; Sun, 27 Jun 2004 07:40:10 -0400 (EDT) Received: from force.stwing.upenn.edu (localhost [127.0.0.1]) by force.stwing.upenn.edu (8.12.10/8.12.9) with ESMTP id i5RBe9hs016966 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for ; Sun, 27 Jun 2004 07:40:10 -0400 (EDT) Received: (from wlovas@localhost) by force.stwing.upenn.edu (8.12.10/8.12.9/Submit) id i5RBe9Dg016965 for caml-list@inria.fr; Sun, 27 Jun 2004 07:40:09 -0400 (EDT) Date: Sun, 27 Jun 2004 07:40:09 -0400 From: William Lovas To: caml-list@inria.fr Subject: Re: [Caml-list] Pattern matching over elements at the front of a container Message-ID: <20040627114008.GA16927@force.stwing.upenn.edu> Mail-Followup-To: caml-list@inria.fr References: <200406261215.26971.postmaster@jdh30.plus.com> <20040627101124.GA29390@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20040627101124.GA29390@redhat.com> User-Agent: Mutt/1.5.4i X-Miltered: at concorde with ID 40DEB21B.000 by Joe's j-chkmail (http://j-chkmail.ensmp.fr)! X-Loop: caml-list@inria.fr X-Spam: no; 0.00; lovas:01 wlovas:01 stwing:01 caml-list:01 2004:99 generic:01 ad-hoc:01 haskell:01 match:02 match:02 o'caml:02 wrote:03 types:03 data:03 defining:04 Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk On Sun, Jun 27, 2004 at 11:11:24AM +0100, Richard Jones wrote: > > Also, being able to pattern match on substrings would be useful, if a > notation could be introduced for it. Something like: > > match str with > "prefix" ^ str -> ... It seems like all of these requests are really just asking for a generic method for defining different ways of pattern matching data types. After hearing about why `eqtype' isn't right for O'Caml, i'd doubt any of these ad-hoc pattern matching transformations would be either -- support for a mechanism like views [1] would be better. Which probably means "not anytime soon" :) cheers, William [1] http://www.haskell.org/development/views.html ------------------- To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/ Beginner's list: http://groups.yahoo.com/group/ocaml_beginners