[Haskell-beginners] GHC-generated executables size

David Virebayre dav.vire+haskell at gmail.com
Tue Oct 19 07:23:40 EDT 2010


2010/10/17 Daniel Fischer <daniel.is.fischer at web.de>:

> $ cat helloWorld.hs
> module Main (main) where
>
> main :: IO ()
> main = putStrLn "Hello, World!"
> $ ghc --make helloWorld.hs
> [1 of 1] Compiling Main             ( helloWorld.hs, helloWorld.o )
> Linking helloWorld ...
> $ ls -l helloWorld
> -rwxr-xr-x 1 dafis users 618581 17. Okt 13:53 helloWorld

jhc makes remarkably small executables, this example takes 11268
bytes, 5756 when stripped.

Sad that many libraries, and  gtk2hs don't work with it.

David.


More information about the Beginners mailing list