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 NAA11475; Mon, 26 Apr 2004 13:44:46 +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 NAA10227 for ; Mon, 26 Apr 2004 13:44:45 +0200 (MET DST) Received: from kurims.kurims.kyoto-u.ac.jp (kurims.kurims.kyoto-u.ac.jp [130.54.16.1]) by concorde.inria.fr (8.12.10/8.12.10) with ESMTP id i3QBigYM030801 for ; Mon, 26 Apr 2004 13:44:43 +0200 Received: from localhost (suiren.kurims.kyoto-u.ac.jp [130.54.16.25]) by kurims.kurims.kyoto-u.ac.jp (8.9.3p2-20030924/3.7W) with ESMTP id UAA16589; Mon, 26 Apr 2004 20:44:35 +0900 (JST) Date: Mon, 26 Apr 2004 20:44:34 +0900 (JST) Message-Id: <20040426.204434.68532662.garrigue@kurims.kyoto-u.ac.jp> To: argentoff@rtelekom.ru Cc: caml-list@inria.fr Subject: Re: [Caml-list] pxp question From: Jacques GARRIGUE In-Reply-To: <200404261442.12641.argentoff@rtelekom.ru> References: <200404261442.12641.argentoff@rtelekom.ru> X-Mailer: Mew version 4.0.64 on Emacs 21.2 / Mule 5.0 (SAKAKI) Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Miltered: at = by Joe's j-chkmail ("http://j-chkmail.ensmp.fr")! X-Loop: caml-list@inria.fr X-Spam: no; 0.00; caml-list:01 pxp:01 jacques:01 pxp:01 passing:01 habit:01 jacques:01 garrigue:01 garrigue:01 node:02 node:02 compile:02 collector:02 novice:03 argument:03 Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk From: Paul Argentoff > I'm a novice in pxp, so here is one of my firs problems: when I compile this: > ... > let collector = find ~deeply:true (fun node -> node # id_attribute_value = > colr_name) collectors > ... > I get: > > This expression has type > ('a Pxp_document.node #Pxp_document.extension as 'a) Pxp_document.node -> > 'a Pxp_document.node > but is here used with type > ('b Pxp_document.node #Pxp_document.extension as 'b) Pxp_document.node = [...] I am no expert in PXP, but this error message simply tells you that you are passing a function where a node is expected (unfortunately you didn't show the position highlighted by the error). Looking at the type of find in the PXP manual, it looks like your "collectors" is a function. This kind of thing can happen when using let...in and forgetting an argument; it gets a bit of habit to see what can cause an error. Jacques Garrigue ------------------- 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