diff --git a/ghcidOutput b/ghcidOutput index 5c2a9729f..4dde227a7 100644 --- a/ghcidOutput +++ b/ghcidOutput @@ -1,8 +1,3 @@ -/home/justin/Haskell/loop/src/Dodge/Update/Input/InGame.hs:247:22-23: warning: [-Wunused-matches] - Defined but not used: ‘bn’ - | -247 | shiftInvItems k x ab bn xs ss w = fromMaybe w $ do - | ^^ /home/justin/Haskell/loop/src/Dodge/Update/Input/InGame.hs:252:13-17: warning: [-Wunused-matches] Defined but not used: ‘above’ | diff --git a/src/Dodge/Update/Input/InGame.hs b/src/Dodge/Update/Input/InGame.hs index 82b0b4e50..981a6f26e 100644 --- a/src/Dodge/Update/Input/InGame.hs +++ b/src/Dodge/Update/Input/InGame.hs @@ -251,13 +251,13 @@ shiftInvItems k x ab bn xs ss w = fromMaybe w $ do then do above <- ss ^? ix (mini - 1) guard $ Just (k,mini-1) /= ab --- minss <- IM.lookupMin ss --- guard (mini > fst minss) return $ shiftInvItemsUp k xs w else do - guard $ x > (k,maxi) - maxss <- IM.lookupMax ss - guard (maxi < fst maxss) + --guard $ x > (k,maxi) + --maxss <- IM.lookupMax ss + --guard (maxi < fst maxss) + _ <- ss ^? ix (maxi + 1) + guard $ Just (k,maxi+1) < bn return $ shiftInvItemsDown k xs w shiftInvItemsUp :: Int -> IS.IntSet -> World -> World