From 3229eadbff857b110f20ffddb80d5f7abd5d7216 Mon Sep 17 00:00:00 2001 From: Herbert Valerio Riedel Date: Sat, 24 Aug 2013 11:40:57 +0200 Subject: 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. --- ghc/InteractiveUI.hs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'ghc') diff --git a/ghc/InteractiveUI.hs b/ghc/InteractiveUI.hs index fd034eaf7d..91648a31d1 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 -- cgit v1.2.1