[MLton-devel] new basis library

Stephen Weeks MLton@mlton.org
Wed, 24 Jul 2002 19:23:10 -0700


> I think that the opaque signature match on CharVector and String
> means that we can use a type-constrained instance of the Vector
> structure for CharVector;

I don't think so.  I see the following in the 02 spec:

structure CharVector :> MONO_VECTOR
  where type vector = String.string
  where type elem = Char.char

I think this means we must do what we do now, which is:

structure CharVector =
   struct
      open String0
      type vector = string
      type elem = char
   end

> but I don't know how that impacts the compiler's internal handling
> of strings, string constants, and ffi.

strings and char vectors are different types, but have the same
representation, so coercion between them is constant time (or even
free if the backend/codegen do the right thing).

> We'll also have to see how the rest of the SML community moves.  I
> like the opaque signature matches in the spec are good, but getting
> them right in the implementation will be tricky.

Hopefully my last email makes it simple! :-)


-------------------------------------------------------
This sf.net email is sponsored by: Jabber - The world's fastest growing 
real-time communications platform! Don't just IM. Build it in! 
http://www.jabber.com/osdn/xim
_______________________________________________
MLton-devel mailing list
MLton-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mlton-devel