Something minor that we missed was the need for closed type classes -- or at least type classes where the user cannot add new instances. A good example is the IntLit class.
We're contemplating fixing this by allowing DEFINSTANCE forms to appear at the end of the type class definition, e.g.: (deftypeclass (IntLit 'a) (definstance (IntLit int8)) ...) The presence of an instance within the deftypeclass form indicates that the type class is closed. This does not preclude "magic" type classes where the *compiler* is free to add instances, such as HAS-FIELD. In fact, HAS-FIELD illustrates why this proposal is inadequate, because there is no straightforward instance to add in that case. We may need to support a (declare closed) form of some sort, but that's not a big deal. shap
_______________________________________________ bitc-dev mailing list [email protected] http://www.coyotos.org/mailman/listinfo/bitc-dev
