in
match E.get_checked_obj uri, ref with
| (_,_,_,_,C.Inductive(isind1,lno1,tl,_)),Ref.Ref(_,Ref.Ind (isind2,i,lno2))->
- if isind1 <> isind2 then error ();
- if lno1 <> lno2 then error ();
+ if isind1 <> isind2 || lno1 <> lno2 then error ();
let _,_,arity,_ = List.nth tl i in arity
| (_,_,_,_,C.Inductive (_,lno1,tl,_)), Ref.Ref (_,Ref.Con (i,j,lno2)) ->
if lno1 <> lno2 then error ();
typecheck_metasenv metasenv;
typecheck_subst ~metasenv subst;
match kind with
- | C.Constant (_,_,Some te,ty,_) ->
+ | C.Constant (relevance,_,Some te,ty,_) ->
let _ = typeof ~subst ~metasenv [] ty in
let ty_te = typeof ~subst ~metasenv [] te in
if not (R.are_convertible ~subst [] ty_te ty) then
"inferred type:\n%s\nexpected type:\n%s")
(PP.ppterm ~subst ~metasenv ~context:[] ty_te)
(PP.ppterm ~subst ~metasenv ~context:[] ty))))
- | C.Constant (_,_,None,ty,_) -> ignore (typeof ~subst ~metasenv [] ty)
+ | C.Constant (relevance,_,None,ty,_) ->
+ ignore (typeof ~subst ~metasenv [] ty)
| C.Inductive (is_ind, leftno, tyl, _) ->
check_mutual_inductive_defs uri ~metasenv ~subst is_ind leftno tyl
| C.Fixpoint (inductive,fl,_) ->
let types, kl =
List.fold_left
- (fun (types,kl) (_,name,k,ty,_) ->
+ (fun (types,kl) (relevance,name,k,ty,_) ->
let _ = typeof ~subst ~metasenv [] ty in
((name,C.Decl ty)::types, k::kl)
) ([],[]) fl