]> matita.cs.unibo.it Git - helm.git/commitdiff
Refinement of axioms fixed. We did not check that the declared type must be
authorClaudio Sacerdoti Coen <claudio.sacerdoticoen@unibo.it>
Thu, 18 Dec 2008 20:29:33 +0000 (20:29 +0000)
committerClaudio Sacerdoti Coen <claudio.sacerdoticoen@unibo.it>
Thu, 18 Dec 2008 20:29:33 +0000 (20:29 +0000)
a type.

helm/software/components/cic_unification/cicRefine.ml

index 7b26cf6db06e0666c1f92dda0e8f3bd2020bf675..ad4d0106539f9c207a7e91ebba1d7bf1ebe72f5b 100644 (file)
@@ -1976,7 +1976,10 @@ let typecheck metasenv uri obj ~localization_tbl =
      let ty',_,metasenv,ugraph =
       type_of_aux' ~localization_tbl metasenv [] ty ugraph
      in
-      Cic.Constant (name,None,ty',args,attrs),metasenv,ugraph
+      (match CicReduction.whd [] ty' with
+          Cic.Sort _
+        | Cic.Meta _ -> Cic.Constant (name,None,ty',args,attrs),metasenv,ugraph
+        | _ -> raise (RefineFailure (lazy ""))
   | Cic.CurrentProof (name,metasenv',bo,ty,args,attrs) ->
      assert (metasenv' = metasenv);
      (* Here we do not check the metasenv for correctness *)