Showing 292 of 292 total issues

Redundant bracket
Open

          return $ (bindS (varP f) [| readMutVar $(r a) |]) : getArgsStmts ++ [noBindS callE]
Severity: Minor
Found in flaw-lua/Flaw/Script/Lua/Chunk.hs by hlint

Found

(bindS (varP f) [| readMutVar $( r a ) |]) :
  getArgsStmts ++ [noBindS callE]

Perhaps

bindS (varP f) [| readMutVar $( r a ) |] :
  getArgsStmts ++ [noBindS callE]

Use camelCase
Open

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

Found

newtype JS_WebGLSampler = JS_WebGLSampler JSVal

Perhaps

newtype JSWebGLSampler = JSWebGLSampler JSVal

Use camelCase
Open

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

Found

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

Perhaps

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

Use camelCase
Open

glGetUniformLocation_s :: JS_WebGLProgram -> T.Text -> IO JS_WebGLUniformLocation
Severity: Minor
Found in flaw-gl/Flaw/Graphics/WebGL/FFI.hs by hlint

Found

glGetUniformLocation_s ::
  JS_WebGLProgram -> T.Text -> IO JS_WebGLUniformLocation

Perhaps

glGetUniformLocationS ::
  JS_WebGLProgram -> T.Text -> IO JS_WebGLUniformLocation

Use camelCase
Open

glGetUniformBlockIndex_s programName uniformBlockName = glGetUniformBlockIndex_val programName $ pToJSVal uniformBlockName
Severity: Minor
Found in flaw-gl/Flaw/Graphics/WebGL/FFI.hs by hlint

Found

glGetUniformBlockIndex_s programName uniformBlockName = ...

Perhaps

glGetUniformBlockIndexS programName uniformBlockName = ...

Redundant bracket
Open

      (map (\a -> [| nodeValueType $(varE a) |]) ps) ++ [ [| valueType $(varE u) |] ] ++ (map varE ps)

Found

(map (\ a -> [| nodeValueType $( varE a ) |]) ps) ++
  [[| valueType $( varE u ) |]] ++ (map varE ps)

Perhaps

map (\ a -> [| nodeValueType $( varE a ) |]) ps ++
  [[| valueType $( varE u ) |]] ++ (map varE ps)

Redundant $
Open

    [ funD (mkName $ [c, '_']) [clause [] (normalB [| ComponentNode (valueType (undefined :: $(varT v))) (valueType (undefined :: VecElement $(varT v))) $(litE $ charL c) |]) []]

Found

mkName $ [c, '_']

Perhaps

mkName [c, '_']

Redundant bracket
Open

          return $ (noBindS [| do
            step <- readMutVar $(r $ a + 2)
            idx <- readMutVar $(r a)
            writeMutVar $(r a) =<< luaValueSub idx step
            |]) : followingInstStmts
Severity: Minor
Found in flaw-lua/Flaw/Script/Lua/Chunk.hs by hlint

Found

(noBindS
   [|
     do step <- readMutVar $( r $ a + 2 )
        idx <- readMutVar $( r a )
        writeMutVar $( r a ) =<< luaValueSub idx step
     |])
  : followingInstStmts

Perhaps

noBindS
  [|
    do step <- readMutVar $( r $ a + 2 )
       idx <- readMutVar $( r a )
       writeMutVar $( r a ) =<< luaValueSub idx step
    |]
  : followingInstStmts

Use camelCase
Open

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

Found

lua_pop :: Ptr C_lua_State -> CInt -> IO ()

Perhaps

luaPop :: Ptr C_lua_State -> CInt -> IO ()

Use list comprehension
Open

    otherShaderInfos = concatMap (\(otherStage, otherShaderInfo) -> if otherStage == stage then [] else [otherShaderInfo]) shaders

Found

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

Perhaps

[otherShaderInfo | not (otherStage == stage)]

Reduce duplication
Open

    bufferName <- glAllocBufferName
Severity: Minor
Found in flaw-gl/Flaw/Graphics/GlContext.hs by hlint

Found

bufferName <- glAllocBufferName
glBindBuffer GL_ARRAY_BUFFER bufferName
glCheckErrors0 "bind buffer"

Perhaps

Combine with flaw-gl/Flaw/Graphics/GlContext.hs:583:5

Use camelCase
Open

glBindAttribLocation_s program index attributeName = glBindAttribLocation_val program index $ pToJSVal attributeName
Severity: Minor
Found in flaw-gl/Flaw/Graphics/WebGL/FFI.hs by hlint

Found

glBindAttribLocation_s program index attributeName = ...

Perhaps

glBindAttribLocationS program index attributeName = ...

Use camelCase
Open

glBufferData_bs target bytes usage = glBufferData_val target (byteStringToJsDataView bytes) usage
Severity: Minor
Found in flaw-gl/Flaw/Graphics/WebGL/FFI.hs by hlint

Found

glBufferData_bs target bytes usage = ...

Perhaps

glBufferDataBs target bytes usage = ...

Use camelCase
Open

type MDB_dbi = CUInt
Severity: Minor
Found in flaw-lmdb/Flaw/Data/Lmdb.hs by hlint

Found

type MDB_dbi = CUInt

Perhaps

type MDBDbi = CUInt

Use camelCase
Open

type MDB_val = Ptr CChar
Severity: Minor
Found in flaw-lmdb/Flaw/Data/Lmdb.hs by hlint

Found

type MDB_val = Ptr CChar

Perhaps

type MDBVal = Ptr CChar

Fuse foldr/map
Open

      foldr (\a b -> [t| $a -> $b |]) [t| Node $(vecType $ sum cs) |] $ map argType cs

Found

foldr (\ a b -> [t| $a -> $b |]) [t| Node $( vecType $ sum cs ) |]
  $ map argType cs

Perhaps

foldr ((\ a b -> [t| $a -> $b |]) . argType)
  [t| Node $( vecType $ sum cs ) |]
  cs

Redundant bracket
Open

          return $ (noBindS [| writeMutVar $(r a) $(kst nax) |]) : nextNextInstStmts
Severity: Minor
Found in flaw-lua/Flaw/Script/Lua/Chunk.hs by hlint

Found

(noBindS [| writeMutVar $( r a ) $( kst nax ) |]) :
  nextNextInstStmts

Perhaps

noBindS [| writeMutVar $( r a ) $( kst nax ) |] : nextNextInstStmts

Use camelCase
Open

data C_lua_State
Severity: Minor
Found in flaw-lua/Flaw/Script/Lua/FFI.hs by hlint

Found

data C_lua_State

Perhaps

data CLuaState

Use camelCase
Open

hb_glyph_info_t_size :: Int

Found

hb_glyph_info_t_size :: Int

Perhaps

hbGlyphInfoTSize :: Int

Use camelCase
Open

type FT_Face = Ptr FT_FaceRec

Found

type FT_Face = Ptr FT_FaceRec

Perhaps

type FTFace = Ptr FT_FaceRec
Severity
Category
Status
Source
Language