[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Bug#696429: ITP: jhc -- a haskell compiler.

Hi Joachim,

On Fri, Dec 21, 2012 at 7:01 AM, Joachim Breitner <nomeata@debian.org> wrote:
> just wondering: Is jhc in a state where it is a useful tool (and not
> “just” an interesting and worthwhile research undertaking)? How actively
> is it maintained (last commit is 9 month ago)?

Jhs is useful for me, now.
I am trying to rewrite NetBSD bootloader with Haskell.


GHC cannot it, because GHC produces BIG execute binary and has many
depending on libraries. Please see below.

$ cat Fib.hs
fibonacci :: [Int]
fibonacci = 1:1:zipWith (+) fibonacci (tail fibonacci)
main :: IO ()
main = print $ take 40 fibonacci
$ ghc -o Fib_ghc Fib.hs
$ jhc -o Fib_jhc Fib.hs
$ size Fib_ghc Fib_jhc
   text    data     bss     dec     hex filename
 705068   38536   46776  790380   c0f6c Fib_ghc
  15808    1300     744   17852    45bc Fib_jhc
$ ldd Fib_ghc Fib_jhc
        linux-vdso.so.1 (0x00007fff87bff000)
        libgmp.so.10 => /usr/lib/x86_64-linux-gnu/libgmp.so.10
        libffi.so.5 => /usr/lib/x86_64-linux-gnu/libffi.so.5
        libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x00007f0893c26000)
        librt.so.1 => /lib/x86_64-linux-gnu/librt.so.1 (0x00007f0893a1e000)
        libdl.so.2 => /lib/x86_64-linux-gnu/libdl.so.2 (0x00007f089381a000)
        libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007f0893471000)
        libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0
        /lib64/ld-linux-x86-64.so.2 (0x00007f08943d5000)
        linux-vdso.so.1 (0x00007fff179d5000)
        libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007fc2a4193000)
        /lib64/ld-linux-x86-64.so.2 (0x00007fc2a4573000)

And jhc's -C option produces portable C language file. It's useful
with custom RTS.

Kiwamu Okabe

Reply to: