- let ms, _, restrictions_for_n, l =
- List.fold_right
- (fun t (ms, i, restrictions_for_n, l) ->
- try
- let ms, t = aux (k-shift) ms t in
- ms, i-1, restrictions_for_n, t::l
- with Occur ->
- ms, i-1, i::restrictions_for_n, l)
- l (ms, List.length l, [], [])
- in
-
- ms, restrictions_for_n, pack_lc (shift, NCic.Ctx l)
- in
- if restrictions_for_n = [] then
- ms, if l = l' then orig else NCic.Meta (n, l')
- else
- let metasenv, subst, newmeta =
- restrict metasenv subst n restrictions_for_n
- in
- (metasenv, subst), NCic.Meta (newmeta, l'))
+ let ms, _, restrictions_for_n, l =
+ List.fold_right
+ (fun t (ms, i, restrictions_for_n, l) ->
+ try
+ let ms, t = aux (k-shift) ms t in
+ ms, i-1, restrictions_for_n, t::l
+ with Occur ->
+ ms, i-1, i::restrictions_for_n, l)
+ l (ms, List.length l, [], [])
+ in
+
+ ms, restrictions_for_n, pack_lc (shift, NCic.Ctx l)
+ in
+ if restrictions_for_n = [] then
+ ms, if l = l' then orig else NCic.Meta (n, l')
+ else
+ let metasenv, subst, newmeta =
+ restrict metasenv subst n restrictions_for_n
+ in
+ (metasenv, subst), NCic.Meta (newmeta, l'))