-
- | _, NCic.Appl (NCic.Meta (i,l) as meta :: args) ->
- let metasenv, lambda_Mj =
- lambda_intros rdb metasenv subst context (List.length args)
- (NCicTypeChecker.typeof ~metasenv ~subst context meta)
- in
- let metasenv, subst =
- try
- unify rdb test_eq_only metasenv subst context
- lambda_Mj (C.Meta (i,l))
- with UnificationFailure msg | Uncertain msg when not norm1 ->
- (* failure: let's try again argument vs argument *)
- raise (KeepReducing msg)
- in
- let metasenv, subst =
- unify rdb test_eq_only metasenv subst context t1 t2
- in
- (try
- let name, ctx, term, ty = NCicUtils.lookup_subst i subst in
- let term = eta_reduce subst term in
- let subst = List.filter (fun (j,_) -> j <> i) subst in
- metasenv, ((i, (name, ctx, term, ty)) :: subst)
- with Not_found -> assert false)
+ | _, NCic.Appl (NCic.Meta (_,_) :: _) ->
+ unify rdb test_eq_only metasenv subst context t2 t1 (not swap)