[Haskell-cafe] Re: Does ghc use Language.Haskell.*?

Duncan Coutts duncan.coutts at worc.ox.ac.uk
Wed Dec 10 07:25:15 EST 2008

On Wed, 2008-12-10 at 09:32 -0200, Mauricio wrote:
> >> Why can ghc read the program, but not the standard
> >> library parser? Does ghc use something else?
> >> Is it possible to use whatever ghc uses to build
> >> a prettyprinter?
> > 
> > Language.Haskell is known to be incomplete.  The haskell-src-exts 
> > package on http://hackage.haskell.org will be more useful.
> > 
> Haskell-src-exts understands mode features, but I
> just tried using it and it seems it's also not
> Unicode aware.

I'm just guessing here but I expect that haskell-src and
haskell-src-exts are unicode aware but that you're using something like
readFile to read your UTF-8 .hs file. The readFile function (currently)
only reads text files in latin-1, not UTF-8. Try using the utf8-string
package and the System.IO.UTF8.readFile function instead.


More information about the Haskell-Cafe mailing list