-let deps = Hashtbl.create (Array.length Sys.argv)
-let baseuri = ref []
-let aliases = Hashtbl.create (Array.length Sys.argv)
-
-(*
-let uri_of_alias = function
- | Ident_alias (_, uri)
- | Symbol_alias (_, _, uri)
- | Number_alias (_, uri) -> uri
-*)
-
-let buri alias =
- U.buri_of_uri (U.uri_of_string alias)
-
-let resolve alias =
- try
- Some (snd(List.find (fun (u, f) -> u = (buri alias)) !baseuri))
- with
- | Not_found -> None
-
- (*** TODO MANCANO LE URI VERBATIM DENTRO GLI AST DEI TERMINI ****)
-
-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 = !paths_to_search_in in
- try
- aux paths
- with Sys_error _ as exc ->
- MatitaLog.error ("Unable to read " ^ path);
- MatitaLog.error ("opts.include_paths was " ^ String.concat ":" paths);
- raise exc
-;;
-