-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathsigmatch.mli
68 lines (57 loc) · 1.45 KB
/
sigmatch.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
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
(** The heart of OCamlOScope, the match algorithm *)
open Outcometree
module PathLimit : sig
type desc =
| Apply of desc
| Dot of desc * string
| Ident of string
| IdentMod of string
| ModIdent of string
| No
end
module Make(A : sig
val cache : Levenshtein.StringWithHashtbl.cache
end) : sig
val match_name_levenshtein : string -> string -> int -> int option
val match_name_substring : string -> string -> int -> int option
val match_name : string -> string -> int -> int option
(** Currently it is equal to [match_name_levenshtein] *)
val match_package : string -> string list -> int -> int option
val match_path_type :
out_ident * out_type ->
out_ident * out_type ->
int ->
int ->
(int
* (PathLimit.desc
* ([> `Arrow of 'b * 'b list
| `Constr of [> `None
| `Path of PathLimit.desc ] * 'b list
| `None
| `Tuple of 'b list
| `Var of out_type ]
as 'b)
)
) option
val match_type :
out_type ->
out_type ->
int ->
(int
* ([> `Arrow of 'a * 'a list
| `Constr of
[> `None
| `Path of PathLimit.desc ] * 'a list
| `None
| `Tuple of 'a list
| `Var of out_type ]
as 'a)
) option
val match_path :
out_ident ->
out_ident ->
int ->
(int
* PathLimit.desc
) option
end