On 2 May 2015 at 13:28, Matt Oliveri <atma...@gmail.com> wrote: > On Fri, May 1, 2015 at 10:42 AM, Keean Schupke <ke...@fry-it.com> wrote: > > On 1 May 2015 at 15:30, Matt Oliveri <atma...@gmail.com> wrote: > >> The one and only problem with instance arguments, I gather, is that > >> instances are not guaranteed to be coherent. > > > > I don't see this at all. Instances available for implicit resolution > have to > > be coherent., however you could still pass explicit instances. > > But what enforces the coherence? And why doesn't it rule out the > ability to explicitly pass other instances? My understanding is that > coherence implies that the program can use only one instance of a > given typeclass for a given argument vector. So it makes no sense to > pass an instance explicitly; there's only one choice. If there are > multiple choices, you don't have coherence. Please, someone correct me > if I understood it wrong; I am new to typeclasses. >
While you're technically correct (the best kind of correct), I started this thread suggesting a way to gain coherence for the /inferrable/ subset of implicits, which are the ones that matter for coherence. So it's no longer a global property. How to enforce that is an interesting question, involving more than an injectivity check. But for that I'll need to build a model. -- William Leslie Notice: Likely much of this email is, by the nature of copyright, covered under copyright law. You absolutely MAY reproduce any part of it in accordance with the copyright law of the nation you are reading this in. Any attempt to DENY YOU THOSE RIGHTS would be illegal without prior contractual agreement.
_______________________________________________ bitc-dev mailing list bitc-dev@coyotos.org http://www.coyotos.org/mailman/listinfo/bitc-dev