[Haskell-cafe] FastString a misnomer

Donald Bruce Stewart dons at cse.unsw.edu.au
Thu Oct 20 21:52:32 EDT 2005

> On Thu, Oct 20, 2005 at 10:45:28AM +0100, Simon Marlow wrote:
> > I think when this is ready it should replace Data.PackedString.
> > 
> > I don't necessarily mean put it into fptools/libraries/base - we could
> > just remove the existing Data.PackedString from there and your separate
> > package can provide Data.PackedString.  That is, unless we decide to use
> > it in GHC in some way, in which case we'll have to pull (a copy of) it
> > into fptools/libraries.
> We should make 'PackedString' the UTF8 wrapper though and provide
> Data.ByteArray as a separate library. If it has string in the name, one
> should be able to replace strings with it everywhere and expect the
> right thing to happen as enforced by the type system. that and C's
> conflation of characters and bytes and Haskell 98s lack of clearing up
> the issue has been a huge pet peeve of mine.

Ok, so a rough structure of the final lib would be:

    Data                Data                   System
    |                   |                      |
    ByteArray (?)       PackedString           Posix
                        |      |               |
                        UTF8   Latin1 ...      MMap (providing mmapFile :: FilePath -> ByteArray)

-- Don

More information about the Haskell-Cafe mailing list