let get_class_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_class_type _ -> true
        | _ -> false)
      l
  with
    [Odoc_info.Search.Res_class_type ct] -> Some ct
  | [] ->
      print_string ("class type "^name^" not found"); print_newline () ;
      None
  | _ ->
      print_string ("class type "^name^" found several times"); print_newline () ;
      None