Repository : ssh://darcs.haskell.org//srv/darcs/ghc

On branch  : master

http://hackage.haskell.org/trac/ghc/changeset/ab52df86f5f76da6e19ee6562792ea43972a6f24

>---------------------------------------------------------------

commit ab52df86f5f76da6e19ee6562792ea43972a6f24
Author: Paolo Capriotti <[email protected]>
Date:   Wed Apr 11 14:19:25 2012 +0100

    Revert "trac #5265 (support for additional .ghci files)"
    
    This reverts commit 991f141989940c897cb2fc3dba7b5b49342d402a.

>---------------------------------------------------------------

 compiler/main/StaticFlags.hs |   11 +----------
 docs/users_guide/flags.xml   |    6 ------
 docs/users_guide/ghci.xml    |    4 ----
 ghc/InteractiveUI.hs         |    3 +--
 4 files changed, 2 insertions(+), 22 deletions(-)

diff --git a/compiler/main/StaticFlags.hs b/compiler/main/StaticFlags.hs
index c2f8674..cfbd4ba 100644
--- a/compiler/main/StaticFlags.hs
+++ b/compiler/main/StaticFlags.hs
@@ -80,7 +80,6 @@ module StaticFlags (
 
        -- misc opts
        opt_IgnoreDotGhci,
-       opt_GhciScripts,
        opt_ErrorSpans,
        opt_GranMacros,
        opt_HiVersion,
@@ -103,7 +102,7 @@ module StaticFlags (
 import Config
 import FastString
 import Util
-import Maybes          ( firstJusts, catMaybes )
+import Maybes          ( firstJusts )
 import Panic
 
 import Control.Monad    ( liftM3 )
@@ -133,7 +132,6 @@ lookUp               :: FastString -> Bool
 lookup_def_int   :: String -> Int -> Int
 lookup_def_float :: String -> Float -> Float
 lookup_str       :: String -> Maybe String
-lookup_all_str   :: String -> [String]
 
 -- holds the static opts while they're being collected, before
 -- being unsafely read by unpacked_static_opts below.
@@ -164,10 +162,6 @@ lookup_str sw
        Just str         -> Just str
        Nothing          -> Nothing
 
-lookup_all_str sw = map f $ catMaybes (map (stripPrefix sw) staticFlags) where
-   f ('=' : str) = str
-   f str = str
-
 lookup_def_int sw def = case (lookup_str sw) of
                            Nothing -> def              -- Use default
                            Just xx -> try_read sw xx
@@ -207,9 +201,6 @@ unpacked_opts =
 opt_IgnoreDotGhci :: Bool
 opt_IgnoreDotGhci              = lookUp (fsLit "-ignore-dot-ghci")
 
-opt_GhciScripts :: [String]
-opt_GhciScripts = lookup_all_str "-ghci-script"
-
 -- debugging options
 -- | Suppress all that is suppressable in core dumps.
 --   Except for uniques, as some simplifier phases introduce new varibles that
diff --git a/docs/users_guide/flags.xml b/docs/users_guide/flags.xml
index 169dd9d..53bd4bf 100644
--- a/docs/users_guide/flags.xml
+++ b/docs/users_guide/flags.xml
@@ -493,12 +493,6 @@
             <entry>-</entry>
           </row>
           <row>
-            <entry><option>-ghci-script</option></entry>
-            <entry>Load the given additional <filename>.ghci</filename> 
file</entry>
-            <entry>static</entry>
-            <entry>-</entry>
-          </row>
-          <row>
             <entry><option>-read-dot-ghci</option></entry>
             <entry>Enable reading of <filename>.ghci</filename> files</entry>
             <entry>static</entry>
diff --git a/docs/users_guide/ghci.xml b/docs/users_guide/ghci.xml
index b3fa469..3e0d341 100644
--- a/docs/users_guide/ghci.xml
+++ b/docs/users_guide/ghci.xml
@@ -3134,10 +3134,6 @@ warning settings:
       </varlistentry>
     </variablelist>
 
-    <para>Additional <filename>.ghci</filename> files can be added
-    through the <option>-ghci-script</option> option. These are
-    loaded after the normal <filename>.ghci</filename> files.</para>
-
   </sect1>
 
   <sect1 id="ghci-obj">
diff --git a/ghc/InteractiveUI.hs b/ghc/InteractiveUI.hs
index 4525942..9761f42 100644
--- a/ghc/InteractiveUI.hs
+++ b/ghc/InteractiveUI.hs
@@ -433,8 +433,7 @@ runGHCi paths maybe_exprs = do
   setGHCContextFromGHCiState
 
   when (read_dot_files) $ do
-    mcfgs0 <- sequence $ [ current_dir, app_user_dir, home_dir ]
-                         ++ map (return . Just) opt_GhciScripts
+    mcfgs0 <- sequence [ current_dir, app_user_dir, home_dir ]
     mcfgs <- liftIO $ mapM canonicalizePath' (catMaybes mcfgs0)
     mapM_ sourceConfigFile $ nub $ catMaybes mcfgs
         -- nub, because we don't want to read .ghci twice if the



_______________________________________________
Cvs-ghc mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/cvs-ghc

Reply via email to