The implementation libvirt.ml does not match the interface libvirt.cmi:
Values do not match:
val get_domains :
(_[> `R ] as 'a) Connect.t ->
?want_info:bool ->
Domain.list_flag list -> 'a Domain.t list * Domain.info list
is not included in
val get_domains :
([> `R ] as 'a) Connect.t ->
?want_info:bool ->
Domain.list_flag list -> 'a Domain.t list * Domain.info list
This syntax doesn't appear to be documented in the manual (unless it's
related to '_a). What does it mean?
I can supply some reproducer code if needed, but the code is rather
long at the moment.
Rich.
--
Richard Jones
Red Hat
_______________________________________________
Caml-list mailing list. Subscription management:
http://yquem.inria.fr/cgi-bin/mailman/listinfo/caml-list
Archives: http://caml.inria.fr
Beginner's list: http://groups.yahoo.com/group/ocaml_beginners
Bug reports: http://caml.inria.fr/bin/caml-bugs
It is a weak type as you guessed. To convince you of that, here is
some code:
# let x = ref `X;;
val x : _[> `X ] ref = {contents = `X}
Cheers,
C.
Here is the crux of your problem
let f = let a = ref 0 in fun (x : [> `R ]) -> x;;
If you hoist [let have_list_all_domains = ref None] outside [let
get_domains], then it works fine. The type checker could certainly be
slightly improved [1] there but I do not know how difficult it is.
C.
---
[1] And maybe also the compiler: a rough check seem to indicate that
hiding the variable in the definition of f is slightly slower.