X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=ghc%2Fcompiler%2Fghci%2FInteractiveUI.hs;h=98b653d9123b9d9a5df1517f8b595d0619bed60d;hb=fcbc4b62830f07dc13a820eb07b0d58317a173e4;hp=5d59c95238d937cb77b77cbc83a738bfad57e805;hpb=591c4e1d694b163367e74bbd2d21415773f420d6;p=ghc-hetmet.git diff --git a/ghc/compiler/ghci/InteractiveUI.hs b/ghc/compiler/ghci/InteractiveUI.hs index 5d59c95..98b653d 100644 --- a/ghc/compiler/ghci/InteractiveUI.hs +++ b/ghc/compiler/ghci/InteractiveUI.hs @@ -1,10 +1,10 @@ {-# OPTIONS -#include "Linker.h" #-} ----------------------------------------------------------------------------- --- $Id: InteractiveUI.hs,v 1.163 2004/02/01 23:43:02 dons Exp $ +-- $Id: InteractiveUI.hs,v 1.175 2004/08/20 15:02:40 simonmar Exp $ -- -- GHC Interactive User Interface -- --- (c) The GHC Team 2000 +-- (c) The GHC Team 2004 -- ----------------------------------------------------------------------------- module InteractiveUI ( @@ -12,13 +12,15 @@ module InteractiveUI ( ghciWelcomeMsg ) where -#include "../includes/config.h" +#include "../includes/ghcconfig.h" #include "HsVersions.h" import CompManager import HscTypes ( TyThing(..), HomeModInfo(hm_linkable), HomePackageTable, isObjectLinkable, GhciMode(..) ) -import IfaceSyn ( IfaceDecl( ifName ) ) +import IfaceSyn ( IfaceType, IfaceDecl(..), IfaceClassOp(..), IfaceConDecls(..), IfaceConDecl(..), + IfaceInst(..), pprIfaceDeclHead, pprParendIfaceType, pprIfaceForAllPart ) +import FunDeps ( pprFundeps ) import DriverFlags import DriverState import DriverUtil ( remove_spaces ) @@ -27,14 +29,15 @@ import Util import Module ( showModMsg, lookupModuleEnv ) import Name ( Name, isHomePackageName, nameSrcLoc, nameOccName, NamedThing(..) ) -import OccName ( isSymOcc ) -import BasicTypes ( defaultFixity, SuccessFlag(..) ) +import OccName ( OccName, isSymOcc, occNameUserString ) +import BasicTypes ( StrictnessMark(..), Fixity, defaultFixity, SuccessFlag(..) ) import Packages import Outputable import CmdLineOpts ( DynFlag(..), DynFlags(..), getDynFlags, saveDynFlags, restoreDynFlags, dopt_unset ) import Panic hiding ( showException ) import Config +import SrcLoc ( SrcLoc, isGoodSrcLoc ) #ifndef mingw32_HOST_OS import DriverUtil( handle ) @@ -57,6 +60,7 @@ import Control.Concurrent import Numeric import Data.List +import Data.Int ( Int64 ) import System.Cmd import System.CPUTime import System.Environment @@ -64,6 +68,7 @@ import System.Directory import System.IO as IO import Data.Char import Control.Monad as Monad +import Foreign.StablePtr ( newStablePtr ) import GHC.Exts ( unsafeCoerce# ) @@ -73,12 +78,12 @@ import System.Posix.Internals ( setNonBlockingFD ) ----------------------------------------------------------------------------- -ghciWelcomeMsg = "\ -\ ___ ___ _\n\ -\ / _ \\ /\\ /\\/ __(_)\n\ -\ / /_\\// /_/ / / | | GHC Interactive, version " ++ cProjectVersion ++ ", for Haskell 98.\n\ -\/ /_\\\\/ __ / /___| | http://www.haskell.org/ghc/\n\ -\\\____/\\/ /_/\\____/|_| Type :? for help.\n" +ghciWelcomeMsg = + " ___ ___ _\n"++ + " / _ \\ /\\ /\\/ __(_)\n"++ + " / /_\\// /_/ / / | | GHC Interactive, version " ++ cProjectVersion ++ ", for Haskell 98.\n"++ + "/ /_\\\\/ __ / /___| | http://www.haskell.org/ghc/\n"++ + "\\____/\\/ /_/\\____/|_| Type :? for help.\n" GLOBAL_VAR(commands, builtin_commands, [(String, String -> GHCi Bool)]) @@ -97,6 +102,7 @@ builtin_commands = [ ("set", keepGoing setCmd), ("show", keepGoing showCmd), ("type", keepGoing typeOfExpr), + ("kind", keepGoing kindOfType), ("unset", keepGoing unsetOptions), ("undef", keepGoing undefineMacro), ("quit", quit) @@ -111,41 +117,42 @@ keepGoingPaths a str = a (toArgs str) >> return False shortHelpText = "use :? for help.\n" -- NOTE: spaces at the end of each line to workaround CPP/string gap bug. -helpText = "\ -\ Commands available from the prompt:\n\ -\\n\ -\ evaluate/run \n\ -\ :add ... add module(s) to the current target set\n\ -\ :browse [*] display the names defined by \n\ -\ :cd change directory to \n\ -\ :def define a command :\n\ -\ :help, :? display this list of commands\n\ -\ :info [ ...] display information about the given names\n\ -\ :load ... load module(s) and their dependents\n\ -\ :module [+/-] [*] ... set the context for expression evaluation\n\ -\ :reload reload the current module set\n\ -\\n\ -\ :set