man-pages/man3/Build_path_prefix_map.3o.html
2021-03-31 01:06:50 +01:00

211 lines
2.4 KiB
HTML

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<HTML><HEAD><TITLE>Man page of Build_path_prefix_map</TITLE>
</HEAD><BODY>
<H1>Build_path_prefix_map</H1>
Section: OCaml library (3o)<BR>Updated: 2020-01-30<BR><A HREF="#index">Index</A>
<A HREF="/cgi-bin/man/man2html">Return to Main Contents</A><HR>
<A NAME="lbAB">&nbsp;</A>
<H2>NAME</H2>
Build_path_prefix_map - Rewrite paths for reproducible builds
<A NAME="lbAC">&nbsp;</A>
<H2>Module</H2>
Module Build_path_prefix_map
<A NAME="lbAD">&nbsp;</A>
<H2>Documentation</H2>
<P>
Module
<B>Build_path_prefix_map</B>
<BR>&nbsp;:&nbsp;
<B>sig end</B>
<P>
<P>
Rewrite paths for reproducible builds
<P>
Warning: this module is unstable and part of
<B>Compiler_libs</B>
.
<P>
<P>
<P>
<P>
<P>
<I>type path </I>
=
<B>string</B>
<P>
<P>
<P>
<P>
<I>type path_prefix </I>
=
<B>string</B>
<P>
<P>
<P>
<P>
<I>type error_message </I>
=
<B>string</B>
<P>
<P>
<P>
<P>
<P>
<I>val encode_prefix </I>
:
<B>path_prefix -&gt; string</B>
<P>
<P>
<P>
<P>
<I>val decode_prefix </I>
:
<B>string -&gt;</B>
<B>(path_prefix, error_message)</B>
<B>result</B>
<P>
<P>
<P>
<I>type pair </I>
= {
<BR>&nbsp;target&nbsp;:&nbsp;
<B>path_prefix</B>
;
<BR>&nbsp;source&nbsp;:&nbsp;
<B>path_prefix</B>
;
<BR>&nbsp;}
<P>
<P>
<P>
<P>
<P>
<I>val encode_pair </I>
:
<B>pair -&gt; string</B>
<P>
<P>
<P>
<P>
<I>val decode_pair </I>
:
<B>string -&gt;</B>
<B>(pair, error_message)</B>
<B>result</B>
<P>
<P>
<P>
<I>type map </I>
=
<B>pair option list</B>
<P>
<P>
<P>
<P>
<P>
<I>val encode_map </I>
:
<B>map -&gt; string</B>
<P>
<P>
<P>
<P>
<I>val decode_map </I>
:
<B>string -&gt;</B>
<B>(map, error_message)</B>
<B>result</B>
<P>
<P>
<P>
<P>
<I>val rewrite_opt </I>
:
<B>map -&gt;</B>
<B>path -&gt; path option</B>
<P>
<P>
<B>rewrite_opt map path</B>
tries to find a source in
<B>map</B>
that is a prefix of the input
<B>path</B>
. If it succeeds,
it replaces this prefix with the corresponding target.
If it fails, it just returns
<B>None</B>
.
<P>
<P>
<P>
<I>val rewrite </I>
:
<B>map -&gt;</B>
<B>path -&gt; path</B>
<P>
<P>
<P>
<P>
<HR>
<A NAME="index">&nbsp;</A><H2>Index</H2>
<DL>
<DT id="1"><A HREF="#lbAB">NAME</A><DD>
<DT id="2"><A HREF="#lbAC">Module</A><DD>
<DT id="3"><A HREF="#lbAD">Documentation</A><DD>
</DL>
<HR>
This document was created by
<A HREF="/cgi-bin/man/man2html">man2html</A>,
using the manual pages.<BR>
Time: 00:05:37 GMT, March 31, 2021
</BODY>
</HTML>