smallstring-0.1.0: A string type optimized for size in memory



The SmallString type is for storing small identifiers. We do not provide fast operations on strings - what we offer is low memory overhead.

The Ord instance is not guaranteed to be the same as that of the corresponding string.



data SmallString Source

A space efficient representation of text. This is like a strict ByteString, but with fewer features, and UTF preserving. Fow ASCII data, we're slightly smaller than ByteStrings for small strings.

fromString :: String -> SmallStringSource

Convert a String into a SmallString.

toString :: SmallString -> StringSource

Convert a SmallString into a String.