]> matita.cs.unibo.it Git - helm.git/commitdiff
An "assert false" used to be raised when matitac was started on an empty file.
authorClaudio Sacerdoti Coen <claudio.sacerdoticoen@unibo.it>
Sat, 20 Jan 2007 15:16:55 +0000 (15:16 +0000)
committerClaudio Sacerdoti Coen <claudio.sacerdoticoen@unibo.it>
Sat, 20 Jan 2007 15:16:55 +0000 (15:16 +0000)
matita/matitacLib.ml

index cb3b2d1c8bf8184d71c80ae3c27e6ebd185dce20..ba9af1302402450a390e7f4bb0f7f2b5ae5d6b0d 100644 (file)
@@ -65,14 +65,12 @@ let run_script is eval_function  =
   in
   let matita_debug = Helm_registry.get_bool "matita.debug" in
   try
-   let grafite_status'', lexicon_status'' =
-    match eval_function lexicon_status' grafite_status' is cb with
-       [] -> assert false
-     | (s,None)::_ -> s
-     | (s,Some _)::_ -> raise AttemptToInsertAnAlias
-   in
-    lexicon_status := Some lexicon_status'';
-    grafite_status := Some grafite_status''
+   match eval_function lexicon_status' grafite_status' is cb with
+      [] -> raise End_of_file
+    | ((grafite_status'',lexicon_status''),None)::_ ->
+       lexicon_status := Some lexicon_status'';
+       grafite_status := Some grafite_status''
+    | (s,Some _)::_ -> raise AttemptToInsertAnAlias
   with
   | GrafiteEngine.Drop  
   | End_of_file