[Haskell] Re: ANNOUNCE: FPS - FastPackedStrings 0.2

2006-04-20 Thread Ashley Yakeley
Tomasz Zielonka wrote: I think the biggest barrier to using Word8 operations on String-like types is the Read/Show instance for Word8, which works like for other Word types: Prelude Data.Word> map (toEnum . fromEnum) "Haskell" :: [Word8] [72,97,115,107,101,108,108] But FastPackedString is

[Haskell] Re: ANNOUNCE: FPS - FastPackedStrings 0.2

2006-04-20 Thread Ashley Yakeley
John Meacham wrote: Confusion of Char and Word8 is a bit of a pet peeve of mine. It is a huge pet peeve of mine too. perhaps this library should be renamed 'FastByteArray' instead? which is a very useful datatype too. I agree. I would rename it and also use solely Word8-based functions. -

Re: [Haskell] Re: ANNOUNCE: FPS - FastPackedStrings 0.2

2006-04-20 Thread Tomasz Zielonka
On Thu, Apr 20, 2006 at 10:32:37AM +1000, Donald Bruce Stewart wrote: > ashley: > > Donald Bruce Stewart wrote: > > > > >Interface: > > >http://www.cse.unsw.edu.au/~dons/fps/Data.FastPackedString.html > > > > Given that FastString turns out to be an array of Word8, why are you using >

Re: [Haskell] Re: ANNOUNCE: FPS - FastPackedStrings 0.2

2006-04-19 Thread John Meacham
On Wed, Apr 19, 2006 at 05:24:52PM -0700, Ashley Yakeley wrote: > Donald Bruce Stewart wrote: > > >Interface: > >http://www.cse.unsw.edu.au/~dons/fps/Data.FastPackedString.html > > I'm bothered that some of the functions work with Word8, and others with > the utterly unrelated type Ch

Re: [Haskell] Re: ANNOUNCE: FPS - FastPackedStrings 0.2

2006-04-19 Thread Donald Bruce Stewart
ashley: > Donald Bruce Stewart wrote: > > >Interface: > >http://www.cse.unsw.edu.au/~dons/fps/Data.FastPackedString.html > > Given that FastString turns out to be an array of Word8, why are you using > Char at all? Convenience. Some historical legacy from darcs. And others have contr

[Haskell] Re: ANNOUNCE: FPS - FastPackedStrings 0.2

2006-04-19 Thread Ashley Yakeley
Donald Bruce Stewart wrote: Interface: http://www.cse.unsw.edu.au/~dons/fps/Data.FastPackedString.html I'm bothered that some of the functions work with Word8, and others with the utterly unrelated type Char. Which encoding are you implicitly using, and why? Given that FastString turns