Skip to content

Commit 7d4f095

Browse files
authored
Merge pull request #391 from proux01/primitive_class_default
Make primitive_class the default
2 parents 2f03016 + 401df0b commit 7d4f095

File tree

6 files changed

+9
-9
lines changed

6 files changed

+9
-9
lines changed

Changelog.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
# Changelog
22

3+
## Unreleased
4+
5+
- **Removed** the `#[primitive_class]` attribute, making it the default.
6+
37
## [1.6.0] - 2023-09-20
48

59
Compatible with

HB/common/utils.elpi

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,6 @@ with-attributes P :-
4040
att "local" bool,
4141
att "fail" bool,
4242
att "doc" string,
43-
att "primitive_class" bool,
4443
att "primitive" bool,
4544
att "non_forgetful_inheritance" bool,
4645
att "hnf" bool,

HB/structure.elpi

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -466,9 +466,7 @@ declare-class+structure MLwP Sort
466466
synthesize-fields.body ClassDeclaration,
467467

468468
std.assert-ok! (coq.typecheck-indt-decl ClassDeclaration) "declare-class: illtyped",
469-
if (get-option "primitive_class" tt)
470-
(@primitive! => log.coq.env.add-indt ClassDeclaration ClassInd)
471-
(log.coq.env.add-indt ClassDeclaration ClassInd),
469+
(@primitive! => log.coq.env.add-indt ClassDeclaration ClassInd),
472470

473471
coq.env.projections ClassInd Projs,
474472
% TODO: put this code in a named clause

structures.v

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -583,7 +583,6 @@ HB.structure Definition StructureName params :=
583583
- [#[short(type="shortName")]] produces the abbreviation [shortName] for [Structure.type]
584584
- [#[short(pack="shortName")]] produces the abbreviation [shortName] for [HB.pack_for Structure.type]
585585
- [#[primitive]] experimental attribute to make the structure a primitive record,
586-
- [#[primitive_class]] experimental attribute to make the class a primitive record,
587586
- [#[verbose]] for a verbose output.
588587
*)
589588

tests/fix_loop.v

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
From HB Require Import structures.
22

33
HB.mixin Record M A := { x: nat }.
4-
#[primitive_class] HB.structure Definition S := { A of M A }.
4+
HB.structure Definition S := { A of M A }.

tests/primitive_records.v

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ Elpi Query lp:{{
1212
std.assert! (coq.env.record? Ind tt) "not primitive"
1313
}}.
1414

15-
#[primitive, primitive_class]
15+
#[primitive]
1616
HB.structure Definition A := {T of hasA T}.
1717

1818
Elpi Query lp:{{
@@ -33,14 +33,14 @@ HB.mixin Record HasMul T := {
3333
mulA: associative mul;
3434
}.
3535

36-
#[primitive, primitive_class]
36+
#[primitive]
3737
HB.structure Definition Mul := { T of HasMul T }.
3838

3939
#[primitive]
4040
HB.mixin Record HasSq T of Mul T := {
4141
sq : T -> T;
4242
pmul : forall x y, sq (mul x y) = mul (sq x) (sq y);
4343
}.
44-
#[primitive, primitive_class]
44+
#[primitive]
4545
HB.structure Definition Sq := { T of HasSq T & Mul T }.
4646
Check erefl : Sq.sort _ = Mul.sort _.

0 commit comments

Comments
 (0)