Version française
Home     About     Download     Resources     Contact us    

This site is updated infrequently. For up-to-date information, please visit the new OCaml website at

Browse thread
[Caml-list] pxp question
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: -- (:)
From: Jacques GARRIGUE <garrigue@k...>
Subject: Re: [Caml-list] pxp question
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 and forgetting an
argument; it gets a bit of habit to see what can cause an error.

Jacques Garrigue

To unsubscribe, mail Archives:
Bug reports: FAQ:
Beginner's list: