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 SAA08683; Sun, 4 May 2003 18:25:11 +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 SAA08485 for ; Sun, 4 May 2003 18:25:10 +0200 (MET DST) Received: from opus.davidb.org (66-75-152-1.san.rr.com [66.75.152.1]) by concorde.inria.fr (8.11.1/8.11.1) with ESMTP id h44GP9H24198 for ; Sun, 4 May 2003 18:25:09 +0200 (MET DST) Received: from davidb by opus.davidb.org with local (Exim 3.31 #1 (Debian)) id 19CMIP-0005Fa-00; Sun, 04 May 2003 09:25:01 -0700 Date: Sun, 4 May 2003 09:25:01 -0700 From: David Brown To: WatchDog Cc: caml-list@inria.fr Subject: Re: [Caml-list] No patterns of type vect Message-ID: <20030504162501.GA20150@opus.davidb.org> References: <3EB53ABD.9090902@noos.fr> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <3EB53ABD.9090902@noos.fr> User-Agent: Mutt/1.4i X-Spam: no; 0.00; caml-list:01 failwith:01 vectors:01 arrays:01 dummy:01 caml:01 camllight:01 0200,:01 match:02 dave:03 04,:03 wrote:03 let:04 suspect:05 type:07 Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk On Sun, May 04, 2003 at 06:07:25PM +0200, WatchDog wrote: > Hello ! > I'm using CamlLight 0.74, and I've just noticed it is not possible to > use a pattern-matching with patterns of type vect. > For instance, the dummy function below is not valid : > > let head = function > [||] -> failwith "no_head" > | t -> t.(0) ;; > > OK, I acknowledge that lists would be more suitable for such a function, > but why is it forbidden to match on vectors (or arrays, for the > Objective Camlists) ? It works in objective caml, so I suspect it just hadn't been done yet in CamlLight. Dave ------------------- 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