[commit: ghc] master: Rename GHCi's UI modules into GHCi.UI(.*) (55250a6)
git at git.haskell.org
git at git.haskell.org
Mon Dec 21 19:50:09 UTC 2015
Repository : ssh://git@git.haskell.org/ghc
On branch : master
Link : http://ghc.haskell.org/trac/ghc/changeset/55250a63cc3f285fb479f1ef396e88dc0c58b218/ghc
>---------------------------------------------------------------
commit 55250a63cc3f285fb479f1ef396e88dc0c58b218
Author: Herbert Valerio Riedel <hvr at gnu.org>
Date: Mon Dec 21 15:17:42 2015 +0100
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
>---------------------------------------------------------------
55250a63cc3f285fb479f1ef396e88dc0c58b218
ghc/{InteractiveUI.hs => GHCi/UI.hs} | 12 ++++++------
ghc/{GhciInfo.hs => GHCi/UI/Info.hs} | 2 +-
ghc/{GhciMonad.hs => GHCi/UI/Monad.hs} | 4 ++--
ghc/{GhciTags.hs => GHCi/UI/Tags.hs} | 5 ++---
ghc/Main.hs | 2 +-
ghc/ghc-bin.cabal.in | 8 ++++----
6 files changed, 16 insertions(+), 17 deletions(-)
diff --git a/ghc/InteractiveUI.hs b/ghc/GHCi/UI.hs
similarity index 99%
rename from ghc/InteractiveUI.hs
rename to ghc/GHCi/UI.hs
index 9e22560..986c119 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
similarity index 99%
rename from ghc/GhciInfo.hs
rename to ghc/GHCi/UI/Info.hs
index 2fa9a95..2c44e3f 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
similarity index 99%
rename from ghc/GhciMonad.hs
rename to ghc/GHCi/UI/Monad.hs
index 993a758..2a2372d 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
similarity index 99%
rename from ghc/GhciTags.hs
rename to ghc/GHCi/UI/Tags.hs
index fa94ea6..8a06eb3 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
@@ -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 7d4e1e2..a47678b 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 dc303e5..adf81b3 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
More information about the ghc-commits
mailing list