* http://helm.cs.unibo.it/
*)
+exception FileNotFound of string
exception NoRootFor of string
let absolutize path =
HLog.error ("We are in: " ^ Sys.getcwd ());
HLog.error ("Unable to find: "^file^"\nPaths explored:");
List.iter (fun x -> HLog.error (" - "^x)) include_paths;
- raise (NoRootFor file)
+ raise (FileNotFound file)
in
let path = find_path_for file in
let path = absolutize path in
let mk_baseuri root extra =
let chop name =
+(* FG: there is no reason why matita should edit just matita files
+ matita's editor is good on its own and has interesting facilities
+ including predefined virtuals
assert(Filename.check_suffix name ".ma" ||
Filename.check_suffix name ".mma");
+*)
try Filename.chop_extension name
with Invalid_argument "Filename.chop_extension" -> name
in
match l1, l2 with
| h1::tl1,h2::tl2 when h1 = h2 -> substract tl1 tl2
| l,[] -> l
- | _ -> raise (NoRootFor (file ^" "^path^" "^root))
+ | _ -> assert false
in
let extra_buri = substract lpath lroot in
let extra = String.concat "/" extra_buri in