Commit 514caae1 authored by Bruno Guillaume's avatar Bruno Guillaume

version 0.41.1: adapt to new libraries versions

parent 0fdb1ba5
......@@ -38,7 +38,7 @@ module P_graph = struct
let find = Pid_map.find
let pid_list t = Pid_map.fold (fun pid _ acc -> pid::acc) t []
let pid_name_list t = Pid_map.fold (fun _ node acc -> (P_node.get_name node)::acc) t []
(* -------------------------------------------------------------------------------- *)
let map_add_edge map id_src label id_tar =
......@@ -368,7 +368,7 @@ module G_graph = struct
let sorted_lines = Conll.root :: (List.sort Conll.compare conll.Conll.lines) in
let gtable = (Array.of_list (List.map (fun line -> line.Conll.id) sorted_lines), Conll.dot_of_id) in
let gtable = (Array.of_list (List.map (fun line -> line.Conll.id) sorted_lines), Conll.Id.to_dot) in
let rec loop index prec = function
| [] -> Gid_map.empty
......
......@@ -49,7 +49,7 @@ module P_graph: sig
val roots: t -> Pid.t list
val pid_list: t -> Pid.t list
val pid_name_list: t -> Id.name list
type extension = {
ext_map: P_node.t Pid_map.t; (* node description for new nodes and for edge "Old -> New" *)
......
......@@ -258,7 +258,7 @@ module Rule = struct
(* a [pattern] is described by the positive basic and a list of negative basics. *)
type pattern = basic * basic list
let pid_list (pos,_) = P_graph.pid_list pos.graph
let pid_name_list (pos,_) = P_graph.pid_name_list pos.graph
type t = {
name: string;
......
......@@ -104,7 +104,7 @@ module Rule : sig
type matching
type pattern
val pid_list: pattern -> Pid.t list
val pid_name_list: pattern -> Id.name list
val to_python: pattern -> G_graph.t -> matching -> string
......
......@@ -43,7 +43,7 @@ let handle ?(name="") ?(file="No file defined") fct () =
| Grew_base.Error.Build (msg, None) -> raise (Error (sprintf "%s" msg))
| Grew_base.Error.Run (msg, Some loc) -> raise (Error (sprintf "%s %s" (Grew_base.Loc.to_string loc) msg))
| Grew_base.Error.Run (msg, None) -> raise (Error (sprintf "%s" msg))
| Conll.Error msg -> raise (Error (sprintf "Conll error: %s" msg))
| Conll_types.Error msg -> raise (Error (sprintf "Conll error: %s" msg))
| Grew_base.Error.Bug (msg, Some loc) -> raise (Bug (sprintf "%s %s" (Grew_base.Loc.to_string loc) msg))
| Grew_base.Error.Bug (msg, None) -> raise (Bug (sprintf "%s" msg))
......@@ -85,9 +85,9 @@ module Pattern = struct
let parse ?domain desc =
handle ~name:"Pattern.load" (fun () -> Grew_rule.Rule.build_pattern ?domain (Grew_loader.Parser.pattern desc)) ()
let pid_list pattern =
let pid_name_list pattern =
handle ~name:"Pattern.pid_lits"
(fun () -> List.map (fun x -> Grew_types.Pid.to_string x) (Grew_rule.Rule.pid_list pattern)
(fun () -> List.map (fun x -> x) (Grew_rule.Rule.pid_name_list pattern)
) ()
end
......
......@@ -40,7 +40,7 @@ module Pattern : sig
(** [load_pattern domain description] returns the pattern described in the [descriprion] string *)
val parse: ?domain:Domain.t -> string -> t
val pid_list: t -> string list
val pid_name_list: t -> string list
end
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment