]> matita.cs.unibo.it Git - helm.git/blobdiff - helm/software/components/ng_refiner/nCicRefiner.ml
Bug fixed: in case of (t ...) where t has flexible type, a failure obtained
[helm.git] / helm / software / components / ng_refiner / nCicRefiner.ml
index b88e261f102d2d39b58e24b081f90e750e273ef5..ac280e81fdae91f4c2c367f6e4f123789688660d 100644 (file)
@@ -537,7 +537,10 @@ and eat_prods rdb ~localise force_ty metasenv subst context expty orig_t orig_he
            aux metasenv subst args_so_far he ty_he
             (NCic.Implicit `Term :: NCic.Implicit `Vector :: tl)
           with
-           Uncertain msg | RefineFailure msg -> raise (wrap_exc msg exc)))
+           Uncertain msg | RefineFailure msg -> raise (wrap_exc msg exc))
+     | RefineFailure msg when not (has_some_more_pis ty_he) ->
+        (* instantiating the head could change the has_some_more_pis flag *)
+        raise (Uncertain msg))
   | arg::tl ->
       match NCicReduction.whd ~subst context ty_he with 
       | C.Prod (_,s,t) ->