Am Freitag, 28. November 2003 08:49 schrieb John Meacham: > [...] > I also have wondered how much the string representation hurts haskell > program performance.. Something I'd like to see (perhaps a bit less drastic) > would be a String class, similar to Num so string constants would have type > String a => a > then we can make [Char], PackedString, and whatnot instances. It should at > least make working with alternate string representations easier.
I think, I have already said the following on this list. I would also like to have different character types for different subsets of Char (e.g., ASCII) and a class Character which the different character types are instances of. You could combine this idea with the string class idea in the following way: class Character c => String s c | s -> c where [...] instance Character c => String [c] c where [...] instance String PackedString Char where [...] instance String PackedASCIIString ASCIIChar where [...] > John Wolfgang _______________________________________________ Haskell mailing list [EMAIL PROTECTED] http://www.haskell.org/mailman/listinfo/haskell