fix guess_modules

This commit is contained in:
Jeremie Dimino 2017-02-28 15:49:02 +00:00
parent fad2873ad7
commit 0b30f795b2
1 changed files with 4 additions and 3 deletions

View File

@ -1435,11 +1435,12 @@ module Gen(P : Params) = struct
let ml_files, mli_files =
String_set.elements files
|> List.filter_map ~f:(fun fn ->
if Filename.check_suffix fn ".ml" then
match String.lsplit2 fn ~on:'.' with
| Some (_, "ml") ->
Some (Inl fn)
else if Filename.check_suffix fn ".mli" then
| Some (_, "mli") ->
Some (Inr fn)
else
| _ ->
None)
|> List.partition_map ~f:(fun x -> x)
in