X-Git-Url: http://matita.cs.unibo.it/gitweb/?a=blobdiff_plain;f=helm%2Focaml%2Fcic_omdoc%2Feta_fixing.ml;h=c379110145b522a87d441d5f322f9cf69c7d7d21;hb=8b8606be3b086e20ead16ca7417da5f1c4e02e79;hp=d6293d2434ad61af36b7c94203a0cf7b6c8641c7;hpb=c706b1cb2c7cbdd23a3281d35d3f0b10c3a684cf;p=helm.git diff --git a/helm/ocaml/cic_omdoc/eta_fixing.ml b/helm/ocaml/cic_omdoc/eta_fixing.ml index d6293d243..c37911014 100644 --- a/helm/ocaml/cic_omdoc/eta_fixing.ml +++ b/helm/ocaml/cic_omdoc/eta_fixing.ml @@ -214,9 +214,15 @@ let eta_fix metasenv t = | C.Variable _ -> raise ReferenceToVariable | C.CurrentProof (_,_,_,_,params) -> raise RferenceToCurrentProof | C.InductiveDefinition _ -> raise ReferenceToInductiveDefinition - ) - in - fix_according_to_type constant_type (C.Const(uri,exp_named_subst)) l'' + ) in + fix_according_to_type + constant_type (C.Const(uri,exp_named_subst)) l'' +(* + let result = fix_according_to_type constant_type (C.Const(uri,exp_named_subst)) l'' in + if not (CicReduction.are_convertible [] appl result) then + (prerr_endline ("prima :" ^(CicPp.ppterm appl)); + prerr_endline ("dopo :" ^(CicPp.ppterm result))); + result *) | _ -> C.Appl l' ) | C.Const (uri,exp_named_subst) -> let exp_named_subst' = @@ -248,7 +254,6 @@ let eta_fix metasenv t = | Cic.InductiveDefinition (l,_,n) -> l,n ) in let (_,_,_,constructors) = List.nth inductive_types tyno in - prerr_endline ("QUI"); let constructor_types = let rec clean_up t = function @@ -260,8 +265,9 @@ let eta_fix metasenv t = if noparams = 0 then List.map (fun (_,t) -> t) constructors else - let term_type = - CicTypeChecker.type_of_aux' metasenv context term in + let term_type = + CicTypeChecker.type_of_aux' metasenv context term + in (match term_type with C.Appl (hd::params) -> List.map (fun (_,t) -> clean_up t params) constructors @@ -293,3 +299,9 @@ let eta_fix metasenv t = + + + + + +