Commit 55250a63 authored by Herbert Valerio Riedel's avatar Herbert Valerio Riedel 🕺

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
parent eeecb864
...@@ -20,7 +20,7 @@ ...@@ -20,7 +20,7 @@
-- --
----------------------------------------------------------------------------- -----------------------------------------------------------------------------
module InteractiveUI ( module GHCi.UI (
interactiveUI, interactiveUI,
GhciSettings(..), GhciSettings(..),
defaultGhciSettings, defaultGhciSettings,
...@@ -31,10 +31,10 @@ module InteractiveUI ( ...@@ -31,10 +31,10 @@ module InteractiveUI (
#include "HsVersions.h" #include "HsVersions.h"
-- GHCi -- GHCi
import qualified GhciMonad ( args, runStmt ) import qualified GHCi.UI.Monad as GhciMonad ( args, runStmt, runDecls )
import GhciMonad hiding ( args, runStmt ) import GHCi.UI.Monad hiding ( args, runStmt, runDecls )
import GhciTags import GHCi.UI.Tags
import GhciInfo import GHCi.UI.Info
import Debugger import Debugger
-- The GHC interface -- The GHC interface
...@@ -434,7 +434,7 @@ interactiveUI config srcs maybe_exprs = do ...@@ -434,7 +434,7 @@ interactiveUI config srcs maybe_exprs = do
eval_wrapper <- mkEvalWrapper default_progname default_args eval_wrapper <- mkEvalWrapper default_progname default_args
startGHCi (runGHCi srcs maybe_exprs) startGHCi (runGHCi srcs maybe_exprs)
GHCiState{ progname = default_progname, GHCiState{ progname = default_progname,
GhciMonad.args = default_args, args = default_args,
evalWrapper = eval_wrapper, evalWrapper = eval_wrapper,
prompt = defPrompt config, prompt = defPrompt config,
prompt2 = defPrompt2 config, prompt2 = defPrompt2 config,
......
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
{-# LANGUAGE ScopedTypeVariables #-} {-# LANGUAGE ScopedTypeVariables #-}
-- | Get information on modules, expreesions, and identifiers -- | Get information on modules, expreesions, and identifiers
module GhciInfo module GHCi.UI.Info
( ModInfo(..) ( ModInfo(..)
, SpanInfo(..) , SpanInfo(..)
, spanInfoFromRealSrcSpan , spanInfoFromRealSrcSpan
......
...@@ -10,7 +10,7 @@ ...@@ -10,7 +10,7 @@
-- --
----------------------------------------------------------------------------- -----------------------------------------------------------------------------
module GhciMonad ( module GHCi.UI.Monad (
GHCi(..), startGHCi, GHCi(..), startGHCi,
GHCiState(..), setGHCiState, getGHCiState, modifyGHCiState, GHCiState(..), setGHCiState, getGHCiState, modifyGHCiState,
GHCiOption(..), isOptionSet, setOption, unsetOption, GHCiOption(..), isOptionSet, setOption, unsetOption,
...@@ -31,7 +31,7 @@ module GhciMonad ( ...@@ -31,7 +31,7 @@ module GhciMonad (
#include "HsVersions.h" #include "HsVersions.h"
import GhciInfo (ModInfo) import GHCi.UI.Info (ModInfo)
import qualified GHC import qualified GHC
import GhcMonad hiding (liftIO) import GhcMonad hiding (liftIO)
import Outputable hiding (printForUser, printForUserPartWay) import Outputable hiding (printForUser, printForUserPartWay)
......
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
----------------------------------------------------------------------------- -----------------------------------------------------------------------------
{-# OPTIONS_GHC -fno-warn-name-shadowing #-} {-# OPTIONS_GHC -fno-warn-name-shadowing #-}
module GhciTags ( module GHCi.UI.Tags (
createCTagsWithLineNumbersCmd, createCTagsWithLineNumbersCmd,
createCTagsWithRegExesCmd, createCTagsWithRegExesCmd,
createETagsFileCmd createETagsFileCmd
...@@ -15,7 +15,7 @@ module GhciTags ( ...@@ -15,7 +15,7 @@ module GhciTags (
import Exception import Exception
import GHC import GHC
import GhciMonad import GHCi.UI.Monad
import Outputable import Outputable
-- ToDo: figure out whether we need these, and put something appropriate -- ToDo: figure out whether we need these, and put something appropriate
...@@ -213,4 +213,3 @@ showETag TagInfo{ tagName = tag, tagLine = lineNo, tagCol = colNo, ...@@ -213,4 +213,3 @@ showETag TagInfo{ tagName = tag, tagLine = lineNo, tagCol = colNo,
++ "\x01" ++ show lineNo ++ "\x01" ++ show lineNo
++ "," ++ show charPos ++ "," ++ show charPos
showETag _ = throwGhcException (CmdLineError "missing source file info in showETag") showETag _ = throwGhcException (CmdLineError "missing source file info in showETag")
...@@ -25,7 +25,7 @@ import HscMain ( newHscEnv ) ...@@ -25,7 +25,7 @@ import HscMain ( newHscEnv )
import DriverPipeline ( oneShot, compileFile ) import DriverPipeline ( oneShot, compileFile )
import DriverMkDepend ( doMkDependHS ) import DriverMkDepend ( doMkDependHS )
#ifdef GHCI #ifdef GHCI
import InteractiveUI ( interactiveUI, ghciWelcomeMsg, defaultGhciSettings ) import GHCi.UI ( interactiveUI, ghciWelcomeMsg, defaultGhciSettings )
#endif #endif
-- Frontend plugins -- Frontend plugins
......
...@@ -56,10 +56,10 @@ Executable ghc ...@@ -56,10 +56,10 @@ Executable ghc
CPP-Options: -DGHCI CPP-Options: -DGHCI
GHC-Options: -fno-warn-name-shadowing GHC-Options: -fno-warn-name-shadowing
Other-Modules: Other-Modules:
GhciInfo GHCi.UI
GhciMonad GHCi.UI.Info
GhciTags GHCi.UI.Monad
InteractiveUI GHCi.UI.Tags
Other-Extensions: Other-Extensions:
BangPatterns BangPatterns
FlexibleInstances FlexibleInstances
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment