]> matita.cs.unibo.it Git - helm.git/blobdiff - helm/software/components/content_pres/termContentPres.ml
allowed sort elim now check for recursive types
[helm.git] / helm / software / components / content_pres / termContentPres.ml
index 3ee9e7fe9f90d266d4ba4e158684e0bda3a50634..bffd189761651095760df44d24edaee55633716f 100644 (file)
@@ -319,7 +319,11 @@ let instantiate21 idrefs env l1 =
         assert (CicNotationEnv.well_typed ty value); (* INVARIANT *)
         (* following assertion should be a conditional that makes this
          * instantiation fail *)
-        assert (CicNotationEnv.well_typed expected_ty value);
+        if not (CicNotationEnv.well_typed expected_ty value) then
+         begin
+          prerr_endline ("The variable " ^ name ^ " is used with the wrong type in the notation declaration");
+          assert false
+         end;
         let value = CicNotationEnv.term_of_value value in
         let value = 
           match expected_ty with