Do you have an example for kind-classes?

Keean.

On 9 January 2015 at 07:46, Jonathan S. Shapiro <[email protected]> wrote:

> On Thu, Jan 8, 2015 at 11:26 PM, Keean Schupke <[email protected]> wrote:
>
>> The alternative here is to push int2 into a dynamic scoping stack for
>> this instance so it overrides int1. This is probably more useful as it
>> allows local changed to type-class resolution.
>>
> That was pretty much the intention of my original example, except I'm not
> sure why you say this is a *dynamic* scoping thing. My intent was that the
> "using" construct should operate on the instance environment in much the
> way that the "let" construct operates on the binding environment, and that
> instance resolution should proceed according to the customary lexical
> resolution rules by resolving required instances at the call site against
> the instance environment.
>
> But I'm still failing to see why this renders anything incoherent. An
> instance is acting here as something very like a type parameter to the
> called procedure. By virtue of its presence, it induces a type-driven
> specialization of the procedure that is called.
>
> At the tail end of your "record lifting" email you note that instances
> only have to be coherent where they are implicit. If so, then it sounds
> like we are in agreement that explicit instance overrides which induce
> quasitype-driven specialization do not entail any coherence problems. Are
> we?
>
> I do agree that records and type classes seem suspiciously similar, but I
> wonder how that intuition will hold up as we start talking about kind
> classes...
>
>
> shap
>
> _______________________________________________
> bitc-dev mailing list
> [email protected]
> http://www.coyotos.org/mailman/listinfo/bitc-dev
>
>
_______________________________________________
bitc-dev mailing list
[email protected]
http://www.coyotos.org/mailman/listinfo/bitc-dev

Reply via email to