Skip to content

Commit

Permalink
FStar.Witnessed.Core: mark witnessed argument as @@@unused
Browse files Browse the repository at this point in the history
This allows to user a witnessed token in recursive definitions in
non-strictly positive positions. The justification is
1) that this token is really just a unit, it's the axiom that gives it
any interesting behavior, and
2) that this token cannot be used except through an effectful operation.

So it should be safe to mark it its type argument @@@unused.
  • Loading branch information
mtzguido committed Aug 3, 2023
1 parent e9a2770 commit 260e3d5
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion ulib/experimental/FStar.Witnessed.Core.fst
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ module P = FStar.Preorder

let witnessed (state:Type u#a)
(rel:P.preorder state)
(p:s_predicate state)
([@@@unused] p:s_predicate state)
: Type0
= unit

Expand Down
2 changes: 1 addition & 1 deletion ulib/experimental/FStar.Witnessed.Core.fsti
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ let stable (state:Type u#a)

val witnessed (state:Type u#a)
(rel:P.preorder state)
(p:s_predicate state)
([@@@unused] p:s_predicate state)
: Type0

val witnessed_proof_irrelevant
Expand Down

0 comments on commit 260e3d5

Please sign in to comment.