let compare v v' =
    let k = !v.kind in
    let k' = !v'.kind in
    Extlib.compare_basic (node_type_id k) (node_type_id k')