Skip to content

Commit abdb24c

Browse files
committed
fix universes
1 parent 2ad3c26 commit abdb24c

File tree

2 files changed

+12
-2
lines changed

2 files changed

+12
-2
lines changed

HB/lock.elpi

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,15 +23,19 @@ pred lock-module-type i:id, i:term, i:term, o:modtypath.
2323
lock-module-type Name Ty Bo M :- std.do! [
2424
log.coq.env.begin-module-type Name,
2525
log.coq.env.add-parameter "body" Ty C, B = global (const C),
26-
log.coq.env.add-parameter "unlock" {{ lib:@hb.eq lp:Ty lp:B lp:Bo }} _,
26+
PTY = {{ lib:@hb.eq _ lp:B lp:Bo }},
27+
std.assert-ok! (coq.typecheck-ty PTY _) "HB unlock statement illtyped",
28+
log.coq.env.add-parameter "unlock" PTY _,
2729
log.coq.env.end-module-type-name Name M,
2830
].
2931

3032
pred lock-module-body o:modtypath, i:id, i:term, i:term, o:constant.
3133
lock-module-body Signature Name Ty Bo C:- std.do! [
3234
log.coq.env.begin-module Name (some Signature),
3335
log.coq.env.add-const "body" Bo Ty @transparent! C, B = global (const C),
34-
log.coq.env.add-const "unlock" {{ lib:@hb.erefl lp:Ty lp:B }} {{ lib:@hb.eq lp:Ty lp:B lp:B }} @opaque! _,
36+
P = {{ lib:@hb.erefl lp:Ty lp:B }},
37+
std.assert-ok! (coq.typecheck P PTY) "HB unlock proof illtyped",
38+
log.coq.env.add-const "unlock" P PTY @opaque! _,
3539
log.coq.env.end-module-name Name _,
3640
].
3741

tests/lock.v

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,3 +7,9 @@ Definition nat1 := nat.
77
HB.lock Definition bar : nat1 := 3.
88

99
HB.lock Definition baz n : nat := 3 + n.
10+
11+
Axiom bigbody : Type -> Type -> Type.
12+
Axiom bigop : forall R I : Type, R -> list I -> (I -> bigbody R I) -> R.
13+
14+
HB.lock Definition xxx := bigop.
15+

0 commit comments

Comments
 (0)