Skip to content

Commit

Permalink
typeclass option for HB.structure
Browse files Browse the repository at this point in the history
  • Loading branch information
Tragicus committed Jun 27, 2024
1 parent 9e09df7 commit 19216eb
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
1 change: 1 addition & 0 deletions HB/common/utils-synterp.elpi
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ with-attributes P :-
att "primitive" bool,
att "non_forgetful_inheritance" bool,
att "hnf" bool,
att "typeclass" bool,
] Opts, !,
Opts => (save-docstring, P).

Expand Down
4 changes: 2 additions & 2 deletions tests/coercion.v
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ HB.mixin Record isSigma (T : Type) (P : T -> Prop) (x : T) := {
_ : P x
}.

#[short(type="sigType"), verbose]
#[short(type="sigType"), typeclass]
HB.structure Definition Sig (T : Type) (P : T -> Prop) := {x of isSigma T P x}.

Section Sigma.
Expand Down Expand Up @@ -45,7 +45,7 @@ Fail Check x : sigType A P.
End Sigma.

HB.mixin Record isSigmaT (P : Type -> Prop) (x : Type) := { _ : P x }.
#[short(type="sigTType"), verbose]
#[short(type="sigTType"), typeclass]
HB.structure Definition SigT (P : Type -> Prop) := {x of isSigmaT P x}.

Section SigmaT.
Expand Down

0 comments on commit 19216eb

Please sign in to comment.