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 <coq-club AT inria.fr>
  • Subject: Re: [Coq-Club] question about Existing Class
  • Date: Wed, 29 Jun 2016 12:08:53 -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-f178.google.com
  • Ironport-phdr: 9a23:Kv/d2hKrNAGkb4KvydmcpTZWNBhigK39O0sv0rFitYgULPrxwZ3uMQTl6Ol3ixeRBMOAuqoC0red4vuocFdDyK7JiGoFfp1IWk1NouQttCtkPvS4D1bmJuXhdS0wEZcKflZk+3amLRodQ56mNBXsq3G/pQQfBg/4fVIsYL+kQsiL0o/mjKibwN76W01wnj2zYLd/fl2djD76kY0ou7ZkMbs70RDTo3FFKKx8zGJsIk+PzV6nvp/jtLYqySlbuuog+shcSu26Ov1gFf0LRAghZksy/YXAsQTJBV+E4WJZWWELmDJJBRLE5Vf0RMGinDH9s79f3y+TIc3/S/gQVDW84qF3AEvqjyEGNDM9/Wz/hcl5jaYdqxWk8U8si7XIaZ2YYaItNpjWeskXEC8YBp5c



On 06/29/2016 11:33 AM, Jonathan Leivent wrote:
I just debugged an infinite loop in typeclass eauto that was apparently due to Existing Class causing instances created afterwards to become Existing Instances, even if not explicitly declared as such. I had declared "Existing Class eq", and really only wanted a very few cases of eq to be considered instances, but some later equalities automagically became instances (I can see them via Print Hints in the typeclass_instances db).

First of all - is this a feature or a bug? Secondly, if a feature, is there a way to turn it off, at least for particular Classes?

-- Jonathan



Hmmm... maybe it only happens with Axioms, Variables, Hypotheses, etc.?:

Existing Class eq.

Variable T : Type.

Variable eqT : forall a b : T, a = b.

Print HintDb typeclass_instances.

(* prints:
Discriminated database
Unfoldable variable definitions: all
Unfoldable constant definitions: all
Cut: emp
For any goal ->
For eq -> apply eqT(level 0, id 0)
*)

But - still - is there a way to turn this off?

-- Jonathan




Archive powered by MHonArc 2.6.18.

Top of Page