From: simonmar Date: Fri, 16 Aug 2002 09:36:36 +0000 (+0000) Subject: [project @ 2002-08-16 09:36:36 by simonmar] X-Git-Tag: Approx_11550_changesets_converted~1765 X-Git-Url: http://git.megacz.com/?a=commitdiff_plain;h=1f35e3ac4ac5b74cdeb30058bc01ab36766b25c8;p=ghc-hetmet.git [project @ 2002-08-16 09:36:36 by simonmar] Be a bit clearer about the current directory when GHCi is started, and mention that you might have to ':cd' to the right place before you can load something. --- diff --git a/ghc/docs/users_guide/ghci.sgml b/ghc/docs/users_guide/ghci.sgml index 0919b20..54952ec 100644 --- a/ghc/docs/users_guide/ghci.sgml +++ b/ghc/docs/users_guide/ghci.sgml @@ -102,8 +102,7 @@ Prelude> Loading source files Suppose we have the following Haskell source code, which we - place in a file Main.hs in the current - directory: + place in a file Main.hs: main = print (fac 20) @@ -112,6 +111,24 @@ fac 0 = 1 fac n = n * fac (n-1) + You can save Main.hs anywhere you like, + but if you save it somewhere other than the current + directoryIf you started up GHCi from the command + line then GHCi's current directory is the same as the current + directory of the shell from which it was started. If you started + GHCi from the “Start” menu in Windows, then the + current directory is probably something like + C:\Documents and Settings\user + name. then we will + need to change to the right directory in GHCi: + + +Prelude> :cd dir + + + where dir is the directory (or + folder) in which you saved Main.hs. + To load a Haskell source file into GHCi, use the :load command: :load