@@ -2173,29 +2173,35 @@ phase unnecessary.|};
21732173 MLCode(Pred("coq.sort.leq" ,
21742174 InOut(B. ioarg_flex sort , "S1" ,
21752175 InOut(B. ioarg_flex sort , "S2" ,
2176- Full(unit_ctx , "constrains S1 <= S2" ))),
2177- (fun u1 u2 ~depth _ _ state ->
2176+ Full(global , "constrains S1 <= S2" ))),
2177+ (fun u1 u2 ~depth { options } _ -> on_global_state "coq.sort.leq"
2178+ (fun state ->
21782179 match u1 , u2 with
21792180 | Data u1 , Data u2 ->
21802181 if Sorts. equal u1 u2 then state , !: u1 +! u2 ,[]
21812182 else
2182- (* let state, u2 = purge_algebraic_univs_sort state (EConstr.ESorts.make u2) in *)
2183- add_universe_constraint state (constraint_leq u1 u2 ), !: u1 +! u2 ,[]
2184- | _ -> err Pp. (str "coq.sort.leq: called with _ as argument" ))),
2183+ let state , u2 = if true (* options.algunivs != Some true *)
2184+ then purge_algebraic_univs_sort state (EConstr.ESorts. make u2 )
2185+ else state , u2 in
2186+ add_universe_constraint state (constraint_leq u1 u2 ), !: u1 +! u2 ,[]
2187+ | _ -> err Pp. (str "coq.sort.leq: called with _ as argument" )))),
21852188 DocAbove);
21862189
21872190 MLCode(Pred("coq.sort.eq" ,
21882191 InOut(B. ioarg_flex sort , "S1" ,
21892192 InOut(B. ioarg_flex sort , "S2" ,
2190- Full(unit_ctx , "constrains S1 = S2" ))),
2191- (fun u1 u2 ~depth _ _ state ->
2193+ Full(global , "constrains S1 = S2" ))),
2194+ (fun u1 u2 ~depth { options } _ -> on_global_state "coq.sort.eq"
2195+ (fun state ->
21922196 match u1 , u2 with
21932197 | Data u1 , Data u2 ->
21942198 if Sorts. equal u1 u2 then state , !: u1 +! u2 ,[]
21952199 else
2196- (* let state, u2 = purge_algebraic_univs_sort state (EConstr.ESorts.make u2) in *)
2200+ let state , u2 = if true (* options.algunivs != Some true *)
2201+ then purge_algebraic_univs_sort state (EConstr.ESorts. make u2 )
2202+ else state , u2 in
21972203 add_universe_constraint state (constraint_eq u1 u2 ), !: u1 +! u2 , []
2198- | _ -> err Pp. (str "coq.sort.eq: called with _ as argument" ))),
2204+ | _ -> err Pp. (str "coq.sort.eq: called with _ as argument" )))) ,
21992205 DocAbove);
22002206
22012207 MLCode(Pred("coq.sort.sup" ,
0 commit comments