Skip to Content.
Sympa Menu

coq-club - Re: [Coq-Club] question about Existing Class

coq-club AT inria.fr

Subject: The Coq mailing list

List archive

Re: [Coq-Club] question about Existing Class


Chronological Thread 
  • From: Jonathan Leivent <jonikelee AT gmail.com>
  • To: coq-club AT inria.fr
  • Subject: Re: [Coq-Club] question about Existing Class
  • Date: Wed, 29 Jun 2016 22:06:51 -0400
  • Authentication-results: mail3-smtp-sop.national.inria.fr; spf=None smtp.pra=jonikelee AT gmail.com; spf=Pass smtp.mailfrom=jonikelee AT gmail.com; spf=None smtp.helo=postmaster AT mail-qk0-f179.google.com
  • Ironport-phdr: 9a23:uf9gnxFoDtvv2B5ihCZ26Z1GYnF86YWxBRYc798ds5kLTJ75pM+wAkXT6L1XgUPTWs2DsrQf2rKQ6v6rBDNIyK3CmUhKSIZLWR4BhJdetC0bK+nBN3fGKuX3ZTcxBsVIWQwt1Xi6NU9IBJS2PAWK8TWM5DIfUi/yKRBybrysXNWD14LuiavvpNX6WEZhvHKFe7R8LRG7/036l/I9ps9cEJs30QbDuXBSeu5blitCLFOXmAvgtI/rpMYwu3cYh/V0/MlZFK7+Yq4QTLpCDT1gPXpmytfssEzhSg2G+nsVVC0ynxtWDg7ZpEX4WZHwsSb+u+dV1yyTPMmwRrcxD2fxp5x3QQPl3X9UfwUy93va35R9



On 06/29/2016 01:05 PM, Jonathan Leivent wrote:


On 06/29/2016 12:38 PM, Matthieu Sozeau wrote:
Hi Jonathan,

short answer is not currently. I would advise to make an abbreviation
class eqC instead. The fact that local hypotheses of
typeclass type are automatically considered for resolution is a feature. It
could be an option of individual class declarations
to not do that: only explicit Instances/Existing Instances for that class
would be considered. We'd certainly need to devise a
way to declare when a local binder (in fun (x : C foo) y => t) or a goal
hypothesis (e.g. after intro H) should be considered though.
Best,
-- Matthieu

Thanks, Matthieu.

What do you mean by an "abbreviation class eqC"?

Here's a guess - instead of "Existing Class eq", I tried this:

Class eqC {T}(a b : T) := equals : eq a b.
Hint Resolve equals : typeclass_instances.

with some specific Instances of eqC.

However, this seems to require the explicit use of "typeclass eauto" - a hole of eq type won't get filled automatically, unlike what was happening in the Existing Class eq case (and happening too often). I would like to have the holes corresponding to the instances of eqC automatically filled in. Is there some other way to do this?

-- Jonathan




Archive powered by MHonArc 2.6.18.

Top of Page