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 VAA16274; Wed, 3 Apr 2002 21:43:16 +0200 (MET DST) Received: (from weis@localhost) by pauillac.inria.fr (8.7.6/8.7.3) id VAA12840 for caml-list@pauillac.inria.fr; Wed, 3 Apr 2002 21:43:16 +0200 (MET DST) 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 PAA27420 for ; Wed, 3 Apr 2002 15:01:01 +0200 (MET DST) Received: from tema.sit (host-81.uni.net.ua [213.169.83.81]) by concorde.inria.fr (8.11.1/8.11.1) with ESMTP id g33D0uD00498 for ; Wed, 3 Apr 2002 15:00:57 +0200 (MET DST) Received: (from tema@localhost) by tema.sit (8.9.3/8.9.3) id QAA03631 for caml-list@inria.fr; Wed, 3 Apr 2002 16:00:56 +0300 X-Authentication-Warning: tema.sit: tema set sender to tema@sit.kiev.ua using -f Date: Wed, 3 Apr 2002 16:00:56 +0300 From: Artem Prisyaznuk To: caml-list@inria.fr Subject: [Caml-list] Typing trouble with PXP Message-ID: <20020403130056.GA3524@sit.kiev.ua> Mime-Version: 1.0 Content-Type: text/plain; charset=koi8-r Content-Disposition: inline User-Agent: Mutt/1.3.28i X-Operating-System: Linux tema 2.2.14-5.0 X-Uptime: 3:45pm up 19:46, 0 users, load average: 0.09, 0.06, 0.01 Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk The problem is summarized in the following code: open Pxp_yacc;; let rec foo_fun node= node#write (`Out_channel stderr) `Enc_koi8r;; let _ = let doc = parse_wfdocument_entity default_config (from_file "my.xml") default_spec in let root = doc#root in begin root#write (`Out_channel stderr) `Enc_koi8r; foo_fun root end;; This example doesn't compile and the compiler error message is: File "tmp.ml", line 10, characters 11-15: This expression has type (('a Pxp_document.node as 'b) Pxp_document.extension as 'a) Pxp_document.node = < add_node : ?force:bool -> 'b -> unit; ........skip........ write : ?prefixes:string list -> ?default:string -> Pxp_types.output_stream -> Pxp_types.encoding -> unit > but is here used with type < add_node : ?force:bool -> 'b -> unit; ..........skip............. write : [> `Out_channel of out_channel] -> [> `Enc_koi8r] -> 'c > -- Best regards Artem Prisyaznuk tema@sit.kiev.ua ------------------- 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