[Haskell-cafe] Re: nhc vs ghc

2007-11-24 Thread apfelmus

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

___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


Re: [Haskell-cafe] Re: nhc vs ghc

2007-11-24 Thread Neil Mitchell
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
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


Re: [Haskell-cafe] Re: nhc vs ghc

2007-11-24 Thread Neil Mitchell
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
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


Re: [Haskell-cafe] Re: nhc vs ghc

2007-11-24 Thread Stefan O'Rear
On Sat, Nov 24, 2007 at 10:44:45AM +, 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


signature.asc
Description: Digital signature
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe