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