[nhc-bugs] cpphs and hugs

Ian Lynagh igloo at earth.li
Tue Nov 28 11:50:22 EST 2006


Hi,

With cpphs 0.7 "compiled" with hugs I get the following when trying to
haddock missingh:

--------------
missingh-0.16.2$ /usr/bin/cpphs -Obar.hs MissingH/Time/ParseDate.hs --noline --strip -Dlinux_BUILD_OS -Dlinux_HOST_OS -Di386_BUILD_ARCH -Di386_HOST_ARCH -D__GLASGOW_HASKELL__=606 -D__HADDOCK__

Program error: <handle>: IO.getContents: protocol error (invalid character encoding)
missingh-0.16.2$
--------------

I believe this is because there is a mismatch between my locale and the
encoding of the file, in particular with the \"o in Bjorn Bringert's
name. I think opening the file in binary mode would fix this, but I
couldn't swear to it.

I tried upgrading to 1.2 to see if it is fixed, and trying to haddock
missingh then gave an almighty pattern match failure. A somewhat smaller
failure occurs when trying to process /dev/null:

--------------
$ /tmp/cpphs/inst/bin/cpphs /dev/null

Program error: pattern match failure: macroProcess ((instEq_v4051 `elem` CpphsOption_CpphsLayout) []) Bool_True (preDefine ((instEq_v4051 `elem` CpphsOption_CpphsAnsi) []) Bool_True (runCpphs_v4067 [])) (tokenise_v3906 ((instEq_v4051 `elem` CpphsOption_CpphsAnsi) []) ((instEq_v4051 `elem` CpphsOption_CpphsStrip) []) SubMode_Any)
$
--------------

cpphs compiled with GHC seems fine.


Thanks
Ian



More information about the Nhc-bugs mailing list