coq-club AT inria.fr
Subject: The Coq mailing list
List archive
- From: Matthieu Sozeau <mattam AT mattam.org>
- To: Coq Club <coq-club AT inria.fr>
- Subject: Re: [Coq-Club] multiple typeclass instance question
- Date: Wed, 16 Mar 2016 20:26:45 +0000
- Authentication-results: mail2-smtp-roc.national.inria.fr; spf=None smtp.pra=mattam AT mattam.org; spf=Pass smtp.mailfrom=matthieu.sozeau AT gmail.com; spf=None smtp.helo=postmaster AT mail-wm0-f47.google.com
- Ironport-phdr: 9a23:UwDe3xSdgTdPV6FY3JYZt6rCftpsv+yvbD5Q0YIujvd0So/mwa64YxWN2/xhgRfzUJnB7Loc0qyN4/CmATZLuMzR+Fk5M7VyFDY9wf0MmAIhBMPXQWbaF9XNKxIAIcJZSVV+9Gu6O0UGUOz3ZlnVv2HgpWVKQka3CwN5K6zPF5LIiIzvjqbpq82VO18D3WDtKZpJbzyI7izp/vEMhoVjLqtjgjDomVBvP9ps+GVzOFiIlAz97MrjtLRq8iBXpu5zv5UYCfayV+0CQLdZFDUrNXwurI2u7EGbDFjH2nxJeWIP2jFMHgKNuBr9R9L6tjbwnut7wiiTe8PsG+MaQzOnuoJiVAPoiSoafwU+4mzel4QkiatHvBukjxl235LdZceSLvUoLfCVRs8TWWcUBpUZbCdGGI7pKtJXV+c=
You're right, the later is more likely to break. It all depends which part of your term are inferred with backtracking and which are printed. We should have infer(print_all t) = t now that universes and existentials can be parsed back. I explained myself poorly, what I wanted to convey is that this opened even more ways for ambiguity, although with type classes and the like you can already be quite ambiguous. You're right that the first solution should stay the same.
Cheers,
-- Matthieu
Le mer. 16 mars 2016 à 20:36, Arnaud Spiwack <aspiwack AT lix.polytechnique.fr> a écrit :
Usually one wants some control on what is produced, and the current type inferenceprovides some, with the (informal) guarantee that print(infer(t)) = t. This determinismcan go away as soon as proof search is involved though, through type classes forexample, and means to ensure that this search is predictable are useful too.We'd rather like infer(print(t)) = t, I suppose. Neither are true in Coq, I don't know which is less true. I don't see how non-determinism affects print(infer(t)) = t. It may affect infer(print(t))=t, but let's keep in mind that, in most cases, a backtracking pretyper would return the first solution, which would be the same as a non-backtracking one. Also, we can already simulate non-determinism by specifying implicit arguments to values which are not found by the pretyper. In theory at least, the situation would not be significantly worse than today. Of course, in practice it may feel rather unpleasant, I don't know.
- Re: [Coq-Club] multiple typeclass instance question, (continued)
- Re: [Coq-Club] multiple typeclass instance question, Arnaud Spiwack, 03/11/2016
- Re: [Coq-Club] multiple typeclass instance question, Jonathan Leivent, 03/11/2016
- Re: [Coq-Club] multiple typeclass instance question, Pierre-Marie Pédrot, 03/12/2016
- Re: [Coq-Club] multiple typeclass instance question, Arnaud Spiwack, 03/13/2016
- Re: [Coq-Club] multiple typeclass instance question, Jonathan Leivent, 03/13/2016
- Re: [Coq-Club] multiple typeclass instance question, Arnaud Spiwack, 03/15/2016
- Re: [Coq-Club] multiple typeclass instance question, Matthieu Sozeau, 03/15/2016
- Re: [Coq-Club] multiple typeclass instance question, Jonathan Leivent, 03/15/2016
- Re: [Coq-Club] multiple typeclass instance question, Matthieu Sozeau, 03/15/2016
- Re: [Coq-Club] multiple typeclass instance question, Arnaud Spiwack, 03/16/2016
- Re: [Coq-Club] multiple typeclass instance question, Matthieu Sozeau, 03/16/2016
- Re: [Coq-Club] multiple typeclass instance question, Arnaud Spiwack, 03/13/2016
- Re: [Coq-Club] multiple typeclass instance question, Arnaud Spiwack, 03/16/2016
- Re: [Coq-Club] multiple typeclass instance question, Arnaud Spiwack, 03/11/2016
Archive powered by MHonArc 2.6.18.