From: Stefano Zacchiroli Date: Fri, 21 Jan 2005 09:20:58 +0000 (+0000) Subject: - added attributes support X-Git-Tag: V_0_1_0~111 X-Git-Url: http://matita.cs.unibo.it/gitweb/?a=commitdiff_plain;h=8c578ae2acfb32b39610aebbd4baab3a31775a9f;p=helm.git - added attributes support - uses string_of_sort from CicPp --- diff --git a/helm/ocaml/cic_proof_checking/cicElim.ml b/helm/ocaml/cic_proof_checking/cicElim.ml index d87d7eb4f..b85a4a519 100644 --- a/helm/ocaml/cic_proof_checking/cicElim.ml +++ b/helm/ocaml/cic_proof_checking/cicElim.ml @@ -193,12 +193,6 @@ function Cic.Lambda (fresh_binder true, CicSubstitution.lift_from (rightno + 1) liftno indty, case) -let string_of_sort = function - | Cic.Prop -> "Prop" - | Cic.CProp -> "CProp" - | Cic.Set -> "Set" - | Cic.Type _ -> "Type" - let rec branch (uri, typeno) insource paramsno t fix head args = match t with | Cic.MutInd (uri', typeno', []) when @@ -249,7 +243,7 @@ let branch (uri, typeno) insource liftno paramsno t fix head args = let elim_of ?(sort = Cic.Type (CicUniv.fresh ())) uri typeno = let (obj, univ) = (CicEnvironment.get_obj CicUniv.empty_ugraph uri) in match obj with - | Cic.InductiveDefinition (indTypes, params, leftno) -> + | Cic.InductiveDefinition (indTypes, params, leftno, _) -> let (name, inductive, ty, constructors) = try List.nth indTypes typeno @@ -368,6 +362,9 @@ prerr_endline (CicPp.ppterm eliminator_body); | _ -> assert false in let name = UriManager.name_of_uri uri ^ suffix in - Cic.Constant (name, Some eliminator_body, eliminator_type, []) - | _ -> assert false + let obj_attrs = [`Class (`Elim sort); `Generated] in + Cic.Constant (name, Some eliminator_body, eliminator_type, [], obj_attrs) + | _ -> + failwith (sprintf "not an inductive definition (%s)" + (UriManager.string_of_uri uri))