
9 Apr
2009
9 Apr
'09
4:12 p.m.
On Thu, 09 Apr 2009 15:44:42 +0200, Paul Keir
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/ --