Giuliano P Procida <[EMAIL PROTECTED]> asks:

> [Substring stuff snipped]
> Were you thinking of something like:
> 
> class Stringy foo where
>   toString :: foo -> String
>   someop :: foo -> foo -> foo
>   ...
> 
> and just use Stringy foo => foo instead of String everywhere?
> 
> Or just having a special type for fast string manipulation.

Just the latter: there's no reason to have multiple implementations 
that I can see.

> I would welcome either. However, there is a huge body of code that
> assumes strings are lists of chars.

Yes, obviously... this is for new programs (which people aren't writing 
because of Haskell's inefficiency in dealing with strings).

--KW 8-)



-- 
: Keith Wansbrough, MSc, BSc(Hons) (Auckland) ------------------------:
: PhD Student, Computer Laboratory, University of Cambridge, England. :
:  (and recently of the University of Glasgow, Scotland. [><] )       :
: Native of Antipodean Auckland, New Zealand: 174d47' E, 36d55' S.    :
: http://www.cl.cam.ac.uk/users/kw217/  mailto:[EMAIL PROTECTED]     :
:---------------------------------------------------------------------:




Reply via email to