Dario Teixeira wrote:
and convert_super_node node = match node with | #nonlink_node_t -> (convert_nonlink_node node :> super_node_t) | #link_node_t -> (convert_link_node node :> super_node_t)
You need to rebind the matched value within the pattern in order to refine the type on the rhs:
and convert_super_node node = match node with | #nonlink_node_t as node -> (convert_nonlink_node node :> super_node_t) | #link_node_t as node -> (convert_link_node node :> super_node_t) Jeremy. _______________________________________________ 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