Skip to content

Commit dce339f

Browse files
committed
attribute #[unsafe(univ)]
1 parent 125ecbc commit dce339f

File tree

2 files changed

+10
-1
lines changed

2 files changed

+10
-1
lines changed

HB/common/utils.elpi

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -330,3 +330,12 @@ saturate-type-constructor T ET :-
330330
coq.typecheck T TH ok,
331331
coq.count-prods TH N,
332332
coq.mk-app T {coq.mk-n-holes N} ET.
333+
334+
335+
pred with-unsafe-univ i:prop.
336+
with-unsafe-univ P :- get-option "unsafe.univ" tt, !,
337+
coq.option.get ["Universe","Checking"] Old,
338+
coq.option.set ["Universe","Checking"] (coq.option.bool ff),
339+
P,
340+
coq.option.set ["Universe","Checking"] Old.
341+
with-unsafe-univ P :- P.

HB/structures.v

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -660,7 +660,7 @@ main [const-decl N (some B) Arity] :- std.do! [
660660
% compute the universe for the structure (default )
661661
prod-last {coq.arity->term Arity} Ty,
662662
if (ground_term Ty) (Sort = Ty) (Sort = {{Type}}), sort Univ = Sort,
663-
with-attributes (with-logging (structure.declare N B Univ)),
663+
with-attributes (with-logging (with-unsafe-univ (structure.declare N B Univ))),
664664
].
665665

666666
}}.

0 commit comments

Comments
 (0)