- if buri <> current_buri then Some buri else None
- in
- let find path =
- let rec aux = function
- | [] -> close_in (open_in path); path
- | p :: tl ->
- try
- close_in (open_in (p ^ "/" ^ path)); p ^ "/" ^ path
- with Sys_error _ -> aux tl
- in
- let paths = Helm_registry.get_list Helm_registry.string "matita.includes" in
- try
- aux paths
- with Sys_error _ as exc ->
- HLog.error ("Unable to read " ^ path);
- HLog.error ("opts.include_paths was " ^ String.concat ":" paths);
- raise exc
- in