forked from camlspotter/ocamloscope
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmatch.mli
50 lines (38 loc) · 1.42 KB
/
match.mli
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
module Make(A : sig
val cache : Levenshtein.StringWithHashtbl.cache
end) : sig
val error : bool ref (* for debug CR jfuruse: very dirty!*)
val match_path_type :
Spath.t * Stype.t
-> Spath.t * Stype.t
-> int (** limit for path and type *)
-> (int * (Spath.t * Stype.t)) option
(** Returns distance, not score *)
val match_type : (* ?no_target_type_instantiate:bool -> *) Stype.t -> Stype.t -> int -> (int * Stype.t) option
(** Returns distance, not score *)
val match_path : Spath.t -> Spath.t -> int -> (int * Spath.t) option
(** Returns distance, not score *)
val report_prof_type : unit -> unit
end
module MakePooled(A : sig
val cache : Levenshtein.StringWithHashtbl.cache
val pooled_types : Stype.t array
end) : sig
val error : bool ref (* for debug CR jfuruse: very dirty!*)
val match_path : Spath.t -> Spath.t -> int -> (int * Spath.t) option
(** Returns distance, not score *)
module WithType(T : sig
val pattern : Stype.t
val cache : [ `NotFoundWith of int | `Exact of int * Stype.t ] array
end) : sig
val match_type : Item.pooled_type -> int -> (int * Stype.t) option
(** Returns distance, not score *)
val match_path_type :
Spath.t
-> Spath.t * Item.pooled_type
-> int (** limit for path and type *)
-> (int * (Spath.t * Stype.t)) option
(** Returns distance, not score *)
end
val report_prof_type : unit -> unit
end