Commit 3229eadb authored by Herbert Valerio Riedel's avatar Herbert Valerio Riedel 🕺

Fix GHCi macros not shadowing builtins (#8113)

This restores the original behaviour that was broken accidentally during
the refactoring peformed via 4f764d06.

This has been broken effectively for all GHC 7.6.x releases.
parent 27955ff3
......@@ -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
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment