Skip to content

Commit f88a2bc

Browse files
garesCohenCyril
authored andcommitted
better test
1 parent 34f663a commit f88a2bc

File tree

1 file changed

+8
-7
lines changed

1 file changed

+8
-7
lines changed

tests/infer.v

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -8,20 +8,21 @@ HB.structure Definition foo := { T of foom T }.
88

99
HB.instance Definition i := foom.Build nat plus.
1010

11-
HB.mixin Record barm (P : foo.type) (T : indexed Type) := {
12-
law : P -> T
11+
HB.mixin Record barm (A : Type) (P : foo.type) (B: Type) (T : indexed Type) := {
12+
law : P -> T -> A -> B
1313
}.
1414

1515
#[infer(P)]
16-
HB.structure Definition bar P := { T of barm P T }.
16+
HB.structure Definition bar A P B := { T of barm A P B T }.
1717

18-
Fail Check bar.type_ nat.
18+
Fail Check bar.type_ bool nat bool.
1919
Print bar.phant_type.
2020
Print bar.type.
21-
Check bar.type nat.
21+
Check bar.type bool nat bool.
2222

2323
Fail #[infer(P = "whatever")]
24-
HB.structure Definition bar1 P := { T of barm P T & foom T }.
24+
HB.structure Definition bar1 P := { T of barm bool P bool T & foom T }.
2525

2626
#[infer(P = "Type")]
27-
HB.structure Definition bar1 P := { T of barm P T & foom T }.
27+
HB.structure Definition bar1 P := { T of barm bool P bool T & foom T }.
28+
Check bar1.type nat.

0 commit comments

Comments
 (0)