]> matita.cs.unibo.it Git - helm.git/blobdiff - helm/ocaml/cic/cicParser.ml
New experimental commit: metavariables representation is changed again,
[helm.git] / helm / ocaml / cic / cicParser.ml
index f0d3e800fe11f84a44944119866c8374c393e142..241a5c1752caafe0af217271dd654545e31f4136 100644 (file)
@@ -46,7 +46,7 @@ class warner =
   end
 ;;
 
-exception EmptyUri;;
+exception EmptyUri of string;;
 
 (* given an uri u it returns the list of tokens of the base uri of u *)
 (* e.g.: token_of_uri "cic:/a/b/c/d.xml" returns ["a" ; "b" ; "c"]   *)
@@ -54,7 +54,8 @@ let tokens_of_uri uri =
  let uri' = UriManager.string_of_uri uri in
  let rec chop_list =
   function
-     [] -> raise EmptyUri
+     [] -> raise (EmptyUri uri')
+   | [fn] -> []
    | he::[fn] -> [he]
    | he::tl -> he::(chop_list tl)
  in