
On Tue, Jul 31, 2012 at 09:17:34PM +1000, Ivan Lazar Miljenovic wrote:
On 31 July 2012 21:01, Richard Cobbe
wrote: On Mon, Jul 30, 2012 at 11:45:38PM +1000, Ivan Lazar Miljenovic wrote:
Can I ask what you're doing here? Are you printing individual characters or entire chunks of text?
Mostly, I'm working with expressions of type String, rather than Text;
Any particular reason why? Using Text will probably solve your problem and give you a performance improvement at the same time.
Well, I initially went with String because I didn't want to clutter up my code with all of the calls to 'pack', especially around string literals. I'm open to being convinced that it's worth it to switch, though. In any case, while Text is undoubtedly faster than String, it unfortunately doesn't solve my problem with output rendering: [vimes:~]$ ghci GHCi, version 7.4.1: http://www.haskell.org/ghc/ :? for help Loading package ghc-prim ... linking ... done. Loading package integer-gmp ... linking ... done. Loading package base ... linking ... done. Prelude> :m +Data.Text Prelude Data.Text> pack "\x1f00" Loading package array-0.4.0.0 ... linking ... done. Loading package bytestring-0.9.2.1 ... linking ... done. Loading package deepseq-1.3.0.0 ... linking ... done. Loading package text-0.11.2.0 ... linking ... done. "\7936" Prelude Data.Text> pack "\x1f01" "\7937" Richard