X-Git-Url: http://matita.cs.unibo.it/gitweb/?a=blobdiff_plain;f=helm%2Fsoftware%2Fhelena%2Fsrc%2Fbasic_ag%2FbagSubstitution.ml;h=a8109c3ffbc82e9bbc6161696752ec11bfa08342;hb=dd74d1964ef07de249385a48f28302b427c0d287;hp=f8c34789208be7ab19673e302966f3d09564c60a;hpb=95872555aaa040a22ad2d93cb1278f79e20da70c;p=helm.git diff --git a/helm/software/helena/src/basic_ag/bagSubstitution.ml b/helm/software/helena/src/basic_ag/bagSubstitution.ml index f8c347892..a8109c3ff 100644 --- a/helm/software/helena/src/basic_ag/bagSubstitution.ml +++ b/helm/software/helena/src/basic_ag/bagSubstitution.ml @@ -9,35 +9,37 @@ \ / This software is distributed as is, NO WARRANTY. V_______________________________________________________________ *) -module W = Share +module S = Share module Z = Bag +IFDEF TYPE THEN + (* Internal functions *******************************************************) let rec lref_map_bind f map b = match b with | Z.Abbr v -> - let f v' = f (W.sh1 v v' b Z.abbr) in + let f v' = f (S.sh1 v v' b Z.abbr) in lref_map f map v | Z.Abst w -> - let f w' = f (W.sh1 w w' b Z.abst) in + let f w' = f (S.sh1 w w' b Z.abst) in lref_map f map w | Z.Void -> f b and lref_map f map t = match t with | Z.LRef i -> - let ii = map i in f (W.sh1 i ii t Z.lref) + let ii = map i in f (S.sh1 i ii t Z.lref) | Z.GRef _ -> f t | Z.Sort _ -> f t | Z.Cast (w, u) -> - let f w' u' = f (W.sh2 w w' u u' t Z.cast) in + let f w' u' = f (S.sh2 w w' u u' t Z.cast) in let f w' = lref_map (f w') map u in lref_map f map w | Z.Appl (w, u) -> - let f w' u' = f (W.sh2 w w' u u' t Z.appl) in + let f w' u' = f (S.sh2 w w' u u' t Z.appl) in let f w' = lref_map (f w') map u in lref_map f map w - | Z.Bind (a, l, b, u) -> - let f b' u' = f (W.sh2 b b' u u' t (Z.bind a l)) in + | Z.Bind (y, l, b, u) -> + let f b' u' = f (S.sh2 b b' u u' t (Z.bind y l)) in let f b' = lref_map (f b') map u in lref_map_bind f map b @@ -46,3 +48,5 @@ and lref_map f map t = match t with let subst f new_l old_l t = let map i = if i = old_l then new_l else i in if new_l = old_l then f t else lref_map f map t + +END