(Initial page (stub))
Latest revision as of 20:38, 2 March 2014
This article is a stub. You can help by expanding it.
There are several types of strings that can be used in Haskell programs.
 1 String
- conceptually simple and easy to use
- interfaces well with other list functions
- massive overhead, up to 4 words per character, which also has speed implications
- not pedantically Unicode-correct in some cases (e.g. there are strings which change length when changing case, so is not accurate in that case)map toLower
 2 ByteString
Bytestrings are sequences of bytes not characters, and aren't really a text type at all. They are best used for binary data.
They are low-overhead in space terms and very heavily optimised – they are a key part of writing high-performance code in Haskell.
 2.1 Data.ByteString.Char8
 3 TextFor a more efficient processing of text, there is
 3.1 Lazy Text
 3.2 Strict Text
 4 Links
- string-conversions; this package provides a simple type class for converting values of different string types into values of other string types.