From: simonmar Date: Thu, 26 Aug 2004 08:48:25 +0000 (+0000) Subject: [project @ 2004-08-26 08:48:25 by simonmar] X-Git-Tag: Initial_conversion_from_CVS_complete~1683 X-Git-Url: http://git.megacz.com/?a=commitdiff_plain;h=4ec24c11f1ec4b2d92b9c32947cddde01660242e;p=ghc-hetmet.git [project @ 2004-08-26 08:48:25 by simonmar] Add the :def . readFile example. --- diff --git a/ghc/docs/users_guide/ghci.xml b/ghc/docs/users_guide/ghci.xml index 374b28c..fcdf986 100644 --- a/ghc/docs/users_guide/ghci.xml +++ b/ghc/docs/users_guide/ghci.xml @@ -906,6 +906,19 @@ Prelude> :mycd .. Prelude> :def make (\_ -> return ":! ghc ––make Main") + We can define a command that reads GHCi input from a + file. This might be useful for creating a set of bindings + that we want to repeatedly load into the GHCi session: + + +Prelude> :def . readFile +Prelude> :. cmds.ghci + + + Notice that we named the command + :., by analogy with the + ‘.’ Unix shell command that + does the same thing.