let t1' = whd t1
and t2' = whd t2 in
debug t1' [t2'] "POSTWHD";
- (*if !fdebug = 0 then ignore(Unix.system "read" );*)
+let res =
match (t1',t2') with
(C.Rel n1, C.Rel n2) -> n1 = n2
| (C.Var uri1, C.Var uri2) -> U.eq uri1 uri2
| (_,_) ->
debug t1' [t2'] "NOT-CONVERTIBLE" ;
false
+in
+if res then true else (debug t1' [t2'] "NOT-CONVERTIBLE" ; false)
end
in
aux t1 t2
| C.Appl (he::tl) when List.length tl > 0 ->
let hetype = type_of_aux env he
and tlbody_and_type = List.map (fun x -> (x, type_of_aux env x)) tl in
- (try
- eat_prods hetype tlbody_and_type
- with _ -> debug (C.Appl (he::tl)) env ; C.Implicit)
+ eat_prods hetype tlbody_and_type
| C.Appl _ -> raise (NotWellTyped "Appl: no arguments")
| C.Const (uri,cookingsno) ->
incr fdebug ;
Cic.Prod (n,s,t) ->
if CicReduction.are_convertible s hety then
(CicReduction.fdebug := -1 ;
- eat_prods (CicSubstitution.subst hete t) tl
+ eat_prods (CicSubstitution.subst hete t) tl
)
else
- (
- CicReduction.fdebug := 0 ;
- let _ = CicReduction.are_convertible s hety in
- debug hete [hety ; s] ;
- raise (NotWellTyped "Appl: wrong parameter-type")
-)
+ begin
+ CicReduction.fdebug := 0 ;
+ ignore (CicReduction.are_convertible s hety) ;
+ fdebug := 0 ;
+ debug s [hety] ;
+ raise (NotWellTyped "Appl: wrong parameter-type")
+ end
| _ -> raise (NotWellTyped "Appl: wrong Prod-type")
)
in