[
Home
]
[ Index:
by date
|
by threads
]
[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
| Date: | -- (:) |
| From: | Artem Prisyaznuk <tema@s...> |
| Subject: | [Caml-list] Typing trouble with PXP |
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