X-Git-Url: http://matita.cs.unibo.it/gitweb/?a=blobdiff_plain;f=matita%2Fcomponents%2Fng_kernel%2FnCicEnvironment.ml;h=991a88f6406a120b9066d9c28e062ce7ff1aa13b;hb=d51f9674886d1e609a6ea792b65871dcde4f6503;hp=c7389f16761b4d64579a9a3afb013378b3f790e7;hpb=894d518aa760c9f816ddb0dc2b3fa88e1fe20a94;p=helm.git diff --git a/matita/components/ng_kernel/nCicEnvironment.ml b/matita/components/ng_kernel/nCicEnvironment.ml index c7389f167..991a88f64 100644 --- a/matita/components/ng_kernel/nCicEnvironment.ml +++ b/matita/components/ng_kernel/nCicEnvironment.ml @@ -155,11 +155,11 @@ let typeof_sort = function | C.Prop -> (C.Type []) ;; -let add_lt_constraint a b = +let add_lt_constraint ~acyclic a b = match a,b with | [`Type,a2],[`Type,b2] -> if not (lt_path_uri [] a2 b2) then ( - if lt_path_uri [] b2 a2 || NUri.eq a2 b2 then + if acyclic && (lt_path_uri [] b2 a2 || NUri.eq a2 b2) then (raise(BadConstraint(lazy("universe inconsistency adding "^ pp_constraint a2 b2 ^ " to:\n" ^ pp_constraints ())))); @@ -331,12 +331,14 @@ let check_and_add_obj (status:#NCic.status) ((u,_,_,_,_) as obj) = | e -> frozen_list := saved_frozen_list; let exn = `Exn e in - NUri.UriHash.add cache u exn; history := (`Obj (u,obj))::!history; if saved_frozen_list = [] then exn else - raise (Propagate (u,e)) + begin + NUri.UriHash.add cache u exn; + raise (Propagate (u,e)) + end ;; let get_checked_obj status u =