
can anyone provide a concise list of the major differences between nhc98 and ghc? for example, can i build a cabal package with nhc98? i get that ghc and nhc98 are not interchangeable, otherwise i am not sure thanks

brad clawsie wrote:
can anyone provide a concise list of the major differences between nhc98 and ghc? for example, can i build a cabal package with nhc98? i get that ghc and nhc98 are not interchangeable, otherwise i am not sure
The major difference is that nhc98 is pretty much Haskell98 only, so no multi parameter type classes, rank-n-polymorphism or GADTs. It does support existential types, though. In particular, the popular monad transformer library isn't Haskell98, at least concerning the type classes. Regards, apfelmus

Hi
can anyone provide a concise list of the major differences between nhc98 and ghc? for example, can i build a cabal package with nhc98? i get that ghc and nhc98 are not interchangeable, otherwise i am not sure
The other major differences: * nhc is unavailable on Windows * nhc programs run much slower * nhc has fewer users and fewer developers, meaning more bugs Thanks Neil

Neil Mitchell answers:
can anyone provide a concise list of the major differences between nhc98 and ghc? for example, can i build a cabal package with nhc98? i get that ghc and nhc98 are not interchangeable, otherwise i am not sure
The other major differences:
(1)* nhc is unavailable on Windows (2)* nhc programs run much slower (3)* nhc has fewer users and fewer developers, meaning more bugs
It would be preposterous to replace the Authors, who maight give a *serious* answer to this question, but: 1. It IS available on Windows. 2. Since it is interpreted, you should compare it with GHCi, not with compiled programs. The comparison is NOT BAD. 3. Premises correct, conclusion speculative. Probable, but when you *accuse* somebody, then *prove* it. Jerzy Karczmarczuk (who has nothing to do with nhc, but who respects enormously this effort)

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

On Sat, Nov 24, 2007 at 10:44:45AM +0000, Neil Mitchell wrote:
Hi
can anyone provide a concise list of the major differences between nhc98 and ghc? for example, can i build a cabal package with nhc98? i get that ghc and nhc98 are not interchangeable, otherwise i am not sure
The other major differences:
* nhc is unavailable on Windows * nhc programs run much slower * nhc has fewer users and fewer developers, meaning more bugs
There are also a few advantages: * It was written on an Acorn A4000, an 80s-era PC with a whopping 3MB of memory; as such it is much more memory-friendly than GHC, which at the time wanted 16MB for normal use. * It's unrelated to GHC, which means that the set of bugs are uncorrelated. If you think GHC is doing something wrong, ask NHC for a second opinion. * It's much easier to port than GHC. (And an important disadvantage - The original author of NHC, Niklaus Röjemo, has disappeared off the face of the Internet, and the acting maintainer doesn't actually grok most of the code.) Stefan

Niklas has not disappeared at all. He can be reached at niklas@rojemo.net,
but he's not maintaining nhc.
-- Lennart
On Nov 24, 2007 5:48 PM, Stefan O'Rear
On Sat, Nov 24, 2007 at 10:44:45AM +0000, Neil Mitchell wrote:
Hi
can anyone provide a concise list of the major differences between nhc98 and ghc? for example, can i build a cabal package with nhc98? i get that ghc and nhc98 are not interchangeable, otherwise i am not sure
The other major differences:
* nhc is unavailable on Windows * nhc programs run much slower * nhc has fewer users and fewer developers, meaning more bugs
There are also a few advantages:
* It was written on an Acorn A4000, an 80s-era PC with a whopping 3MB of memory; as such it is much more memory-friendly than GHC, which at the time wanted 16MB for normal use.
* It's unrelated to GHC, which means that the set of bugs are uncorrelated. If you think GHC is doing something wrong, ask NHC for a second opinion.
* It's much easier to port than GHC.
(And an important disadvantage - The original author of NHC, Niklaus Röjemo, has disappeared off the face of the Internet, and the acting maintainer doesn't actually grok most of the code.)
Stefan
-----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.6 (GNU/Linux)
iD8DBQFHSGQJFBz7OZ2P+dIRAktsAJ4sqzHDuIEXS3tinXKVaOmLxcM4+wCfSfts iHmRIaQ1SQ119S4S+Qg5Zj0= =OhOW -----END PGP SIGNATURE-----
_______________________________________________ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

On Fri, 2007-11-23 at 23:33 -0800, brad clawsie wrote:
for example, can i build a cabal package with nhc98?
As of yesterday the answer is yes! (probably) :-) I'm glad you asked about building and not installing since the answer to that question would be no. Support in Cabal for building with nhc98 and hmake was added yesterday. I expect support for installing will be added soon. Duncan
participants (7)
-
apfelmus
-
brad clawsie
-
Duncan Coutts
-
jerzy.karczmarczuk@info.unicaen.fr
-
Lennart Augustsson
-
Neil Mitchell
-
Stefan O'Rear