]> matita.cs.unibo.it Git - helm.git/commitdiff
Raising an error on a bad theorem name.
authorAndrea Asperti <andrea.asperti@unibo.it>
Thu, 7 Jul 2005 13:30:40 +0000 (13:30 +0000)
committerAndrea Asperti <andrea.asperti@unibo.it>
Thu, 7 Jul 2005 13:30:40 +0000 (13:30 +0000)
helm/matita/matitaEngine.ml

index ebcf0538ac75030c6e71e9fffc961d3e5d2ccafd..c204adf06457e91ff897b53130ace40e8f8e600c 100644 (file)
@@ -522,6 +522,9 @@ let eval_command status cmd =
      let metasenv = MatitaMisc.get_proof_metasenv status in
      match obj with
         Cic.CurrentProof (_,metasenv',bo,ty,_,_) ->
+         let name = UriManager.name_of_uri uri in
+        if not(CicPp.check name ty) then
+           MatitaLog.error ("Bad name: "^name);
          assert (metasenv = metasenv');
          let goalno =
           match metasenv' with (goalno,_,_)::_ -> goalno | _ -> assert false in