-let string_of_domain_item = function
- | Id s -> Printf.sprintf "ID(%s)" s
- | Symbol (s, i) -> Printf.sprintf "SYMBOL(%s,%d)" s i
- | Num i -> Printf.sprintf "NUM(instance %d)" i
+(*
+let string_of_domain_item item =
+ let f_opt f x default =
+ match x with
+ | None -> default
+ | Some y -> f y
+ in
+ match item with
+ | Id (s,huri) ->
+ Printf.sprintf "ID(%s,%s)" s (f_opt (fun x -> x) huri "_")
+ | Symbol (s,None) -> Printf.sprintf "SYMBOL(%s)" s
+ | Symbol (s,Some (_,dsc)) -> Printf.sprintf "SYMBOL(%s,%s)" s dsc
+ | Num _ -> "NUM"
+;;
+*)
+let string_of_domain_item item =
+ let f_opt f x default =
+ match x with
+ | None -> default
+ | Some y -> f y
+ in
+ match item with
+ | Id s ->
+ Printf.sprintf "ID(%s)" s
+ | Symbol s -> Printf.sprintf "SYMBOL(%s)" s
+ | Num -> "NUM"
+;;