caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: Jacques GARRIGUE <garrigue@kurims.kyoto-u.ac.jp>
To: argentoff@rtelekom.ru
Cc: caml-list@inria.fr
Subject: Re: [Caml-list] pxp question
Date: Mon, 26 Apr 2004 20:44:34 +0900 (JST)	[thread overview]
Message-ID: <20040426.204434.68532662.garrigue@kurims.kyoto-u.ac.jp> (raw)
In-Reply-To: <200404261442.12641.argentoff@rtelekom.ru>

From: Paul Argentoff <argentoff@rtelekom.ru>

> 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


      parent reply	other threads:[~2004-04-26 11:44 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-04-26 10:42 Paul Argentoff
2004-04-26 11:30 ` Gerd Stolpmann
2004-04-26 12:02   ` Paul Argentoff
2004-04-26 11:44 ` Jacques GARRIGUE [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20040426.204434.68532662.garrigue@kurims.kyoto-u.ac.jp \
    --to=garrigue@kurims.kyoto-u.ac.jp \
    --cc=argentoff@rtelekom.ru \
    --cc=caml-list@inria.fr \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).