Tommy Thorn says:
> Even when taking the simple example from my previous^2 post
>
> ghc -c Add.hs
> ghc -c Main.hs
> ghc -o Main Main.o Add.o
Actually, you can do this in one:
ghc Add.hs Main.hs -o Main
> we notice that it takes three commands, in the right order, each with
> a non optional flag.
The -o flag is optional, you can say
ghc Add.hs Main.hs
and the binary ends up in 'a.out'. Granted, the default binary name is a
bit weird, but it's traditional :)
> There is nothing present here that couldn't be
> deducted directly from the contents of `Main.hs', thus a simple `ghc'
> (or `ghc Main' assuming my first plea) command should have sufficed.
>
> Now granted the three commands above isn't exactly rocket science and
> anyone with a little exposure to `C' (God forbid) would immediately
> feel at home. Only, this naive interface only brings the deficiencies
> of C to the complexity of a type checked module based language.
> Maintaining dependencies with makefiles is both hairy and error prone.
> There exists scripts like `ghcmake', but that's only patching a rotten
> foundation and cracks are quick to surface (try anything non trivial,
> like using multiple directories).
It's quite trivial to extend ghcmake to deal with multiple directories. I
don't think there's a fundamental problem here, except for the lack of a
fully-featured Haskell IDE, and so far no-one has had the time or motivation
to write one (hint :-).
Cheers,
Simon