in
let cic_body =
aux ~localize loc context' (add_binders `Lambda body) in
+ let typ =
+ match typ with Some typ -> typ | None-> CicNotationPt.Implicit in
let cic_type =
aux_option ~localize loc context (Some `Type)
- (HExtlib.map_option (add_binders `Pi) typ) in
+ (Some (add_binders `Pi typ)) in
let name =
match CicNotationUtil.cic_name_of_name name with
| Cic.Anonymous ->
let ugraph = CicUniv.oblivion_ugraph in
match obj with
Cic.Constant (name,Some bo,ty,args,attrs) ->
+prerr_endline ("PRIMA: " ^ CicPp.ppobj obj);
(* CSC: ugly code. Here I need to retrieve in advance the loc of bo
since type_of_aux' destroys localization information (which are
preserved by type_of_aux *)
`MutualDefinition to rememer this. *)
let name,ty =
match defs with
- | (params,(N.Ident (name, None), Some ty),_,_) :: _ ->
+ | (params,(N.Ident (name, None), ty),_,_) :: _ ->
+ let ty = match ty with Some ty -> ty | None -> N.Implicit in
let ty =
List.fold_right
(fun var ty -> N.Binder (`Pi,var,ty)
) params ty
in
name,ty
- | (_,(N.Ident (name, None), None),_,_) :: _ ->
- name, N.Implicit
| _ -> assert false
in
let body = N.Ident (name,None) in