X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=ghc%2Fcompiler%2Fghci%2FInteractiveUI.hs;h=9d6f6a17d9e7df8ec2a8b9afaba1c9b385226ba8;hb=2ba5597f143dd581027ac4903b49d8cdd1cc25f2;hp=082d565901eb631a33144b1d30c9973dae0c88b9;hpb=13890651414e9288a83be70d95456f5eaa256aae;p=ghc-hetmet.git diff --git a/ghc/compiler/ghci/InteractiveUI.hs b/ghc/compiler/ghci/InteractiveUI.hs index 082d565..9d6f6a1 100644 --- a/ghc/compiler/ghci/InteractiveUI.hs +++ b/ghc/compiler/ghci/InteractiveUI.hs @@ -1,5 +1,5 @@ ----------------------------------------------------------------------------- --- $Id: InteractiveUI.hs,v 1.61 2001/04/23 16:50:48 sewardj Exp $ +-- $Id: InteractiveUI.hs,v 1.87 2001/08/15 14:41:49 simonmar Exp $ -- -- GHC Interactive User Interface -- @@ -8,34 +8,41 @@ ----------------------------------------------------------------------------- {-# OPTIONS -#include "Linker.h" #-} +{-# OPTIONS -#include "SchedAPI.h" #-} module InteractiveUI ( interactiveUI, ghciWelcomeMsg ) where +#include "../includes/config.h" #include "HsVersions.h" -#if HAVE_READLINE_4_2 == 1 || HAVE_READLINE_4 == 1 -#undef NO_READLINE -#else -#define NO_READLINE -#endif - +import Packages import CompManager -import CmStaticInfo +import HscTypes ( GhciMode(..), TyThing(..) ) +import MkIface ( ifaceTyCls ) import ByteCodeLink import DriverFlags import DriverState import DriverUtil import Linker +import Finder ( flushPackageCache ) import Util -import Name ( Name ) +import Id ( isDataConWrapId, idName ) +import Class ( className ) +import TyCon ( tyConName ) +import SrcLoc ( isGoodSrcLoc ) +import Name ( Name, isHomePackageName, nameSrcLoc ) import Outputable -import CmdLineOpts ( DynFlag(..), dopt_unset ) +import CmdLineOpts ( DynFlag(..), getDynFlags, saveDynFlags, restoreDynFlags, dopt_unset ) import Panic ( GhcException(..) ) import Config +#ifndef mingw32_TARGET_OS +import Posix +#endif + import Exception import Dynamic -#ifndef NO_READLINE -import Readline +#if HAVE_READLINE_HEADERS && HAVE_READLINE_LIBS +import Readline #endif import IOExts @@ -57,7 +64,7 @@ import CString ( peekCString ) ghciWelcomeMsg = "\ \ ___ ___ _\n\ \ / _ \\ /\\ /\\/ __(_)\n\ -\ / /_\\// /_/ / / | | GHC Interactive, version " ++ cProjectVersion ++ ", For Haskell 98.\n\ +\ / /_\\// /_/ / / | | GHC Interactive, version " ++ cProjectVersion ++ ", for Haskell 98.\n\ \/ /_\\\\/ __ / /___| | http://www.haskell.org/ghc/\n\ \\\____/\\/ /_/\\____/|_| Type :? for help.\n" @@ -70,6 +77,7 @@ builtin_commands = [ ("def", keepGoing defineMacro), ("help", keepGoing help), ("?", keepGoing help), + ("info", keepGoing info), ("load", keepGoing loadModule), ("module", keepGoing setContext), ("reload", keepGoing reloadModule), @@ -87,20 +95,22 @@ shortHelpText = "use :? for help.\n" helpText = "\ \ Commands available from the prompt:\n\ -\\ -\ evaluate/run \n\ -\ :cd change directory to \n\ -\ :def define a command :\n\ -\ :help, :? display this list of commands\n\ -\ :load load a module (and it dependents)\n\ -\ :module set the context for expression evaluation to \n\ -\ :reload reload the current module set\n\ -\ :set