@@ -2363,14 +2363,15 @@ denote the same x as before.|};
23632363 MLCode(Pred("coq.env.primitive-projection?" ,
23642364 InOut(B. ioarg projection , "Projection" ,
23652365 InOut(B. ioarg constant , "Compatibility constant" ,
2366- Read(global , "Relates a primitive projection to its compatibility constant." ))),
2367- (fun p c ~depth coq_context _ _ ->
2366+ Out(int , "Index" ,
2367+ Read(global , "Relates a primitive projection to its compatibility constant and its index in the record." )))),
2368+ (fun p c _ ~depth coq_context _ _ ->
23682369 match p , c with
23692370 | _ , Data (Variable c ) -> raise No_clause
23702371 | Data p , Data (Constant c ) ->
2371- if Constant. equal (Projection. constant p ) c then ?: None +? None else raise No_clause
2372+ if Constant. equal (Projection. constant p ) c then ?: None +? None +! Names.Projection. ( arg p + npars p ) else raise No_clause
23722373 | NoData, NoData -> U. type_error "coq.env.primitive-projection?: got no input data"
2373- | Data p , NoData -> ?: None +! (Constant (Projection. constant p ))
2374+ | Data p , NoData -> ?: None +! (Constant (Projection. constant p )) +! Names.Projection. ( arg p + npars p )
23742375 | NoData, Data (Constant c ) ->
23752376 (match Environ. constant_opt_value_in coq_context .env (UVars. in_punivs c ) with
23762377 | None -> raise No_clause
@@ -2381,7 +2382,9 @@ denote the same x as before.|};
23812382 | App (hd , _ ) -> get_proj hd
23822383 | Proj (p , _ , _ ) -> p
23832384 | _ -> raise No_clause
2384- in !: (get_proj p ) +? None))),
2385+ in
2386+ let p = get_proj p in
2387+ !: p +? None +! Names.Projection. (arg p + npars p )))),
23852388 DocAbove);
23862389
23872390 LPDoc "-- Sorts (and their universe level, if applicable) ----------------" ;
0 commit comments