From 4ec24c11f1ec4b2d92b9c32947cddde01660242e Mon Sep 17 00:00:00 2001 From: simonmar Date: Thu, 26 Aug 2004 08:48:25 +0000 Subject: [PATCH] [project @ 2004-08-26 08:48:25 by simonmar] Add the :def . readFile example. --- ghc/docs/users_guide/ghci.xml | 13 +++++++++++++ 1 file changed, 13 insertions(+) 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. -- 1.7.10.4