X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=ghc%2Fcompiler%2Fghci%2FInteractiveUI.hs;h=d0cfa227f0f91495a7d095c91a149838a67becde;hb=b854692dda9ac8f290aa761fcc799b3e4915412f;hp=e0c82ef8bf0950146444c7343f205ad8b55d6c4b;hpb=d9a11ced5fd2f2102102133384ab9c766e4ddf52;p=ghc-hetmet.git diff --git a/ghc/compiler/ghci/InteractiveUI.hs b/ghc/compiler/ghci/InteractiveUI.hs index e0c82ef..d0cfa22 100644 --- a/ghc/compiler/ghci/InteractiveUI.hs +++ b/ghc/compiler/ghci/InteractiveUI.hs @@ -1,5 +1,5 @@ ----------------------------------------------------------------------------- --- $Id: InteractiveUI.hs,v 1.67 2001/05/21 13:57:49 simonmar Exp $ +-- $Id: InteractiveUI.hs,v 1.97 2001/10/22 16:16:27 simonmar Exp $ -- -- GHC Interactive User Interface -- @@ -8,13 +8,16 @@ ----------------------------------------------------------------------------- {-# OPTIONS -#include "Linker.h" #-} +{-# OPTIONS -#include "SchedAPI.h" #-} module InteractiveUI ( interactiveUI, ghciWelcomeMsg ) where #include "../includes/config.h" #include "HsVersions.h" +import Packages import CompManager -import CmStaticInfo +import HscTypes ( TyThing(..) ) +import MkIface import ByteCodeLink import DriverFlags import DriverState @@ -22,19 +25,33 @@ import DriverUtil import Linker import Finder ( flushPackageCache ) import Util -import Name ( Name ) +import Id ( isRecordSelector, recordSelectorFieldLabel, + isDataConWrapId, idName ) +import Class ( className ) +import TyCon ( tyConName, tyConClass_maybe, isPrimTyCon ) +import FieldLabel ( fieldLabelTyCon ) +import SrcLoc ( isGoodSrcLoc ) +import Name ( Name, isHomePackageName, nameSrcLoc, nameOccName, + NamedThing(..) ) +import OccName ( isSymOcc ) +import BasicTypes ( defaultFixity ) 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 #if HAVE_READLINE_HEADERS && HAVE_READLINE_LIBS import Readline #endif +import Concurrent import IOExts +import SystemExts import Numeric import List @@ -67,10 +84,11 @@ builtin_commands = [ ("def", keepGoing defineMacro), ("help", keepGoing help), ("?", keepGoing help), + ("info", keepGoing info), ("load", keepGoing loadModule), ("module", keepGoing setContext), ("reload", keepGoing reloadModule), - ("set", keepGoing setOptions), + ("set", keepGoing setCmd), ("type", keepGoing typeOfExpr), ("unset", keepGoing unsetOptions), ("undef", keepGoing undefineMacro), @@ -84,15 +102,19 @@ shortHelpText = "use :? for help.\n" helpText = "\ \ Commands available from the prompt:\n\ -\\ +\\ \ evaluate/run \n\ +\ :add ... add module(s) to the current target set\n\ \ :cd change directory to \n\ \ :def define a command :\n\ \ :help, :? display this list of commands\n\ -\ :load load a module (and its dependents)\n\ +\ :info [ ...] display information about the given names\n\ +\ :load ... load module(s) and their dependents\n\ \ :module set the context for expression evaluation to \n\ \ :reload reload the current module set\n\ \ :set