package merlin-lib
Install
dune-project
Dependency
Authors
Maintainers
Sources
sha256=5642cde8486a84aad98fa5c590b70e8dcc6074d7fbdb3b9b8c46b2c5b42f653b
sha512=1d7a7751157e393d3ae248ef5ae24a6b4e81430666c61cc51a3d0ec35804523317036f3d7a3c7f18a7554337f4e5f5989fb677865b261ece3fd2b317903570ba
doc/merlin-lib.ocaml_utils/Ocaml_utils/Build_path_prefix_map/index.html
Module Ocaml_utils.Build_path_prefix_mapSource
Rewrite paths for reproducible builds
Warning: this module is unstable and part of compiler-libs.
See the BUILD_PATH_PREFIX_MAP spec
rewrite_first map path tries to find a source in map that is a prefix of the input path. If it succeeds, it replaces this prefix with the corresponding target. If it fails, it just returns None.
rewrite_all map path finds all sources in map that are a prefix of the input path. For each matching source, in priority order, it replaces this prefix with the corresponding target and adds the result to the returned list. If there are no matches, it just returns [].
rewrite path uses rewrite_first to try to find a mapping for path. If found, it returns that, otherwise it just returns path.
invert_all map path finds all targets in map that are a prefix of the input path. For each matching target, in priority order, it replaces this prefix with the corresponding source and adds the result to the returned list. If there are no matches, it just returns [].