From d7ad486a6e96e00faa3736a28bf31024139425ec Mon Sep 17 00:00:00 2001
From: slotThe <soliditsallgood@mailbox.org>
Date: Thu, 8 Apr 2021 14:43:23 +0200
Subject: [PATCH] X.Prompt: get rid of MultiWayIf

Not needed anymore
---
 XMonad/Prompt.hs | 35 +++++++++++++++++------------------
 1 file changed, 17 insertions(+), 18 deletions(-)

diff --git a/XMonad/Prompt.hs b/XMonad/Prompt.hs
index f6442698..ddf8e893 100644
--- a/XMonad/Prompt.hs
+++ b/XMonad/Prompt.hs
@@ -1,6 +1,5 @@
 {-# LANGUAGE ScopedTypeVariables #-}
 {-# LANGUAGE TupleSections #-}
-{-# LANGUAGE MultiWayIf #-}
 {-# LANGUAGE FlexibleContexts #-}
 {-# LANGUAGE ExistentialQuantification #-}
 {-# LANGUAGE CPP #-}
@@ -763,26 +762,26 @@ handleCompletion cs = do
         --
         --TODO: Scroll or paginate results
         hlComplete :: String -> [String] -> XPState -> XP ()
-        hlComplete prevCompl l st =
-          if | -- The current suggestion matches the command and is a
-               -- proper suffix of the last suggestion, so replace it.
-               isSuffixOfCmd && isProperSuffixOfLast -> replaceCompletion prevCompl
+        hlComplete prevCompl l st
+          | -- The current suggestion matches the command and is a
+            -- proper suffix of the last suggestion, so replace it.
+            isSuffixOfCmd && isProperSuffixOfLast = replaceCompletion prevCompl
 
-             | -- We only have one suggestion, so we need to be a little
-               -- bit smart in order to avoid a loop.
-               length cs == 1 ->
-                 if command st == hlCompl then put st else replaceCompletion (head cs)
+          | -- We only have one suggestion, so we need to be a little
+            -- bit smart in order to avoid a loop.
+            length cs == 1 =
+              if command st == hlCompl then put st else replaceCompletion (head cs)
 
-               -- The current suggestion matches the command, so advance
-               -- to the next completion and try again.
-             | isSuffixOfCmd ->
-                 hlComplete hlCompl l $ st{ complIndex = complIndex'
-                                          , highlightedCompl = nextHlCompl
-                                          }
+            -- The current suggestion matches the command, so advance
+            -- to the next completion and try again.
+          | isSuffixOfCmd =
+              hlComplete hlCompl l $ st{ complIndex = complIndex'
+                                       , highlightedCompl = nextHlCompl
+                                       }
 
-               -- If nothing matches at all, delete the suggestion and
-               -- highlight the next one.
-             | otherwise -> replaceCompletion prevCompl
+            -- If nothing matches at all, delete the suggestion and
+            -- highlight the next one.
+          | otherwise = replaceCompletion prevCompl
          where
           hlCompl     :: String       = fromMaybe (command st) $ highlightedItem st l
           complIndex' :: (Int, Int)   = nextComplIndex st (length l)