File tree Expand file tree Collapse file tree 4 files changed +29
-2
lines changed Expand file tree Collapse file tree 4 files changed +29
-2
lines changed Original file line number Diff line number Diff line change @@ -42,7 +42,8 @@ declare-const Name BodySkel TyWPSkel CSL :- std.do! [
4242
4343 % identify the factory
4444 std.assert! (coq.safe-dest-app SectionTy (global FactoryAlias) Args) "The type of the instance is not a factory",
45- factory-alias->gref FactoryAlias Factory,
45+ if (factory-alias->gref FactoryAlias Factory) true
46+ (coq.error "HB:" {coq.term->string (global FactoryAlias)} "is not a factory or its library was not correctly imported"),
4647 std.assert! (factory-nparams Factory NParams) "Not a factory synthesized by HB",
4748
4849 % declare the constant for the factory instance
Original file line number Diff line number Diff line change @@ -26,4 +26,5 @@ post-all::
2626 $(call DIFF, tests/missing_join_error.v)
2727 $(call DIFF, tests/not_same_key.v)
2828 $(call DIFF, tests/hnf.v)
29- $(call DIFF, tests/err_miss_dep.v)
29+ $(call DIFF, tests/err_miss_dep.v)
30+ $(call DIFF, tests/err_bad_mix.v)
Original file line number Diff line number Diff line change 1+ From HB Require Import structures.
2+
3+ Module Test .
4+ HB.mixin Record Mixin T := {
5+ zero: T;
6+ }.
7+
8+ HB.structure Definition Struct := { T of Mixin T }.
9+
10+ HB.instance Definition struct_bool := Mixin.Build bool true.
11+
12+ Module Exports.
13+ HB.reexport.
14+ End Exports.
15+ End Test .
16+ (** Uncommenting any of these two prevents the issue *)
17+ (* Export Test.Exports. *)
18+ (* HB.export Test. *)
19+
20+ Fail HB.instance Definition struct_nat := Test.Mixin.Build nat 0.
Original file line number Diff line number Diff line change 1+ Interactive Module Test started
2+ Interactive Module Exports started
3+ The command has indeed failed with message:
4+ HB: Test.Mixin.axioms_
5+ is not a factory or its library was not correctly imported
You can’t perform that action at this time.
0 commit comments