X-Git-Url: http://matita.cs.unibo.it/gitweb/?a=blobdiff_plain;f=components%2Ftactics%2Funiverse.ml;h=c8d370f04ff8807f08cbf2afd6a12459bd42af63;hb=ff07bee00bbf349b3b8240f3e1158f622a27363a;hp=40c3c1abdbb560ed2b5c20586aeca44d520509bf;hpb=1997c9713a0f75ec65803cc8132223142df98204;p=helm.git diff --git a/components/tactics/universe.ml b/components/tactics/universe.ml index 40c3c1abd..c8d370f04 100644 --- a/components/tactics/universe.ml +++ b/components/tactics/universe.ml @@ -44,20 +44,36 @@ let rec unfold context = function Cic.Prod(name,s,t') | t -> ProofEngineReduction.unfold context t -let rec collapse_head_metas = function - | Cic.Appl(a::l) -> - let a' = collapse_head_metas a in - (match a' with - | Cic.Meta(n,m) -> Cic.Meta(n,m) - | t -> - let l' = List.map collapse_head_metas l in - Cic.Appl(t::l')) - | t -> t +let rec collapse_head_metas t = + match t with + | Cic.Appl([]) -> assert false + | Cic.Appl(a::l) -> + let a' = collapse_head_metas a in + (match a' with + | Cic.Meta(n,m) -> Cic.Meta(n,m) + | t -> + let l' = List.map collapse_head_metas l in + Cic.Appl(t::l')) + | Cic.Rel _ + | Cic.Var _ + | Cic.Meta _ + | Cic.Sort _ + | Cic.Implicit _ + | Cic.Const _ + | Cic.MutInd _ + | Cic.MutConstruct _ -> t + | Cic.LetIn _ + | Cic.Lambda _ + | Cic.Prod _ + | Cic.Cast _ + | Cic.MutCase _ + | Cic.Fix _ + | Cic.CoFix _ -> Cic.Meta(-1,[]) ;; let rec dummies_of_coercions = function - | Cic.Appl (c::l) when CoercGraph.is_a_coercion c -> + | Cic.Appl (c::l) when CoercDb.is_a_coercion' c -> Cic.Meta (-1,[]) | Cic.Appl l -> let l' = List.map dummies_of_coercions l in Cic.Appl l' @@ -93,7 +109,7 @@ let index univ key term = (* flexible terms are not indexed *) if key = Cic.Meta(-1,[]) then univ else - (prerr_endline("ADD: "^CicPp.ppterm key^" |-> "^CicPp.ppterm term); + ((*prerr_endline("ADD: "^CicPp.ppterm key^" |-> "^CicPp.ppterm term);*) TI.index univ key term) ;;