coq-club AT inria.fr
Subject: The Coq mailing list
List archive
- From: Jonathan Leivent <jonikelee AT gmail.com>
- To: coq-club AT inria.fr
- Subject: Re: [Coq-Club] Typeclasses vs canonical instances
- Date: Tue, 26 Apr 2016 18:29:36 -0400
- Authentication-results: mail2-smtp-roc.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-qg0-f47.google.com
- Ironport-phdr: 9a23:/CWcOBKJzDvp8nGFjNmcpTZWNBhigK39O0sv0rFitYgUKfXxwZ3uMQTl6Ol3ixeRBMOAu6IC27Kd6/qocFdDyKjCmUhKSIZLWR4BhJdetC0bK+nBN3fGKuX3ZTcxBsVIWQwt1Xi6NU9IBJS2PAWK8TWM5DIfUi/yKRBybrysXNWC34Lnj6vqodX6WEZhunmUWftKNhK4rAHc5IE9oLBJDeIP8CbPuWZCYO9MxGlldhq5lhf44dqsrtY4q3wD86Fpy8kVWqLjOq88ULZwDTI8Mmlz6te4mwPESF6t4X0VTmUflFJsDgnb4RfmFsPztS37ted51SSyMsj/TLRyUjOnufQ4ACT0gTsKYmZquFrcjdZ92fpW
I recently ran into a shortcoming of typeclasses: that they do not provide multiple successes for use by backtracking proof search (roughly, this means that "typeclasses eauto" = "once typeclasses eauto"). I didn't bother to examine canonical structures - might they be different in this regard?
-- Jonathan
On 04/26/2016 05:08 AM, Guillaume Melquiond wrote:
On 25/04/2016 23:41, Gregory Malecha wrote:
My personal advice is to use type classes but there are definitelyThat is the core of the matter. On the one hand, the typeclass mechanism
people on this list that will tell you that canonical structures are
much better. From a future-looking point of view, it seems like there is
some current work in making type classes work better, while, to the best
of my knowledge, canonical structures are not actively being developed
anymore. My hope is that some of the downsides of type classes will be
mitigated by this work which will lead to fewer reasons not to use type
classes.
is a full-blown Prolog system, which makes it easy to (powerfully) use.
But it also means that it needs a constant stream of new fixes so that
it works efficiently. On the other hand, the canonical structure
mechanism is a single forward rule, which means that it is harder to use
since you have to understand how to achieve the desired result. But it
also means that the mechanism doesn't need any active development since
it is so simple.
As far as I am concerned, I started with typeclasses, since they were
easier to use. Then I switched to canonical structures once I was no
longer able to debug where I got my typeclass instances wrong.
Best regards,
Guillaume
- [Coq-Club] Typeclasses vs canonical instances, Igor Zhirkov, 04/24/2016
- Re: [Coq-Club] Typeclasses vs canonical instances, Gregory Malecha, 04/25/2016
- Re: [Coq-Club] Typeclasses vs canonical instances, Guillaume Melquiond, 04/26/2016
- Re: [Coq-Club] Typeclasses vs canonical instances, Jonathan Leivent, 04/27/2016
- Re: [Coq-Club] Typeclasses vs canonical instances, Gregory Malecha, 04/27/2016
- Re: [Coq-Club] Typeclasses vs canonical instances, Pierre-Marie Pédrot, 04/27/2016
- Re: [Coq-Club] Typeclasses vs canonical instances, Enrico Tassi, 04/27/2016
- Re: [Coq-Club] Typeclasses vs canonical instances, Jonathan Leivent, 04/28/2016
- Re: [Coq-Club] Typeclasses vs canonical instances, Jason Gross, 04/28/2016
- Re: [Coq-Club] Typeclasses vs canonical instances, Enrico Tassi, 04/29/2016
- Re: [Coq-Club] Typeclasses vs canonical instances, Enrico Tassi, 04/27/2016
- Re: [Coq-Club] Typeclasses vs canonical instances, Pierre-Marie Pédrot, 04/27/2016
- Re: [Coq-Club] Typeclasses vs canonical instances, Gregory Malecha, 04/27/2016
- Re: [Coq-Club] Typeclasses vs canonical instances, Jonathan Leivent, 04/27/2016
- Re: [Coq-Club] Typeclasses vs canonical instances, Guillaume Melquiond, 04/26/2016
- Re: [Coq-Club] Typeclasses vs canonical instances, Gregory Malecha, 04/25/2016
Archive powered by MHonArc 2.6.18.