[commit: ghc] master: Comments only (eb4d96e)

git at git.haskell.org git at git.haskell.org
Mon Dec 22 13:24:56 UTC 2014


Repository : ssh://git@git.haskell.org/ghc

On branch  : master
Link       : http://ghc.haskell.org/trac/ghc/changeset/eb4d96e15991d8a03fcbf2385a14dc7e4cb64bcf/ghc

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

commit eb4d96e15991d8a03fcbf2385a14dc7e4cb64bcf
Author: Simon Peyton Jones <simonpj at microsoft.com>
Date:   Mon Dec 22 12:43:58 2014 +0000

    Comments only


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

eb4d96e15991d8a03fcbf2385a14dc7e4cb64bcf
 ghc/InteractiveUI.hs | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/ghc/InteractiveUI.hs b/ghc/InteractiveUI.hs
index 7d6c9ba..d478336 100644
--- a/ghc/InteractiveUI.hs
+++ b/ghc/InteractiveUI.hs
@@ -876,7 +876,8 @@ enqueueCommands cmds = do
   setGHCiState st{ cmdqueue = cmds ++ cmdqueue st }
 
 -- | If we one of these strings prefixes a command, then we treat it as a decl
--- rather than a stmt.
+-- rather than a stmt. NB that the appropriate decl prefixes depends on the
+-- flag settings (Trac #9915)
 declPrefixes :: DynFlags -> [String]
 declPrefixes dflags = keywords ++ concat opt_keywords
   where
@@ -924,6 +925,9 @@ runStmt stmt step
                Just result -> afterRunStmt (const True) result
 
     s `looks_like` prefix = prefix `isPrefixOf` dropWhile isSpace s
+       -- Ignore leading spaces (see Trac #9914), so that
+       --    ghci>   data T = T
+       -- (note leading spaces) works properly
 
 -- | Clean up the GHCi environment after a statement has run
 afterRunStmt :: (SrcSpan -> Bool) -> GHC.RunResult -> GHCi Bool



More information about the ghc-commits mailing list