[Haskell-cafe] Type classes for converting to Text and String

Simon Hengel sol at typeful.net
Thu Mar 8 12:59:56 CET 2012


On Thu, Mar 08, 2012 at 12:37:31PM +0100, Yves Parès wrote:
> If you just need to go back and forth from String to Text, why do you need
> to be generic? pack and unpack from Data.Text do the job.

Always going through String or Text may (depending on what your
underlying representation is) be less efficient than converting directly
to String/Text.

Cheers,
Simon



More information about the Haskell-Cafe mailing list