Showing 32 of 32 total issues
Unused LANGUAGE pragma Open
Open
{-# LANGUAGE OverloadedStrings #-}
- Read upRead up
- Exclude checks
Found
{-# LANGUAGE OverloadedStrings #-}
Perhaps
Redundant bracket Open
Open
, hlUnrecognizedCmdMsg = \(CmdCall { cmdCallName = cmd }) ->
- Read upRead up
- Exclude checks
Found
(CmdCall{cmdCallName = cmd})
Perhaps
CmdCall{cmdCallName = cmd}
Unused LANGUAGE pragma Open
Open
{-# LANGUAGE LambdaCase #-}
- Read upRead up
- Exclude checks
Found
{-# LANGUAGE LambdaCase #-}
Perhaps
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)
Unused LANGUAGE pragma Open
Open
{-# LANGUAGE StandaloneDeriving #-}
- Read upRead up
- Exclude checks
Found
{-# LANGUAGE StandaloneDeriving #-}
Perhaps
Unused LANGUAGE pragma Open
Open
{-# LANGUAGE NamedFieldPuns #-}
- Read upRead up
- Exclude checks
Found
{-# LANGUAGE NamedFieldPuns #-}
Perhaps
Unused LANGUAGE pragma Open
Open
{-# LANGUAGE LambdaCase #-}
- Read upRead up
- Exclude checks
Found
{-# LANGUAGE LambdaCase #-}
Perhaps
Redundant bracket Open
Open
, hlUnrecognizedCmdMsg = \(CmdCall { cmdCallName = cmd }) ->
- Read upRead up
- Exclude checks
Found
(CmdCall{cmdCallName = cmd})
Perhaps
CmdCall{cmdCallName = cmd}
Use tuple-section Open
Open
concatMap (\f -> map ((,) f) $ filter (>= f) (neighbours grid f)) fields
- Read upRead up
- Exclude checks
Found
((,) f)
Perhaps
(f,)
Applying this change:
- may require
{-# LANGUAGE TupleSections #-}
adding to the top of the file
Redundant bracket Open
Open
handleCommand call@(CmdCall { cmdCallName = cmd }) = do
- Read upRead up
- Exclude checks
Found
(CmdCall{cmdCallName = cmd})
Perhaps
CmdCall{cmdCallName = cmd}
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
_ -> do
sendI18nMsg (flip hlCantUndo (Just CantUndoNoGame))
- Read upRead up
- Exclude checks
Found
do sendI18nMsg (flip hlCantUndo (Just CantUndoNoGame))
Perhaps
sendI18nMsg (flip hlCantUndo (Just CantUndoNoGame))
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
Eta reduce Open
Open
playersOnLargeGrid players = Configuration LargeGrid players
- Read upRead up
- Exclude checks
Found
playersOnLargeGrid players = Configuration LargeGrid players
Perhaps
playersOnLargeGrid = Configuration LargeGrid
Unused LANGUAGE pragma Open
Open
{-# LANGUAGE OverloadedStrings #-}
- Read upRead up
- Exclude checks
Found
{-# LANGUAGE OverloadedStrings #-}
Perhaps
Redundant do Open
Open
_ -> do
sendI18nMsg hlCantStartNewRoundBecauseNoMatch
- Read upRead up
- Exclude checks
Found
do sendI18nMsg hlCantStartNewRoundBecauseNoMatch
Perhaps
sendI18nMsg hlCantStartNewRoundBecauseNoMatch
Unused LANGUAGE pragma Open
Open
{-# LANGUAGE ViewPatterns #-}
- Read upRead up
- Exclude checks
Found
{-# LANGUAGE ViewPatterns #-}
Perhaps
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 <> "!"
Use guards Open
Open
go (Just (currentMax, bestMove)) (option@(rating, move):options) =
if isWin rating then
option
else if newRating <= currentMax then
go (Just (currentMax, bestMove)) options
- Read upRead up
- Exclude checks
Found
go (Just (currentMax, bestMove)) (option@(rating, move) : options)
= if isWin rating then option else
if newRating <= currentMax then
go (Just (currentMax, bestMove)) options else
if boundReached newRating then (newRating, move) else
go (Just (newRating, move)) options
where newRating = fst $ nextLevel option (Just currentMax)
Perhaps
go (Just (currentMax, bestMove)) (option@(rating, move) : options)
| isWin rating = option
| newRating <= currentMax =
go (Just (currentMax, bestMove)) options
| boundReached newRating = (newRating, move)
| otherwise = go (Just (newRating, move)) options
where newRating = fst $ nextLevel option (Just currentMax)
Use section Open
Open
sendI18nMsg (flip hlNotYourTurn notYourTurnInfo)
- Read upRead up
- Exclude checks
Found
(flip hlNotYourTurn notYourTurnInfo)
Perhaps
(`hlNotYourTurn` notYourTurnInfo)