File tree Expand file tree Collapse file tree 4 files changed +19
-3
lines changed Expand file tree Collapse file tree 4 files changed +19
-3
lines changed Original file line number Diff line number Diff line change @@ -57,13 +57,17 @@ declare-const Name BodySkel TyWPSkel CSL :- std.do! [
5757 UnfoldClauses => copy SectionTy SectionTyUnfolded,
5858 ]) (SectionTy = SectionTyUnfolded),
5959
60+ % call HB.instance TheType TheFactory
61+ std.drop NParams Args [TheType|_],
62+
63+ if (var TheType)
64+ (coq.error "HB: The instance subject must be explicitly given.\nUse:\n HB.instance Definition _ : M <subject> := ...\n HB.instance Definition _ := M.Build <subject> ...")
65+ true,
66+
6067 log.coq.env.add-const-noimplicits-failondup RealName OptimizedBody
6168 SectionTyUnfolded @transparent! C,
6269 TheFactory = (global (const C)),
6370
64- % call HB.instance TheType TheFactory
65- std.drop NParams Args [TheType|_],
66-
6771 private.check-non-forgetful-inheritance TheType Factory,
6872
6973 private.declare-instance Factory TheType TheFactory Clauses CSL,
Original file line number Diff line number Diff line change 1818 fi
1919
2020post-all::
21+ $(call DIFF, tests/err_missin_subject.v)
2122 $(call DIFF, tests/compress_coe.v)
2223 $(call DIFF, tests/about.v)
2324 $(call DIFF, tests/howto.v)
Original file line number Diff line number Diff line change 1+ From HB Require Import structures.
2+ HB.mixin Record M X := {}.
3+ HB.structure Definition S := { X of M X}.
4+ HB.instance Definition _ : M nat := M.Build _.
5+ HB.instance Definition _ : M _ := M.Build bool.
6+ Fail HB.instance Definition _ : M _ := M.Build _.
Original file line number Diff line number Diff line change 1+ The command has indeed failed with message:
2+ HB: The instance subject must be explicitly given.
3+ Use:
4+ HB.instance Definition _ : M <subject> := ...
5+ HB.instance Definition _ := M.Build <subject> ...
You can’t perform that action at this time.
0 commit comments