diff options
author | Pierre-Marie Pédrot <pierre-marie.pedrot@inria.fr> | 2015-04-01 10:51:32 +0200 |
---|---|---|
committer | Pierre-Marie Pédrot <pierre-marie.pedrot@inria.fr> | 2015-04-01 16:38:41 +0200 |
commit | 7c41bc9bdc883aacbc015954a89ff13fe9c9c1c0 (patch) | |
tree | 573d4063c5d35fa318178bd9215b0c10a31ff157 /library/libnames.ml | |
parent | 569cf23a28c344fe32bd4e9712a4e2028c350de2 (diff) |
From X Require Y looks for X with absolute path, disregarding -R.
Diffstat (limited to 'library/libnames.ml')
-rw-r--r-- | library/libnames.ml | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/library/libnames.ml b/library/libnames.ml index f2a9d041d..cdaec6a3d 100644 --- a/library/libnames.ml +++ b/library/libnames.ml @@ -32,6 +32,11 @@ let is_dirpath_prefix_of d1 d2 = List.prefix_of Id.equal (List.rev (DirPath.repr d1)) (List.rev (DirPath.repr d2)) +let is_dirpath_suffix_of dir1 dir2 = + let dir1 = DirPath.repr dir1 in + let dir2 = DirPath.repr dir2 in + List.prefix_of Id.equal dir1 dir2 + let chop_dirpath n d = let d1,d2 = List.chop n (List.rev (DirPath.repr d)) in DirPath.make (List.rev d1), DirPath.make (List.rev d2) |