From: simonmar Date: Fri, 27 Apr 2001 08:50:59 +0000 (+0000) Subject: [project @ 2001-04-27 08:50:59 by simonmar] X-Git-Tag: Approximately_9120_patches~2091 X-Git-Url: http://git.megacz.com/?a=commitdiff_plain;h=fdbdaeceab5cb254c866989c6b67eaf1dc2a45e5;p=ghc-hetmet.git [project @ 2001-04-27 08:50:59 by simonmar] add a note about requiring 'main' to be defined in module 'Main'. --- diff --git a/ghc/docs/users_guide/ghci.sgml b/ghc/docs/users_guide/ghci.sgml index 55e09bb..3f8783f 100644 --- a/ghc/docs/users_guide/ghci.sgml +++ b/ghc/docs/users_guide/ghci.sgml @@ -927,6 +927,21 @@ Prelude> :set -fno-glasgow-exts + GHCi complains about main not being + in scope when I load a module. + mainwith GHCi + + + You probably omitted the module + declaration at the top of the module, which causes the + module name to default to Main. In + Haskell, the Main module must define a + function called main. Admittedly this + doesn't make a great deal of sense for an interpreter, but + the rule was kept for compatibility with GHC. + + + System.exit causes GHCi to exit! System.exitin GHCi