ceps icon indicating copy to clipboard operation
ceps copied to clipboard

Organization of the library of `constr`/`econstr` combinators

Open herbelin opened this issue 7 years ago • 7 comments

Rendered here.

herbelin avatar Apr 06 '18 09:04 herbelin

Any comment on this ceps?

Basic common directions I proposed to follow are:

  • to stop restricting ourselves to add combinators to Constr;
  • in particular, to have the same sets of combinators on constr as on econstr: it is frustrating to need some combinator on some type, to see that it exists only on the other type, and to need a copy-paste or to try some contorsion to avoid the missing combinator;
  • to consistently adopt the model Constr.map and EConstr.map after a public announcement to plugin developers on whether the price to pay for this consistency of style is acceptable for them.

On the other side, we can also live with things as they are too, if it is too complicated. One way to go would be to ask plugin developers. For those who are in interaction with some of them, what do you think would be best?

herbelin avatar Jun 12 '18 13:06 herbelin

@herbelin the CEP looks pretty good to me, I'd say let's follow the plan.

Worth mentioning too is the effort by Gaëtan ( cc @skyskimmer ) unifying both types using a type-level index. IMHO that was very interesting but I think this PR would indeed help his effort.

ejgallego avatar Jun 12 '18 14:06 ejgallego

unifying both types using a type-level index.

I missed that. Is it a PR?

herbelin avatar Jun 12 '18 15:06 herbelin

I missed that. Is it a PR?

See https://github.com/coq/coq/issues/6258#issuecomment-385292328

SkySkimmer avatar Jun 12 '18 16:06 SkySkimmer

Very interesting. So, basically, what you gain is that you don't need conversions to use constr functions on econstr when you know that the econstr is ground. What about the dependency of econstr functions on sigma? Do you plan to have all the combinators in the kernel (or in a constr library coming before the kernel) depending on a kind observer, and then, the kernel would instantiate these combinators with Constr.kind and the econstr level would instantiate them with EConstr.kind?

herbelin avatar Jun 12 '18 17:06 herbelin

I don't have a plan. I had the idea and I'm experimenting with it (with low priority).

SkySkimmer avatar Jun 13 '18 11:06 SkySkimmer

I don't have a plan. I had the idea and I'm experimenting with it (with low priority).

Any update about that? I'm currently facing the need to use Inductiveops both on constr and econstr and the polymorphic constr approach seems very appealing.

herbelin avatar Nov 18 '20 07:11 herbelin