From 98583c26d8d48dbbc6da7e2302012180053134e5 Mon Sep 17 00:00:00 2001 From: gwern0 Date: Wed, 8 Oct 2008 22:51:31 +0200 Subject: Prompt.hs rename deleteConsecutiveDuplicates That name is really unwieldy and long. darcs-hash:20081008205131-f7719-4dad571b407c09c06f19315d4133f8117040dc20.gz --- XMonad/Prompt.hs | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'XMonad/Prompt.hs') diff --git a/XMonad/Prompt.hs b/XMonad/Prompt.hs index c01e3cb..62d554a 100644 --- a/XMonad/Prompt.hs +++ b/XMonad/Prompt.hs @@ -46,7 +46,7 @@ module XMonad.Prompt , historyCompletion -- * History filters , deleteAllDuplicates - , deleteConsecutiveDuplicates + , deleteConsecutive ) where import Prelude hiding (catch) @@ -811,7 +811,7 @@ breakAtSpace s -- 'getShellCompl'; you pass it to mkXPrompt, and it will make completions work -- from the query history stored in ~\/.xmonad\/history. historyCompletion :: ComplFunction -historyCompletion x = fmap (deleteConsecutiveDuplicates . filter (isInfixOf x) . Map.fold (++) []) readHistory +historyCompletion x = fmap (deleteConsecutive . filter (isInfixOf x) . Map.fold (++) []) readHistory -- | Sort a list and remove duplicates. Like 'deleteAllDuplicates', but trades off -- laziness and stability for efficiency. @@ -820,8 +820,8 @@ uniqSort = toList . fromList -- | Functions to be used with the 'historyFilter' setting. -- 'deleteAllDuplicates' will remove all duplicate entries. --- 'deleteConsecutiveDuplicates' will only remove duplicate elements +-- 'deleteConsecutive' will only remove duplicate elements -- immediately next to each other. -deleteAllDuplicates, deleteConsecutiveDuplicates :: [String] -> [String] +deleteAllDuplicates, deleteConsecutive :: [String] -> [String] deleteAllDuplicates = nub -deleteConsecutiveDuplicates = map head . group +deleteConsecutive = map head . group -- cgit v1.2.3