1Build_path_prefix_map(3) OCaml library Build_path_prefix_map(3)
2
3
4
6 Build_path_prefix_map - no description
7
9 Module Build_path_prefix_map
10
12 Module Build_path_prefix_map
13 : sig end
14
15
16
17
18
19
20
21 type path = string
22
23
24
25
26 type path_prefix = string
27
28
29
30
31 type error_message = string
32
33
34
35
36
37 val encode_prefix : path_prefix -> string
38
39
40
41
42 val decode_prefix : string -> (path_prefix, error_message) Perva‐
43 sives.result
44
45
46
47 type pair = {
48 target : path_prefix ;
49 source : path_prefix ;
50 }
51
52
53
54
55
56 val encode_pair : pair -> string
57
58
59
60
61 val decode_pair : string -> (pair, error_message) Pervasives.result
62
63
64
65 type map = pair option list
66
67
68
69
70
71 val encode_map : map -> string
72
73
74
75
76 val decode_map : string -> (map, error_message) Pervasives.result
77
78
79
80
81 val rewrite_opt : map -> path -> path option
82
83
84 rewrite_opt map path tries to find a source in map that is a prefix of
85 the input path . If it succeeds, it replaces this prefix with the cor‐
86 responding target. If it fails, it just returns None .
87
88
89
90 val rewrite : map -> path -> path
91
92
93
94
95
96
97OCamldoc 2019-02-02 Build_path_prefix_map(3)