Open screenl opened 1 month ago
Hi @screenl, thanks for reporting. Here is a minimized and complete file, so that we can adress this in the future.
From HB Require Import structures.
HB.mixin Record Interval_of I := {}.
HB.structure Definition Interval := {I of Interval_of I}.
HB.mixin Record Baryspace_of (I : Interval.type) A := {}.
HB.structure Definition Baryspace I := {A of @Baryspace_of I A}.
Fail HB.mixin Record barycentric_interval_of (I : Interval.type) of
Baryspace_of I I := {}.
(* The error message should be that the head of the subject of
a structure (here Interval.sort) should probably not be a
projection from the hierarchy. This will probably cause
forgetful inheritance problems *)
(* This is the alternative we should strive to suggest, however
for some reason I failed to diagnose, it fails *)
Fail HB.mixin Record barycentric_interval_of I of
Interval I & @Baryspace_of I I := {}.
(* This should be also be possible, but fails too *)
Fail HB.structure Definition SelfBaryspace :=
{I of Interval I & @Baryspace_of I I}.
I think this is related to a case we might have missed in https://github.com/math-comp/hierarchy-builder/pull/295
The following code gives
The elpi tactic/command HB.mixin failed without giving a specific error message. Please report this inconvenience to the authors of the program.;
The types are defined as follows