[Haskell] Re: ANNOUNCE: The jhc Haskell compiler.

John Meacham john at repetae.net
Wed Apr 27 18:56:38 EDT 2005

On Wed, Apr 27, 2005 at 06:14:53PM +0200, Stephane Bortzmeyer wrote:
> On Tue, Apr 19, 2005 at 04:54:42AM -0700,
>  John Meacham <john at repetae.net> wrote 
>  a message of 375 lines which said:
> > There are still substantial issues which need to be overcome before
> > jhc can be used for general Haskell programing
> Do you plan to support ghc command-line flags? Because I tried to
> compile darcs with jhc and it failed because darcs' configure file
> uses specific flags:

It is unlikely it will ever be command-line compatable with ghc. For one
thing, ghc does not follow standard command line conventions and jhc
tries too, more importantly, their compilation models are pretty
different. Jhc does support the {-# JHC_OPTIONS ... #-} pragma though.
so if you put both a JHC_OPTIONS and a OPTIONS_GHC at the top of source
files then things should work fine.

for now, these are equivalent. 

ghc --make Main.hs -o foo
jhc Main.hs -o foo

jhc is effectivly always in --make mode. 

> checking for ghc... /home/bortzmeyer/tmp/jhc/jhc/jhc
> checking where GHC keeps its libraries... unrecognized option `--print-libdir'
> Usage: jhc [OPTION...] Main.hs
> Or should I ask darcs' maintainer to consider supporting jhc? (It is
> an issue I had when trying to maintain autoconf macros for Java: the
> language is standard, not the compilers' options.)

Unfortunatly, jhc is not yet good enough to compile darcs, darcs uses
some ghc extensions and libraries which jhc does not have and is quite a
large program. But once jhc is up to snuff, I hope to submit patches to
darcs to get it to work with jhc. There has been some talk on the darcs
list of getting darcs on platforms ghc doesn't yet support and jhc's
portable C output should be ideal for this problem.

> > * It takes ridiculous amounts of memory and CPU. A gigabyte of RAM
> > usage is not unheard of.
> Confirmed :-{

After the initial bootstrap of the libraries, future compiles will be
much faster. (but slower than ghc still) 

I recently added support for pre-built libraries so if a machine is not
powerful enough to bootstrap, you can just bring a prebuilt
prelude.hl from another machine and get going.


John Meacham - ⑆repetae.net⑆john⑈ 

More information about the Haskell mailing list