Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

HB.instance failed without giving a specific error message when instantiating an unexported mixin #392

Open
Ef55 opened this issue Oct 4, 2023 · 1 comment

Comments

@Ef55
Copy link

Ef55 commented Oct 4, 2023

The following fails without an explanation of the issue

From HB Require Import structures.

Module Test.
  HB.mixin Record Mixin T := {
    zero: T;
  }.

  HB.structure Definition Struct := { T of Mixin T }.

  HB.instance Definition struct_bool := Mixin.Build bool true.

  Module Exports.
    HB.reexport.
  End Exports.
End Test.
(** Uncommenting any of these two prevents the issue *)
(* Export Test.Exports. *)
(* HB.export Test. *)

Fail HB.instance Definition struct_nat := Test.Mixin.Build nat 0.
(*
  The elpi tactic/command HB.instance failed without giving a specific error message.
  Please report this inconvenience to the authors of the program.
*)

I don't know whether one should be able to instantiate a mixin this way (i.e. using its fully qualified name), or if the mixin must always be exported first.
If it's the latter, maybe the error message should say so.

@gares
Copy link
Member

gares commented Oct 4, 2023

Thanks for reporting.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants