diff options
author | Herbert Valerio Riedel <hvr@gnu.org> | 2015-12-21 15:17:42 +0100 |
---|---|---|
committer | Herbert Valerio Riedel <hvr@gnu.org> | 2015-12-21 20:50:26 +0100 |
commit | 55250a63cc3f285fb479f1ef396e88dc0c58b218 (patch) | |
tree | 3eef52269ae4a6d812c1018de6ab831c5cd22ff7 | |
parent | eeecb8647585ad9eea0554b2f97a3645d2c59f88 (diff) | |
download | haskell-55250a63cc3f285fb479f1ef396e88dc0c58b218.tar.gz |
Rename GHCi's UI modules into GHCi.UI(.*)
Further work refactoring and enhancing GHCi will make it desirable to
split up GHCi's code-base into multiple modules with specific functions,
and rather than have several top-level 'Ghci*' modules, it's nicer to
have a common namespace. This commit is provides the basis for that.
Note that the remaining GHCi.* namespace belongs to the new `ghci`
package.
Differential Revision: https://phabricator.haskell.org/D1593
-rw-r--r-- | ghc/GHCi/UI.hs (renamed from ghc/InteractiveUI.hs) | 12 | ||||
-rw-r--r-- | ghc/GHCi/UI/Info.hs (renamed from ghc/GhciInfo.hs) | 2 | ||||
-rw-r--r-- | ghc/GHCi/UI/Monad.hs (renamed from ghc/GhciMonad.hs) | 4 | ||||
-rw-r--r-- | ghc/GHCi/UI/Tags.hs (renamed from ghc/GhciTags.hs) | 7 | ||||
-rw-r--r-- | ghc/Main.hs | 2 | ||||
-rw-r--r-- | ghc/ghc-bin.cabal.in | 8 |
6 files changed, 17 insertions, 18 deletions
diff --git a/ghc/InteractiveUI.hs b/ghc/GHCi/UI.hs index 9e2256010b..986c119783 100644 --- a/ghc/InteractiveUI.hs +++ b/ghc/GHCi/UI.hs @@ -20,7 +20,7 @@ -- ----------------------------------------------------------------------------- -module InteractiveUI ( +module GHCi.UI ( interactiveUI, GhciSettings(..), defaultGhciSettings, @@ -31,10 +31,10 @@ module InteractiveUI ( #include "HsVersions.h" -- GHCi -import qualified GhciMonad ( args, runStmt ) -import GhciMonad hiding ( args, runStmt ) -import GhciTags -import GhciInfo +import qualified GHCi.UI.Monad as GhciMonad ( args, runStmt, runDecls ) +import GHCi.UI.Monad hiding ( args, runStmt, runDecls ) +import GHCi.UI.Tags +import GHCi.UI.Info import Debugger -- The GHC interface @@ -434,7 +434,7 @@ interactiveUI config srcs maybe_exprs = do eval_wrapper <- mkEvalWrapper default_progname default_args startGHCi (runGHCi srcs maybe_exprs) GHCiState{ progname = default_progname, - GhciMonad.args = default_args, + args = default_args, evalWrapper = eval_wrapper, prompt = defPrompt config, prompt2 = defPrompt2 config, diff --git a/ghc/GhciInfo.hs b/ghc/GHCi/UI/Info.hs index 2fa9a950e1..2c44e3f8e2 100644 --- a/ghc/GhciInfo.hs +++ b/ghc/GHCi/UI/Info.hs @@ -4,7 +4,7 @@ {-# LANGUAGE ScopedTypeVariables #-} -- | Get information on modules, expreesions, and identifiers -module GhciInfo +module GHCi.UI.Info ( ModInfo(..) , SpanInfo(..) , spanInfoFromRealSrcSpan diff --git a/ghc/GhciMonad.hs b/ghc/GHCi/UI/Monad.hs index 993a758d3e..2a2372d5f9 100644 --- a/ghc/GhciMonad.hs +++ b/ghc/GHCi/UI/Monad.hs @@ -10,7 +10,7 @@ -- ----------------------------------------------------------------------------- -module GhciMonad ( +module GHCi.UI.Monad ( GHCi(..), startGHCi, GHCiState(..), setGHCiState, getGHCiState, modifyGHCiState, GHCiOption(..), isOptionSet, setOption, unsetOption, @@ -31,7 +31,7 @@ module GhciMonad ( #include "HsVersions.h" -import GhciInfo (ModInfo) +import GHCi.UI.Info (ModInfo) import qualified GHC import GhcMonad hiding (liftIO) import Outputable hiding (printForUser, printForUserPartWay) diff --git a/ghc/GhciTags.hs b/ghc/GHCi/UI/Tags.hs index fa94ea68fa..8a06eb3583 100644 --- a/ghc/GhciTags.hs +++ b/ghc/GHCi/UI/Tags.hs @@ -7,7 +7,7 @@ ----------------------------------------------------------------------------- {-# OPTIONS_GHC -fno-warn-name-shadowing #-} -module GhciTags ( +module GHCi.UI.Tags ( createCTagsWithLineNumbersCmd, createCTagsWithRegExesCmd, createETagsFileCmd @@ -15,7 +15,7 @@ module GhciTags ( import Exception import GHC -import GhciMonad +import GHCi.UI.Monad import Outputable -- ToDo: figure out whether we need these, and put something appropriate @@ -61,7 +61,7 @@ ghciCreateTagsFile :: TagsKind -> FilePath -> GHCi () ghciCreateTagsFile kind file = do createTagsFile kind file --- ToDo: +-- ToDo: -- - remove restriction that all modules must be interpreted -- (problem: we don't know source locations for entities unless -- we compiled the module. @@ -213,4 +213,3 @@ showETag TagInfo{ tagName = tag, tagLine = lineNo, tagCol = colNo, ++ "\x01" ++ show lineNo ++ "," ++ show charPos showETag _ = throwGhcException (CmdLineError "missing source file info in showETag") - diff --git a/ghc/Main.hs b/ghc/Main.hs index 7d4e1e235c..a47678b30b 100644 --- a/ghc/Main.hs +++ b/ghc/Main.hs @@ -25,7 +25,7 @@ import HscMain ( newHscEnv ) import DriverPipeline ( oneShot, compileFile ) import DriverMkDepend ( doMkDependHS ) #ifdef GHCI -import InteractiveUI ( interactiveUI, ghciWelcomeMsg, defaultGhciSettings ) +import GHCi.UI ( interactiveUI, ghciWelcomeMsg, defaultGhciSettings ) #endif -- Frontend plugins diff --git a/ghc/ghc-bin.cabal.in b/ghc/ghc-bin.cabal.in index dc303e5296..adf81b3890 100644 --- a/ghc/ghc-bin.cabal.in +++ b/ghc/ghc-bin.cabal.in @@ -56,10 +56,10 @@ Executable ghc CPP-Options: -DGHCI GHC-Options: -fno-warn-name-shadowing Other-Modules: - GhciInfo - GhciMonad - GhciTags - InteractiveUI + GHCi.UI + GHCi.UI.Info + GHCi.UI.Monad + GHCi.UI.Tags Other-Extensions: BangPatterns FlexibleInstances |