[Haskell-cafe] GHC rendering of non-ASCII characters configurable?

Richard Cobbe cobbe at ccs.neu.edu
Wed Aug 1 02:35:04 CEST 2012

On Tue, Jul 31, 2012 at 09:17:34PM +1000, Ivan Lazar Miljenovic wrote:
> On 31 July 2012 21:01, Richard Cobbe <cobbe at ccs.neu.edu> 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- ... linking ... done.
    Loading package bytestring- ... linking ... done.
    Loading package deepseq- ... linking ... done.
    Loading package text- ... linking ... done.
    Prelude Data.Text> pack "\x1f01"


More information about the Haskell-Cafe mailing list