[Haskell-cafe] Re: nhc vs ghc

Neil Mitchell ndmitchell at gmail.com
Sat Nov 24 07:27:55 EST 2007


Hi

> 1. It IS available on Windows.

Not without Mingw/Cygwin - which in my mind makes it not Windows
native. I also know that the release is made without testing on
Windows, and that certain related tools like hmake rely on shell
scripts. If there is someone using nhc seriously on Windows, it would
be good if they documented exactly what they needed to do, and ideally
supply a binary for the rest of the world.

> 2. Since it is interpreted, you should compare it with GHCi, not with
>   compiled programs. The comparison is NOT BAD.

Really? Do you have a benchmark for that? (sadly nobench is down at
the moment) Remember that GHCi does not interpret all code, but
actually has massive amounts of it compiled (all the base libraries
etc)

Also for most users this is an irrelevant distinction. The language
shootout does not benchmark Java against GHCi because both use
bytecode - they benchmark the speed the user sees at the end.

> 3. Premises correct, conclusion speculative. Probable, but when you
>   *accuse* somebody, then *prove* it.

To take a recent commit message:

 * Comment out incorrect kind inference.
 In fact, there is no kind inference at all - just an assignment of kinds
 to type variables, which turns out to be wrong of course.

There are plenty of bugs in nhc. You can't implement the Haskell 98
spec without kind inference, yet nhc (and Yhc) both lack it entirely.
There were about 3 changes required to XMonad to make one single
module compile with nhc.

Not all of these bugs are show stoppers, and its perfectly possible to
use it without running into a bug, but there are more out there, and
its more likely you'll run across one.

> (who has nothing to do with nhc, but who respects enormously this effort)

I also respect this effort as well! We need more compilers, and not
just toy compilers, but production compilers!

Thanks

Neil


More information about the Haskell-Cafe mailing list