From: Claudio Sacerdoti Coen Date: Sat, 20 Jan 2007 15:16:55 +0000 (+0000) Subject: An "assert false" used to be raised when matitac was started on an empty file. X-Git-Tag: 0.4.95@7852~657 X-Git-Url: http://matita.cs.unibo.it/gitweb/?a=commitdiff_plain;h=1716dfe9afab861ad742a434e83e3bcad259dec4;p=helm.git An "assert false" used to be raised when matitac was started on an empty file. --- diff --git a/matita/matitacLib.ml b/matita/matitacLib.ml index cb3b2d1c8..ba9af1302 100644 --- a/matita/matitacLib.ml +++ b/matita/matitacLib.ml @@ -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