let get_module_type doc_modules name =
let l = Odoc_info.Search.search_by_name
doc_modules
(Str.regexp ("^"^(Str.quote name)^"$"))
in
match
List.filter
(fun e ->
match e with
Odoc_info.Search.Res_module_type _ -> true
| _ -> false)
l
with
[Odoc_info.Search.Res_module_type m] -> Some m
| [] ->
(* print_string ("module type "^name^" not found"); print_newline () ;*)
None
| _ ->
(* print_string ("module type "^name^" found several times"); print_newline () ;*)
None