[Haskell-cafe] hoogle command line program on Linux

Erik de Castro Lopo mle+hs at mega-nerd.com
Sun Jan 9 06:07:37 CET 2011

Hi all,

I'm testing out hoogle 4.1.2 on Debian Linux and getting the
following when trying to update the local hoogle databases:

    erik > sudo hoogle data
    Starting default
    Starting keyword
    hoogle: keyword.txt: commitAndReleaseBuffer: invalid argument
    (Invalid or incomplete multibyte or wide character)

My LANG related envorinment variables are set as follows:

    erik > env | grep LANG

When faced with a similar problem while working on Ben Lippmeier's
compiler, I fixed this by replacing all instances of readFile with
readUtf8File which is defined as:

    readUtf8File :: FilePath -> IO String
    readUtf8File filePath
     = do   h <- openFile filePath ReadMode
            hSetEncoding h utf8
            hSetEncoding stdout utf8
            hGetContents h

Is it possible to fix this without hacking the hoogles sources?
I'd like to package hoogle for Debian, but first I need to get
it working.

Erik de Castro Lopo

More information about the Haskell-Cafe mailing list