Sunday, April 03, 2011

Yhc is dead

Someone recently asked on the Yhc mailing list if Yhc was dead. The answer is yes, noone has been working on the compiler for several years. The nhc98 compiler, from which Yhc originally forked, is still maintained. Since this is the end of Yhc, I thought I'd share a few random thoughts about Yhc:


  • Writing a Haskell compiler is a big undertaking, and the work required to compile a moderate number of programs from Hackage is immense. Too many libraries rely on something GHC specific - either language or runtime features. The GHC team have gone out of their way to ensure that their compiler is by default a standard Haskell compiler, which has kept Haskell as a viable language separate from GHC. But without widely-used competing implementations, programs tend to end up depending on GHC.

  • There are still other non-GHC Haskell compilers, and I wish them all well. Many offer features missing in GHC (compile to Javascript, tiny runtime system, extreme portability, code mobility etc.) - there are lots of interesting ideas floating around.

  • Yhc started in a fairly haphazard way, and became a fork of nhc long before anyone had noticed. Had Yhc's contributions been rolled back into nhc they'd probably have had more lasting impact.

  • One of the big draws for Yhc was it's ability to take a Haskell program, and produce a Core complete program. Despite all of Yhc's other weaknesses, Yhc Core drew several people to the project - I hope something equivalent appears for other Haskell compilers.

  • If you don't understand monads, you aren't yet ready to write a Haskell compiler.

  • If you have a group of Haskell programmers in the same place, you should try a group project. It's fun.

  • The biggest challenge for Yhc was the build system - we ended up with 10,000 lines of Python Scons scripts. Without a robust build system nothing else matters. When our sole Python hacker left the team that was the beginning of the end.



Working on Yhc was fun, and I learned a lot. Thanks to everyone who was involved.

3 Comments:

Blogger malcolm said...

I guess it is stretching a point to say that nhc98 is still alive. Basically, no-one is working on it either.

8:30 PM  
Blogger Mike Meyer said...

I'd like to know if any of the other haskell compilers (either alive or dead) can compile to java bytecodes?

8:59 PM  
Blogger Neil Mitchell said...

Malcolm: I modified it to say maintained, instead of alive.

9:54 PM  

Post a Comment

<< Home