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 9e2256010bcb6eb2f07e2d872a0a5e239cff6c57..986c1197831a245cd394ac247928025a15cb77a3 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 2fa9a950e185e46e70902006f5392a1bdfabbe8d..2c44e3f8e2e4bbe40da4c00f9acadf0c2d5377f7 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 993a758d3ecd195f46d195eee52a5bc1beb3abd7..2a2372d5f9cd05b03d78ce41ac949f1d9f4823c8 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 fa94ea68fa7b6f957f35f36738c2fedab68d22db..8a06eb35839714103a5aefdc6e76020721c3e582 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 7d4e1e235c9f4242a2b84346327e0e9d3eb127f6..a47678b30b17c3055d4c2d2120258717cac466b2 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 dc303e5296d564c2ca445582defcffaa0ac8406c..adf81b3890ff1aa3ec892aab41db7f9494dab517 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