On Wed, 2008-03-12 at 18:17 -0400, Swaroop Sridhar wrote: > So, are you suggesting that if we write (by-ref 'a), where 'a cannot > unify with a mutable type? This cannot be the case since the type > variable must be able to unify with any type. > > Prof. Shapiro suggested introducing a notion of (immutable t) as a type. > So, we can write (fn ((by-ref (immutable 'a))) ()) to represent a > function that only accepts a immutable by-reference argument.
A type system that has all of IMMUTABLE, MUTABLE, and parametric types runs into convergence problems. What we *could* do (Swaroop and I discussed this offline today) is introduce (IMMUTABLE 'a) where the argument to immutable can only be a type variable, with the meaning "'a cannot unify with a mutable type". In the absence of BY-REF, it's a non issue, since the external types of function parameters are all immutable in any case. Having concluded that we could introduce (IMMUTABLE 'a), I'm content to reserve the IMMUTABLE keyword but defer the issue for now. shap _______________________________________________ bitc-dev mailing list bitc-dev@coyotos.org http://www.coyotos.org/mailman/listinfo/bitc-dev