Fri Jan 18 22:09:07 PST 2008  alexander.dunlap@gmail.com
  * GHC Trac 2050: Added persistant history tracking
diff -rN -u old-ghc/compiler/ghci/InteractiveUI.hs new-ghc/compiler/ghci/InteractiveUI.hs
--- old-ghc/compiler/ghci/InteractiveUI.hs	2008-01-18 22:11:01.000000000 -0800
+++ new-ghc/compiler/ghci/InteractiveUI.hs	2008-01-18 22:11:01.000000000 -0800
@@ -307,6 +307,8 @@
         is_tty <- hIsTerminalDevice stdin
         when is_tty $ do
             Readline.initialize
+            home <- getHomeDirectory
+            Readline.readHistory $ home ++ "/.ghci_history"
             Readline.setAttemptedCompletionFunction (Just completeWord)
             --Readline.parseAndBind "set show-all-if-ambiguous 1"
 
@@ -340,6 +342,8 @@
                  }
 
 #ifdef USE_READLINE
+   home <- getHomeDirectory
+   Readline.writeHistory (home ++ "/.ghci_history")
    Readline.resetTerminal Nothing
 #endif
 
@@ -377,7 +381,6 @@
                case either_hdl of
                   Left _e   -> return ()
                   Right hdl -> runCommands (fileLoop hdl False False)
-
   -- Perform a :load for files given on the GHCi command line
   -- When in -e mode, if the load fails then we want to stop
   -- immediately rather than going on to evaluate the expression.

