aux (k, e, he, tl' @ s)
| (_, _, C.Const
(Ref.Ref (_,Ref.Def height) as refer), s) as config ->
- if delta >= height then config, false else
+ if delta >= height then
+ config, false
+ else
let _,_,body,_,_,_ = NCicEnvironment.get_checked_def refer in
aux (0, [], body, s)
| (_, _, C.Const (Ref.Ref (_,
c
| config -> config
in
- (match decofix (fst (reduce ~delta:0 ~subst context (k,e,term,[]))) with
+ let match_head = k,e,term,[] in
+ let reduced,_ = reduce ~delta:0 ~subst context match_head in
+ (match decofix reduced with
| (_, _, C.Const (Ref.Ref (_,Ref.Con (_,j,_))),[]) ->
aux (k, e, List.nth pl (j-1), s)
| (_, _, C.Const (Ref.Ref (_,Ref.Con (_,j,lno))), s')->
let _,params = HExtlib.split_nth lno s' in
aux (k, e, List.nth pl (j-1), params@s)
- | _ -> config,true)
+ | _ -> config,reduced == match_head)
in
aux
;;