Aside:

If we decide that something like union subtypes are useful, it's worth
noting that they seem to straddle the boundary between constraints and
[overlapping] subtypes. I suspect that we *really* don't want to treat
non-overlapping subtypes as subtypes in the inference engine (but I may be
wrong). What I'm wondering is this:

Given a declared single-variable type class "tc 'a", should we permit "tc"
to appear (syntactically) as a type name, where we understand

  x : tc

to mean

  x : (forall tc 'a => 'a)

Note: the intent of this is that 'a is a fresh type variable and the forall
is understood to reside in the appropriate quantification scope in spite of
appearing lexically in this position.

On the one hand, this would sure reinforce a bunch of my initial confusions
about type classes back when I was first getting used to them. On the
other, it sure seems like a useful convenience syntax in an awful lot of
situations.


shap
_______________________________________________
bitc-dev mailing list
bitc-dev@coyotos.org
http://www.coyotos.org/mailman/listinfo/bitc-dev

Reply via email to