X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;ds=sidebyside;f=ghc%2Fcompiler%2Fghci%2FInteractiveUI.hs;h=533c295627362a35800d64bf986e382ee352b394;hb=432c57562b861f9d00bc70eea0ba393f8847c92e;hp=2ac225a78425a4db9589ff540b7a1442ec3c7961;hpb=972d6442ee3a6ee0a5fa20655d882e0041646892;p=ghc-hetmet.git diff --git a/ghc/compiler/ghci/InteractiveUI.hs b/ghc/compiler/ghci/InteractiveUI.hs index 2ac225a..533c295 100644 --- a/ghc/compiler/ghci/InteractiveUI.hs +++ b/ghc/compiler/ghci/InteractiveUI.hs @@ -1,20 +1,21 @@ +{-# OPTIONS -#include "Linker.h" -#include "SchedAPI.h" #-} ----------------------------------------------------------------------------- --- $Id: InteractiveUI.hs,v 1.75 2001/06/15 08:29:57 simonpj Exp $ +-- $Id: InteractiveUI.hs,v 1.104 2002/01/03 17:05:50 sewardj Exp $ -- -- GHC Interactive User Interface -- -- (c) The GHC Team 2000 -- ----------------------------------------------------------------------------- - -{-# OPTIONS -#include "Linker.h" #-} module InteractiveUI ( interactiveUI, ghciWelcomeMsg ) where #include "../includes/config.h" #include "HsVersions.h" +import Packages import CompManager -import HscTypes ( GhciMode(..) ) +import HscTypes ( TyThing(..) ) +import MkIface import ByteCodeLink import DriverFlags import DriverState @@ -22,10 +23,19 @@ 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(..), getDynFlags, saveDynFlags, restoreDynFlags, dopt_unset ) -import Panic ( GhcException(..) ) +import Panic ( GhcException(..), showGhcException ) import Config #ifndef mingw32_TARGET_OS @@ -37,7 +47,9 @@ import Dynamic #if HAVE_READLINE_HEADERS && HAVE_READLINE_LIBS import Readline #endif +import Concurrent import IOExts +import SystemExts import Numeric import List @@ -46,7 +58,7 @@ import CPUTime import Directory import IO import Char -import Monad ( when ) +import Monad ( when, join ) import PrelGHC ( unsafeCoerce# ) import Foreign ( nullPtr ) @@ -70,10 +82,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), @@ -87,15 +100,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