Showing 292 of 292 total issues
Eta reduce Open
Open
glBufferData_null target size usage = glBufferData_val target (pToJSVal size) usage
- Read upRead up
- Exclude checks
Found
glBufferData_null target size usage
= glBufferData_val target (pToJSVal size) usage
Perhaps
glBufferData_null target size
= glBufferData_val target (pToJSVal size)
Use when Open
Open
if stage /= PixelStage then fail "depthTarget can be used only in pixel program"
else return ()
- Read upRead up
- Exclude checks
Found
if stage /= PixelStage then
fail "depthTarget can be used only in pixel program" else return ()
Perhaps
Control.Monad.when (stage /= PixelStage) $
fail "depthTarget can be used only in pixel program"
Use when Open
Open
if stage /= VertexStage then fail "attribute can only be defined in vertex program"
else return ()
- Read upRead up
- Exclude checks
Found
if stage /= VertexStage then
fail "attribute can only be defined in vertex program" else
return ()
Perhaps
Control.Monad.when (stage /= VertexStage) $
fail "attribute can only be defined in vertex program"
Use when Open
Open
if stage /= EndStage then fail "wrong program: stage should be end"
else return ()
- Read upRead up
- Exclude checks
Found
if stage /= EndStage then fail "wrong program: stage should be end"
else return ()
Perhaps
when (stage /= EndStage) $
fail "wrong program: stage should be end"
Eta reduce Open
Open
equal_ a b = EqualNode (nodeValueType a) a b
- Read upRead up
- Exclude checks
Found
equal_ a b = EqualNode (nodeValueType a) a b
Perhaps
equal_ a = EqualNode (nodeValueType a) a
Eta reduce Open
Open
lessEqual_ a b = LessEqualNode (nodeValueType a) a b
- Read upRead up
- Exclude checks
Found
lessEqual_ a b = LessEqualNode (nodeValueType a) a b
Perhaps
lessEqual_ a = LessEqualNode (nodeValueType a) a
Redundant return Open
Open
OP_JMP -> LuaInst [i + sbx + 1] $ \[jmpInstCode] codeState -> do
jmpInstStmts <- jmpInstCode codeState
return jmpInstStmts
- Read upRead up
- Exclude checks
Found
do jmpInstStmts <- jmpInstCode codeState
return jmpInstStmts
Perhaps
do jmpInstCode codeState
Use when Open
Open
else if (flags .&. RI_MOUSE_RIGHT_BUTTON_UP) > 0 then
addMouseEvent $ MouseUpEvent RightMouseButton
else return ()
- Read upRead up
- Exclude checks
Found
if (flags .&. RI_MOUSE_RIGHT_BUTTON_UP) > 0 then
addMouseEvent $ MouseUpEvent RightMouseButton else return ()
Perhaps
when ((flags .&. RI_MOUSE_RIGHT_BUTTON_UP) > 0) $
addMouseEvent $ MouseUpEvent RightMouseButton
Redundant do Open
Open
withForeignPtr bytes $ \ptr -> do
pokeElemOff (ptr `plusPtr` offset) i value
- Read upRead up
- Exclude checks
Found
do pokeElemOff (ptr `plusPtr` offset) i value
Perhaps
pokeElemOff (ptr `plusPtr` offset) i value
Use when Open
Open
if stage /= PixelStage then fail "colorTarget can be used only in pixel program"
else return ()
- Read upRead up
- Exclude checks
Found
if stage /= PixelStage then
fail "colorTarget can be used only in pixel program" else return ()
Perhaps
Control.Monad.when (stage /= PixelStage) $
fail "colorTarget can be used only in pixel program"
Eta reduce Open
Open
glBufferData_bs target bytes usage = glBufferData_val target (byteStringToJsDataView bytes) usage
- Read upRead up
- Exclude checks
Found
glBufferData_bs target bytes usage
= glBufferData_val target (byteStringToJsDataView bytes) usage
Perhaps
glBufferData_bs target bytes
= glBufferData_val target (byteStringToJsDataView bytes)
Redundant do Open
Open
iteration z r = do
-- if we got key-value pair
if r == MDB_SUCCESS then do
-- get key
keyLength <- fromIntegral . ptrToIntPtr <$> peek keyBufPtr
- Read upRead up
- Exclude checks
Found
do if r == MDB_SUCCESS then
do keyLength <- fromIntegral . ptrToIntPtr <$> peek keyBufPtr
keyPtr <- peekElemOff keyBufPtr 1
key <- B.packCStringLen (keyPtr, keyLength)
if B.isPrefixOf keyPrefix key then
do valueLength <- fromIntegral . ptrToIntPtr <$> peek valueBufPtr
valuePtr <- peekElemOff valueBufPtr 1
value <- B.packCStringLen (valuePtr, valueLength)
(continue, nz) <- step key value z
if continue then
iteration nz =<<
mdb_cursor_get cursorPtr keyBufPtr valueBufPtr MDB_NEXT
else return nz
else return z
else if r == MDB_NOTFOUND then return z else lmdbThrowError r
Perhaps
if r == MDB_SUCCESS then
do keyLength <- fromIntegral . ptrToIntPtr <$> peek keyBufPtr
keyPtr <- peekElemOff keyBufPtr 1
key <- B.packCStringLen (keyPtr, keyLength)
if B.isPrefixOf keyPrefix key then
do valueLength <- fromIntegral . ptrToIntPtr <$> peek valueBufPtr
valuePtr <- peekElemOff valueBufPtr 1
value <- B.packCStringLen (valuePtr, valueLength)
(continue, nz) <- step key value z
if continue then
iteration nz =<<
mdb_cursor_get cursorPtr keyBufPtr valueBufPtr MDB_NEXT
else return nz
else return z
else if r == MDB_NOTFOUND then return z else lmdbThrowError r
Redundant do Open
Open
funDecl variant = do
funD (mkName $ variant ++ "__") [clause [] (normalB [| SwizzleNode (valueType (undefined :: $(varT v))) (valueType (undefined :: $(conT resultTypeName) $(varT v))) $(litE $ stringL variant) |]) []]
- Read upRead up
- Exclude checks
Found
do funD (mkName $ variant ++ "__")
[clause []
(normalB
[|
SwizzleNode (valueType (undefined :: $( varT v )))
(valueType (undefined :: $( conT resultTypeName ) $( varT v )))
$( litE $ stringL variant )
|])
[]]
Perhaps
funD (mkName $ variant ++ "__")
[clause []
(normalB
[|
SwizzleNode (valueType (undefined :: $( varT v )))
(valueType (undefined :: $( conT resultTypeName ) $( varT v )))
$( litE $ stringL variant )
|])
[]]
Redundant do Open
Open
OP_VARARG -> LuaInst [nextInstId] $ \[nextInstCode] codeState -> do
putRets (if b == 0 then Left a else Right [a .. (a + b - 2)]) [| return $(varE varargName) |] nextInstCode codeState
- Read upRead up
- Exclude checks
Found
do putRets (if b == 0 then Left a else Right [a .. (a + b - 2)])
[| return $( varE varargName ) |]
nextInstCode
codeState
Perhaps
putRets (if b == 0 then Left a else Right [a .. (a + b - 2)])
[| return $( varE varargName ) |]
nextInstCode
codeState
Redundant do Open
Open
}) value = do
withForeignPtr bytes $ \ptr -> do
pokeByteOff ptr offset value
- Read upRead up
- Exclude checks
Found
do withForeignPtr bytes $ \ ptr -> do pokeByteOff ptr offset value
Perhaps
withForeignPtr bytes $ \ ptr -> do pokeByteOff ptr offset value
Use when Open
Open
else if (flags .&. RI_MOUSE_LEFT_BUTTON_UP) > 0 then
addMouseEvent $ MouseUpEvent LeftMouseButton
else return ()
- Read upRead up
- Exclude checks
Found
if (flags .&. RI_MOUSE_LEFT_BUTTON_UP) > 0 then
addMouseEvent $ MouseUpEvent LeftMouseButton else return ()
Perhaps
when ((flags .&. RI_MOUSE_LEFT_BUTTON_UP) > 0) $
addMouseEvent $ MouseUpEvent LeftMouseButton
Use when Open
Open
if stage /= PixelStage then fail "dualColorTarget can be used only in pixel program"
else return ()
- Read upRead up
- Exclude checks
Found
if stage /= PixelStage then
fail "dualColorTarget can be used only in pixel program" else
return ()
Perhaps
Control.Monad.when (stage /= PixelStage) $
fail "dualColorTarget can be used only in pixel program"
Eta reduce Open
Open
less_ a b = LessNode (nodeValueType a) a b
- Read upRead up
- Exclude checks
Found
less_ a b = LessNode (nodeValueType a) a b
Perhaps
less_ a = LessNode (nodeValueType a) a
Use when Open
Open
if stage == EndStage then fail "failed to add temp after end of the program"
else return ()
- Read upRead up
- Exclude checks
Found
if stage == EndStage then
fail "failed to add temp after end of the program" else return ()
Perhaps
Control.Monad.when (stage == EndStage) $
fail "failed to add temp after end of the program"
Eta reduce Open
Open
if_ c a b = IfNode (nodeValueType a) c a b
- Read upRead up
- Exclude checks
Found
if_ c a b = IfNode (nodeValueType a) c a b
Perhaps
if_ c a = IfNode (nodeValueType a) c a