From fdbdaeceab5cb254c866989c6b67eaf1dc2a45e5 Mon Sep 17 00:00:00 2001 From: simonmar Date: Fri, 27 Apr 2001 08:50:59 +0000 Subject: [PATCH] [project @ 2001-04-27 08:50:59 by simonmar] add a note about requiring 'main' to be defined in module 'Main'. --- ghc/docs/users_guide/ghci.sgml | 15 +++++++++++++++ 1 file changed, 15 insertions(+) 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 -- 1.7.10.4