summaryrefslogtreecommitdiff
path: root/ghc
diff options
context:
space:
mode:
authorPhilipp Dargel <chisui@fb3.de>2021-05-01 00:57:41 +0200
committerMarge Bot <ben+marge-bot@smart-cactus.org>2021-05-03 19:50:46 -0400
commit5126a07e0c095c8756bf96196d2c7d8bb9416142 (patch)
tree6358bcfa96a4df7db949529fcad68118a5ad4240 /ghc
parent4e54683465b317af58cb73a21760d3993c26ed5f (diff)
downloadhaskell-5126a07e0c095c8756bf96196d2c7d8bb9416142.tar.gz
Remove duplicate modules in GHCi %s prompt
fixes #19757
Diffstat (limited to 'ghc')
-rw-r--r--ghc/GHCi/UI.hs2
1 files changed, 1 insertions, 1 deletions
diff --git a/ghc/GHCi/UI.hs b/ghc/GHCi/UI.hs
index c2dbb64a5a..0b5076e390 100644
--- a/ghc/GHCi/UI.hs
+++ b/ghc/GHCi/UI.hs
@@ -919,7 +919,7 @@ generatePromptFunctionFromString promptS modules_names line =
processString ('%':'s':xs) =
liftM2 (<>) (return modules_list) (processString xs)
where
- modules_list = hsep $ map text modules_names
+ modules_list = hsep . map text . ordNub $ modules_names
processString ('%':'l':xs) =
liftM2 (<>) (return $ ppr line) (processString xs)
processString ('%':'d':xs) =