Showing 292 of 292 total issues
Unused LANGUAGE pragma Open
Open
{-# LANGUAGE DeriveGeneric, FlexibleContexts, FunctionalDependencies, MultiParamTypeClasses, RankNTypes, TypeFamilies #-}
- Read upRead up
- Exclude checks
Found
{-# LANGUAGE DeriveGeneric, FlexibleContexts,
FunctionalDependencies, MultiParamTypeClasses, RankNTypes,
TypeFamilies #-}
Perhaps
{-# LANGUAGE DeriveGeneric, FlexibleContexts,
FunctionalDependencies, RankNTypes, TypeFamilies #-}
Applying this change:
- Extension MultiParamTypeClasses is implied by FunctionalDependencies
Eta reduce Open
Open
max_ a b = MaxNode (nodeValueType a) a b
- Read upRead up
- Exclude checks
Found
max_ a b = MaxNode (nodeValueType a) a b
Perhaps
max_ a = MaxNode (nodeValueType a) a
Use when Open
Open
if stage /= VertexStage then fail $ show ("wrong stage to add pixel program", stage)
else return ()
- Read upRead up
- Exclude checks
Found
if stage /= VertexStage then
fail $ show ("wrong stage to add pixel program", stage) else
return ()
Perhaps
Control.Monad.when (stage /= VertexStage) $
fail $ show ("wrong stage to add pixel program", stage)
Eta reduce Open
Open
glBufferData_null target size usage = glBufferData target size nullPtr usage
- Read upRead up
- Exclude checks
Found
glBufferData_null target size usage
= glBufferData target size nullPtr usage
Perhaps
glBufferData_null target size = glBufferData target size nullPtr
Eta reduce Open
Open
clamp a b c = ClampNode (nodeValueType a) a b c
- Read upRead up
- Exclude checks
Found
clamp a b c = ClampNode (nodeValueType a) a b c
Perhaps
clamp a = ClampNode (nodeValueType a) a
Use when Open
Open
else if (flags .&. RI_MOUSE_MIDDLE_BUTTON_UP) > 0 then
addMouseEvent $ MouseUpEvent MiddleMouseButton
else return ()
- Read upRead up
- Exclude checks
Found
if (flags .&. RI_MOUSE_MIDDLE_BUTTON_UP) > 0 then
addMouseEvent $ MouseUpEvent MiddleMouseButton else return ()
Perhaps
when ((flags .&. RI_MOUSE_MIDDLE_BUTTON_UP) > 0) $
addMouseEvent $ MouseUpEvent MiddleMouseButton
Redundant do Open
Open
}) i value = do
withForeignPtr bytes $ \ptr -> do
pokeElemOff (ptr `plusPtr` offset) i value
- Read upRead up
- Exclude checks
Found
do withForeignPtr bytes $
\ ptr -> do pokeElemOff (ptr `plusPtr` offset) i value
Perhaps
withForeignPtr bytes $
\ ptr -> do pokeElemOff (ptr `plusPtr` offset) i value
Eta reduce Open
Open
min_ a b = MinNode (nodeValueType a) a b
- Read upRead up
- Exclude checks
Found
min_ a b = MinNode (nodeValueType a) a b
Perhaps
min_ a = MinNode (nodeValueType a) a
Redundant do Open
Open
followingInstsCodes <- forM followingInstsIds $ \followingInstId -> do
-- for instruction with one referrer (this one), emit stmts inline
if instructionsRefCounts VU.! followingInstId == 1 then getInstructionCode $ instructions V.! followingInstId
-- otherwise use name
else return $ \LuaCodeState
- Read upRead up
- Exclude checks
Found
do if instructionsRefCounts VU.! followingInstId == 1 then
getInstructionCode $ instructions V.! followingInstId else
return $
\ LuaCodeState{luaCodeStateTop = top} ->
do when (top >= 0) $
reportError
"flaw-lua: instruction reference cannot send dynamic values"
return [noBindS $ varE $ instructionsNames V.! followingInstId]
Perhaps
if instructionsRefCounts VU.! followingInstId == 1 then
getInstructionCode $ instructions V.! followingInstId else
return $
\ LuaCodeState{luaCodeStateTop = top} ->
do when (top >= 0) $
reportError
"flaw-lua: instruction reference cannot send dynamic values"
return [noBindS $ varE $ instructionsNames V.! followingInstId]
Redundant do Open
Open
} (Vec2 x y) = do
if x < 0 || y < 0 || y >= columnHeaderHeight then return False
else (x <) <$> readTVar widthVar
- Read upRead up
- Exclude checks
Found
do if x < 0 || y < 0 || y >= columnHeaderHeight then return False
else (x <) <$> readTVar widthVar
Perhaps
if x < 0 || y < 0 || y >= columnHeaderHeight then return False else
(x <) <$> readTVar widthVar
Unused LANGUAGE pragma Open
Open
{-# LANGUAGE DeriveGeneric, GeneralizedNewtypeDeriving, OverloadedStrings, ViewPatterns #-}
- Read upRead up
- Exclude checks
Found
{-# LANGUAGE DeriveGeneric, GeneralizedNewtypeDeriving,
OverloadedStrings, ViewPatterns #-}
Perhaps
{-# LANGUAGE DeriveGeneric, GeneralizedNewtypeDeriving,
OverloadedStrings #-}
Applying this change:
- Extension ViewPatterns is not used
Use forM_ Open
Open
accountForPair a b = case M.lookup (PairKey a b) pairHeapIndexByKey of
Just h -> VGM.unsafeModify pairTriangleCounts (+ 1) h
Nothing -> return ()
- Read upRead up
- Exclude checks
Found
case M.lookup (PairKey a b) pairHeapIndexByKey of
Just h -> VGM.unsafeModify pairTriangleCounts (+ 1) h
Nothing -> return ()
Perhaps
Data.Foldable.forM_ (M.lookup (PairKey a b) pairHeapIndexByKey)
(VGM.unsafeModify pairTriangleCounts (+ 1))
Use gets Open
Open
unit <- (csUnit . ccSettings) <$> get
- Read upRead up
- Exclude checks
Found
(csUnit . ccSettings) <$> get
Perhaps
gets (csUnit . ccSettings)
Use forM_ Open
Open
case HM.lookup userId sessionsByUserId of
Just session -> deleteSession sessionManager session
Nothing -> return ()
- Read upRead up
- Exclude checks
Found
case HM.lookup userId sessionsByUserId of
Just session -> deleteSession sessionManager session
Nothing -> return ()
Perhaps
Data.Foldable.forM_ (HM.lookup userId sessionsByUserId)
(deleteSession sessionManager)
Redundant do Open
Open
itchWebApiDownloadKeys httpManager apiKey (ItchGameId gameId) (ItchUserId userId) = do
A.parseMaybe parseResponse <$> itchWebApiRequest httpManager apiKey ("/game/" <> fromString (show gameId) <> "/download_keys")
[ ("user_id", Just $ fromString $ show userId)
]
- Read upRead up
- Exclude checks
Found
do A.parseMaybe parseResponse <$>
itchWebApiRequest httpManager apiKey
("/game/" <> fromString (show gameId) <> "/download_keys")
[("user_id", Just $ fromString $ show userId)]
Perhaps
A.parseMaybe parseResponse <$>
itchWebApiRequest httpManager apiKey
("/game/" <> fromString (show gameId) <> "/download_keys")
[("user_id", Just $ fromString $ show userId)]
Use when Open
Open
else if pair_cost rp < pair_cost p && pair_cost rp <= pair_cost lp then swap r rp
else return ()
- Read upRead up
- Exclude checks
Found
if pair_cost rp < pair_cost p && pair_cost rp <= pair_cost lp then
swap r rp else return ()
Perhaps
when (pair_cost rp < pair_cost p && pair_cost rp <= pair_cost lp) $
swap r rp
Use gets Open
Open
getParsedArrays = ccNameArrays <$> get
- Read upRead up
- Exclude checks
Found
ccNameArrays <$> get
Perhaps
gets ccNameArrays
Use gets Open
Open
} <- fmap ccSettings get
- Read upRead up
- Exclude checks
Found
fmap ccSettings get
Perhaps
gets ccSettings
Use gets Open
Open
getParsedArrays = ccWord32Arrays <$> get
- Read upRead up
- Exclude checks
Found
ccWord32Arrays <$> get
Perhaps
gets ccWord32Arrays
Use gets Open
Open
} <- fmap ccSettings get
- Read upRead up
- Exclude checks
Found
fmap ccSettings get
Perhaps
gets ccSettings