It depends on which implementation you have. hmake is good, and is independent of implementation. ghc 5.0 has a make system built in, so you can say ghc --make Main to build your program. Or ghc --interactive Main to run it interactively. Hugs also follows module dependencies automatically. hbc had a similar mechanism I think. Simon | -----Original Message----- | From: Steinitz, Dominic J | [mailto:Dominic.J.Steinitz@BritishAirways.com] | Sent: 24 May 2001 10:46 | To: haskell | Subject: Building Programs | | | What's the recommended way of building a system consisting of | many Haskell modules? Should I use hmake, make or is there | some other preferred mechanism in the Haskell world? | | Dominic. | | -------------------------------------------------------------- | ----------------------------------- | 21st century air travel http://www.britishairways.com | | _______________________________________________ | Haskell mailing list | Haskell@haskell.org http://www.haskell.org/mailman/listinfo/haskell |
What's the recommended way of building a system consisting of many Haskell modules? Should I use hmake, make or is there some other preferred mechanism in the Haskell world?
As Simon PJ already mentioned, hmake is entirely platform independent, so if there is any likelihood that you may need to change between Haskell compilers, or to distribute your software in a portable source form, it is probably the top option. But for quick hacking, or non-portable software using language extensions, individual compiler mechanisms such as Hugs' import chasing, ghc --make, and hbcmake, are just as good. Writing Makefiles is the least attractive option, even though they have good portability, because they are clunky and it is tricky to keep them synchronised with the true source dependencies. However, I think even when using hmake or ghc --make, you are likely to end up writing a small and simple Makefile anyway. Regards, Malcolm
participants (2)
-
Malcolm Wallace -
Simon Peyton-Jones