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 SAA07891; Sun, 4 May 2003 18:10:34 +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 SAA08203 for ; Sun, 4 May 2003 18:10:33 +0200 (MET DST) Received: from smtp.noos.fr (nan-smtp-04.noos.net [212.198.2.73]) by concorde.inria.fr (8.11.1/8.11.1) with ESMTP id h44GAWH23618 for ; Sun, 4 May 2003 18:10:33 +0200 (MET DST) Received: (qmail 18860339 invoked by uid 0); 4 May 2003 16:10:32 -0000 Received: from unknown (HELO noos.fr) ([81.66.86.49]) (envelope-sender ) by 212.198.2.73 (qmail-ldap-1.03) with SMTP for ; 4 May 2003 16:10:32 -0000 Message-ID: <3EB53ABD.9090902@noos.fr> Date: Sun, 04 May 2003 18:07:25 +0200 From: WatchDog User-Agent: Mozilla/5.0 (Windows; U; Win98; fr-FR; rv:0.9.4) Gecko/20011019 Netscape6/6.2 X-Accept-Language: fr-fr MIME-Version: 1.0 To: caml-list@inria.fr Subject: [Caml-list] No patterns of type vect Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-Spam: no; 0.00; failwith:01 vectors:01 arrays:01 dummy:01 camllight:01 match:02 let:04 type:07 vect:07 objective:07 i'm:07 patterns:08 lists:91 function:09 i've:09 Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk 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) ? Thanks. JB, Paris. ------------------- 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