"unit (* TOO POLYMORPHIC TYPE *)"
else (
let needs_obj_magic =
- match ty with
+ (* BUG HERE: we should consider also the right parameters *)
+ match CicReduction.whd context ty with
Cic.Lambda (_,_,t) -> not (DoubleTypeInference.does_not_occur 1 t)
- | _ -> assert false
+ | _ -> false (* it can be a Rel, e.g. in *_rec *)
in
(match analyze_term context te with
`Type -> assert false
let rec aux argsno context =
function
Cic.Lambda (name,ty,bo) when argsno > 0 ->
+ let name =
+ match name with
+ Cic.Anonymous -> Cic.Anonymous
+ | Cic.Name n -> Cic.Name (ppid n) in
let args,res =
aux (argsno - 1) (Some (name,Cic.Decl ty)::context)
bo