On Thu, 09 Apr 2009 15:44:42 +0200, Paul Keir <pk...@dcs.gla.ac.uk> wrote:

Hi all,

I like to use ghci *.hs to start my session, but I then have to type :m +Main to bring the Main module into scope. Is there a command-line switch to control
which modules are initially in scope with ghci?

Thanks,
Paul

You only have load the main module like this:
  ghci Main.lhs

(the name doesn't have to be Main.lhs or Main.hs), the rest follows automatically, provided the imported modules start with a line like:

module ImportModule2 where

It is also possible to run the program immediately with the command:
  runhaskell Main.lhs

--
Regards,
Henk-Jan van Tuyl


--
http://functor.bamikanarie.com
http://Van.Tuyl.eu/
--


_______________________________________________
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe

Reply via email to