[commit: ghc] master: Fix GHCi macros not shadowing builtins (#8113) (3229ead)

git at git.haskell.org git at git.haskell.org
Sat Aug 24 11:44:34 CEST 2013


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

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

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

commit 3229eadbff857b110f20ffddb80d5f7abd5d7216
Author: Herbert Valerio Riedel <hvr at gnu.org>
Date:   Sat Aug 24 11:40:57 2013 +0200

    Fix GHCi macros not shadowing builtins (#8113)
    
    This restores the original behaviour that was broken accidentally during
    the refactoring peformed via 4f764d06f3b9899c09a6a459a22d4be694ee45d9.
    
    This has been broken effectively for all GHC 7.6.x releases.


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

3229eadbff857b110f20ffddb80d5f7abd5d7216
 ghc/InteractiveUI.hs |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/ghc/InteractiveUI.hs b/ghc/InteractiveUI.hs
index fd034ea..91648a3 100644
--- a/ghc/InteractiveUI.hs
+++ b/ghc/InteractiveUI.hs
@@ -958,7 +958,7 @@ lookupCommand' str' = do
   ghci_cmds <- ghci_commands `fmap` getGHCiState
   let{ (str, cmds) = case str' of
       ':' : rest -> (rest, ghci_cmds) -- "::" selects a builtin command
-      _ -> (str', ghci_cmds ++ macros) } -- otherwise prefer macros
+      _ -> (str', macros ++ ghci_cmds) } -- otherwise prefer macros
   -- look for exact match first, then the first prefix match
   return $ case [ c | c <- cmds, str == cmdName c ] of
            c:_ -> Just c





More information about the ghc-commits mailing list