halma-telegram-bot/src/Game/Halma/TelegramBot/Controller.hs
Redundant do Open
Open
_ -> do
sendI18nMsg hlCantStartNewRoundBecauseNoMatch
- Read upRead up
- Exclude checks
Found
do sendI18nMsg hlCantStartNewRoundBecauseNoMatch
Perhaps
sendI18nMsg hlCantStartNewRoundBecauseNoMatch
Redundant do Open
Open
_ -> do
sendI18nMsg (flip hlCantUndo (Just CantUndoNoGame))
- Read upRead up
- Exclude checks
Found
do sendI18nMsg (flip hlCantUndo (Just CantUndoNoGame))
Perhaps
sendI18nMsg (flip hlCantUndo (Just CantUndoNoGame))
Use fewer imports Open
Open
import Control.Monad (void, when)
- Read upRead up
- Exclude checks
Found
import Control.Monad ( void, when )
import Control.Monad ( unless )
Perhaps
import Control.Monad ( void, when, unless )
Redundant do Open
Open
Nothing -> do
sendI18nMsg (flip hlCantUndo Nothing)
- Read upRead up
- Exclude checks
Found
do sendI18nMsg (flip hlCantUndo Nothing)
Perhaps
sendI18nMsg (flip hlCantUndo Nothing)
Redundant bracket Open
Open
handleCommand call@(CmdCall { cmdCallName = cmd }) = do
- Read upRead up
- Exclude checks
Found
(CmdCall{cmdCallName = cmd})
Perhaps
CmdCall{cmdCallName = cmd}
Redundant do Open
Open
Nothing -> do
sendMsg $ textMsg $
"Can't identify sender of move command " <> showMoveCmd moveCmd <> "!"
- Read upRead up
- Exclude checks
Found
do sendMsg $
textMsg $
"Can't identify sender of move command " <>
showMoveCmd moveCmd <> "!"
Perhaps
sendMsg $
textMsg $
"Can't identify sender of move command " <>
showMoveCmd moveCmd <> "!"
Unused LANGUAGE pragma Open
Open
{-# LANGUAGE LambdaCase #-}
- Read upRead up
- Exclude checks
Found
{-# LANGUAGE LambdaCase #-}
Perhaps
Redundant do Open
Open
Right afterMove -> do
handleAfterMove match game afterMove
- Read upRead up
- Exclude checks
Found
do handleAfterMove match game afterMove
Perhaps
handleAfterMove match game afterMove
Use section Open
Open
sendI18nMsg (flip hlCantUndo (Just CantUndoNoGame))
- Read upRead up
- Exclude checks
Found
(flip hlCantUndo (Just CantUndoNoGame))
Perhaps
(`hlCantUndo` (Just CantUndoNoGame))
Use section Open
Open
in sendI18nMsg (flip hlAIMove moveByAi)
- Read upRead up
- Exclude checks
Found
(flip hlAIMove moveByAi)
Perhaps
(`hlAIMove` moveByAi)
Reduce duplication Open
Open
let
match' = match { matchCurrentGame = Just game' }
- Read upRead up
- Exclude checks
Found
let match' = match{matchCurrentGame = Just game'}
modify $ \ chat -> chat{hcMatchState = MatchRunning match'}
sendMatchState
Perhaps
Combine with halma-telegram-bot/src/Game/Halma/TelegramBot/Controller.hs:228:7
Use section Open
Open
sendI18nMsg (flip hlUnrecognizedCmdMsg call)
- Read upRead up
- Exclude checks
Found
(flip hlUnrecognizedCmdMsg call)
Perhaps
(`hlUnrecognizedCmdMsg` call)
Use section Open
Open
sendI18nMsg (flip hlNotYourTurn notYourTurnInfo)
- Read upRead up
- Exclude checks
Found
(flip hlNotYourTurn notYourTurnInfo)
Perhaps
(`hlNotYourTurn` notYourTurnInfo)
Use section Open
Open
sendI18nMsg (flip hlCantUndo Nothing)
- Read upRead up
- Exclude checks
Found
(flip hlCantUndo Nothing)
Perhaps
(`hlCantUndo` Nothing)