Showing 292 of 292 total issues

Use camelCase
Open

lua_pop s n = lua_settop s ((-1) - n)
Severity: Minor
Found in flaw-lua/Flaw/Script/Lua/FFI.hs by hlint

Found

lua_pop s n = ...

Perhaps

luaPop s n = ...

Reduce duplication
Open

    av <- $(embedIOExp a)
Severity: Minor
Found in flaw-build/Flaw/Build.hs by hlint

Found

av <- $( embedIOExp a )
bv <- $( embedIOExp b )
cv <- $( embedIOExp c )

Perhaps

Combine with flaw-build/Flaw/Build.hs:133:5

Use camelCase
Open

glShaderSource_s :: GLuint -> T.Text -> IO ()
Severity: Minor
Found in flaw-gl/Flaw/Graphics/OpenGL/FFI.hs by hlint

Found

glShaderSource_s :: GLuint -> T.Text -> IO ()

Perhaps

glShaderSourceS :: GLuint -> T.Text -> IO ()

Use camelCase
Open

newtype JS_WebGLBuffer = JS_WebGLBuffer JSVal
Severity: Minor
Found in flaw-gl/Flaw/Graphics/WebGL/FFI.hs by hlint

Found

newtype JS_WebGLBuffer = JS_WebGLBuffer JSVal

Perhaps

newtype JSWebGLBuffer = JSWebGLBuffer JSVal

Reduce duplication
Open

    position <- peek $ castPtr positionPtr
Severity: Minor
Found in flaw-bullet/Flaw/Physics/Bullet.hs by hlint

Found

position <- peek $ castPtr positionPtr
orientation <- peek $ castPtr orientationPtr
return $ QuatOffset (FloatQ orientation) position

Perhaps

Combine with flaw-bullet/Flaw/Physics/Bullet.hs:81:5

Use camelCase
Open

lua_tostring :: Ptr C_lua_State -> CInt -> IO (Ptr CChar)
Severity: Minor
Found in flaw-lua/Flaw/Script/Lua/FFI.hs by hlint

Found

lua_tostring :: Ptr C_lua_State -> CInt -> IO (Ptr CChar)

Perhaps

luaTostring :: Ptr C_lua_State -> CInt -> IO (Ptr CChar)

Use camelCase
Open

lua_tostring s i = lua_tolstring s i nullPtr
Severity: Minor
Found in flaw-lua/Flaw/Script/Lua/FFI.hs by hlint

Found

lua_tostring s i = ...

Perhaps

luaTostring s i = ...

Use list comprehension
Open

    otherShaderInfos = concatMap (\(otherStage, otherShaderInfo) -> if otherStage == stage then [] else [otherShaderInfo]) shaders
Severity: Minor
Found in flaw-gl/Flaw/Graphics/GLSL.hs by hlint

Found

if otherStage == stage then [] else [otherShaderInfo]

Perhaps

[otherShaderInfo | not (otherStage == stage)]

Use camelCase
Open

glGetProgramInfoLog_s program = pFromJSVal <$> glGetProgramInfoLog_val program
Severity: Minor
Found in flaw-gl/Flaw/Graphics/WebGL/FFI.hs by hlint

Found

glGetProgramInfoLog_s program = ...

Perhaps

glGetProgramInfoLogS program = ...

Use camelCase
Open

data MDB_txn
Severity: Minor
Found in flaw-lmdb/Flaw/Data/Lmdb.hs by hlint

Found

data MDB_txn

Perhaps

data MDBTxn

Redundant bracket
Open

    | n <= s || s >= (sizeOf (undefined :: Float4)) = s

Found

s >= (sizeOf (undefined :: Float4))

Perhaps

s >= sizeOf (undefined :: Float4)

Use camelCase
Open

data C_BulletCharacter
Severity: Minor
Found in flaw-bullet/Flaw/Physics/Bullet.hs by hlint

Found

data C_BulletCharacter

Perhaps

data CBulletCharacter

Reduce duplication
Open

      size <- readTVar sizeVar
Severity: Minor
Found in flaw-ui/Flaw/UI/Frame.hs by hlint

Found

size <- readTVar sizeVar
let Vec2 sx sy = size
return $ x < sx && y < sy

Perhaps

Combine with flaw-ui/Flaw/UI/Frame.hs:228:7

Reduce duplication
Open

            glGetProgramiv programName GL_LINK_STATUS statusPtr
Severity: Minor
Found in flaw-gl/Flaw/Graphics/GlContext.hs by hlint

Found

glGetProgramiv programName GL_LINK_STATUS statusPtr
glCheckErrors0 "get program link status"
peek statusPtr

Perhaps

Combine with flaw-gl/Flaw/Graphics/GlContext.hs:737:9

Use camelCase
Open

glBufferData_bs target bytes usage = B.unsafeUseAsCStringLen bytes $ \(bytesPtr, bytesLen) ->
  glBufferData target (fromIntegral bytesLen) bytesPtr usage
Severity: Minor
Found in flaw-gl/Flaw/Graphics/OpenGL/FFI.hs by hlint

Found

glBufferData_bs target bytes usage = ...

Perhaps

glBufferDataBs target bytes usage = ...

Use camelCase
Open

glBufferData_null target size usage = glBufferData target size nullPtr usage
Severity: Minor
Found in flaw-gl/Flaw/Graphics/OpenGL/FFI.hs by hlint

Found

glBufferData_null target size usage = ...

Perhaps

glBufferDataNull target size usage = ...

Use camelCase
Open

glGetProgramInfoLog_s programName = do
  logLength <- alloca $ \logLengthPtr -> do
    glGetProgramiv programName GL_INFO_LOG_LENGTH logLengthPtr
    peek logLengthPtr
  fmap T.decodeUtf8 $ allocaBytes (fromIntegral logLength) $ \logPtr -> do
Severity: Minor
Found in flaw-gl/Flaw/Graphics/OpenGL/FFI.hs by hlint

Found

glGetProgramInfoLog_s programName = ...

Perhaps

glGetProgramInfoLogS programName = ...

Use camelCase
Open

glGetShaderInfoLog_s shaderName = do
  logLength <- alloca $ \logLengthPtr -> do
    poke logLengthPtr 0
    glGetShaderiv shaderName GL_INFO_LOG_LENGTH logLengthPtr
    peek logLengthPtr
Severity: Minor
Found in flaw-gl/Flaw/Graphics/OpenGL/FFI.hs by hlint

Found

glGetShaderInfoLog_s shaderName = ...

Perhaps

glGetShaderInfoLogS shaderName = ...

Use camelCase
Open

newtype JS_WebGLShader = JS_WebGLShader JSVal
Severity: Minor
Found in flaw-gl/Flaw/Graphics/WebGL/FFI.hs by hlint

Found

newtype JS_WebGLShader = JS_WebGLShader JSVal

Perhaps

newtype JSWebGLShader = JSWebGLShader JSVal

Avoid lambda
Open

      valueToShowList $(conP name $ map varP ps) = $(listE $ map (\p -> appE (varE 'show) $ varE p) ps)

Found

\ p -> appE (varE 'show) $ varE p

Perhaps

appE (varE 'show) . varE
Severity
Category
Status
Source
Language