Showing 292 of 292 total issues

Use camelCase
Open

type FN_vkDestroyDevice
  =  VkDevice
  -> Ptr VkAllocationCallbacks
  -> IO ()

Found

type FN_vkDestroyDevice =
    VkDevice -> Ptr VkAllocationCallbacks -> IO ()

Perhaps

type FNVkDestroyDevice =
    VkDevice -> Ptr VkAllocationCallbacks -> IO ()

Redundant bracket
Open

registerBasicEntityType :: EntityManager -> EntityTypeId -> (GetEntity SomeBasicEntity) -> IO ()
Severity: Minor
Found in flaw-editor/Flaw/Editor/Entity.hs by hlint

Found

(GetEntity SomeBasicEntity) -> IO ()

Perhaps

GetEntity SomeBasicEntity -> IO ()

Reduce duplication
Open

    let v = undefined :: VertexPNT
Severity: Minor
Found in flaw-editor/exe/model-editor.hs by hlint

Found

let v = undefined :: VertexPNT
aPosition <- vertexAttribute 0 0 $ vertexPositionAttribute v
aNormal <- vertexAttribute 0 0 $ vertexNormalAttribute v

Perhaps

Combine with flaw-editor/exe/model-editor.hs:398:5

Use camelCase
Open

hb_x_advance = castPtr

Found

hb_x_advance = ...

Perhaps

hbXAdvance = ...

Use camelCase
Open

hb_codepoint = castPtr

Found

hb_codepoint = ...

Perhaps

hbCodepoint = ...

Redundant bracket
Open

    [ patSynSigD v (forallT [PlainTV a] (sequence [(conT ''Vectorized) `appT` (varT a)]) $ foldr (appT . (appT arrowT) . varT) ((conT v) `appT` (varT a)) (replicate (dimN * dimM) a))
Severity: Minor
Found in flaw-math/Flaw/Math.hs by hlint

Found

(conT v) `appT` (varT a)

Perhaps

(conT v) `appT` varT a

Redundant $
Open

  classD (sequence [ [t| $(conT $ mkName $ "Vec" ++ [toUpper c]) $(varT tvV) |] | c <- components])
Severity: Minor
Found in flaw-math/Flaw/Math.hs by hlint

Found

conT $ mkName

Perhaps

conT mkName

Redundant bracket
Open

eqEntityInterfaces :: (EntityInterface a, EntityInterface b) => Proxy a -> Proxy b -> Maybe ((Proxy a) :~: (Proxy b))
Severity: Minor
Found in flaw-editor/Flaw/Editor/Entity.hs by hlint

Found

(Proxy a) :~: (Proxy b)

Perhaps

Proxy a :~: (Proxy b)

Reduce duplication
Open

          renderUniformStorage usObject
Severity: Minor
Found in flaw-editor/exe/model-editor.hs by hlint

Found

renderUniformStorage usObject
renderVertexBuffer 0 vbObject
renderIndexBuffer ibObject

Perhaps

Combine with flaw-editor/exe/model-editor.hs:886:11

Use camelCase
Open

hb_x_offset p = advancePtr (castPtr p) 2

Found

hb_x_offset p = ...

Perhaps

hbXOffset p = ...

Use camelCase
Open

type FT_Error = CInt

Found

type FT_Error = CInt

Perhaps

type FTError = CInt

Use camelCase
Open

type Hb_codepoint_t = Word32

Found

type Hb_codepoint_t = Word32

Perhaps

type HbCodepointT = Word32

Use camelCase
Open

type FT_Library = Ptr FT_LibraryRec

Found

type FT_Library = Ptr FT_LibraryRec

Perhaps

type FTLibrary = Ptr FT_LibraryRec

Redundant $
Open

    tySynD (mkName $ mathTypePrefix ++ dimStr) [] [t| $(conT $ mkName $ "Vec" ++ dimStr) $(conT mathTypeName) |]
Severity: Minor
Found in flaw-math/Flaw/Math/Internal.hs by hlint

Found

conT $ mkName

Perhaps

conT mkName

Use newtype instead of data
Open

data AssetBuilderError ai
  = AssetBuilderDuplicateAssetIdError ai
  deriving Typeable
Severity: Minor
Found in flaw-asset/Flaw/Asset.hs by hlint

Found

data AssetBuilderError ai
  = AssetBuilderDuplicateAssetIdError ai
  deriving Typeable

Perhaps

newtype AssetBuilderError ai
  = AssetBuilderDuplicateAssetIdError ai
  deriving Typeable

Applying this change:

  • decreases laziness

Redundant $
Open

    tySynD (mkName $ mathTypePrefix ++ dimStr) [] [t| $(conT $ mkName $ "Mat" ++ dimStr) $(conT mathTypeName) |]
Severity: Minor
Found in flaw-math/Flaw/Math/Internal.hs by hlint

Found

conT $ mkName

Perhaps

conT mkName

Use camelCase
Open

type FN_vkInternalAllocationNotification = Ptr () -> CSize -> VkInternalAllocationType -> VkSystemAllocationScope -> IO ()

Found

type FN_vkInternalAllocationNotification =
    Ptr ()
    -> CSize
       -> VkInternalAllocationType -> VkSystemAllocationScope -> IO ()

Perhaps

type FNVkInternalAllocationNotification =
    Ptr ()
    -> CSize
       -> VkInternalAllocationType -> VkSystemAllocationScope -> IO ()

Use camelCase
Open

type FN_vkDestroyShaderModule
  =  VkDevice
  -> VkShaderModule
  -> Ptr VkAllocationCallbacks
  -> IO ()

Found

type FN_vkDestroyShaderModule =
    VkDevice -> VkShaderModule -> Ptr VkAllocationCallbacks -> IO ()

Perhaps

type FNVkDestroyShaderModule =
    VkDevice -> VkShaderModule -> Ptr VkAllocationCallbacks -> IO ()

Fuse foldr/map
Open

      [ funD 'compare [clause [conP conName $ map varP as, conP conName $ map varP bs] (normalB $ foldr ($) [| EQ |] $ map (\(a, b) c ->
        [| case compare $(varE a) $(varE b) of
          EQ -> $c
          r -> r
          |]) $ zip as bs) []]
Severity: Minor
Found in flaw-math/Flaw/Math.hs by hlint

Found

foldr ($) [| EQ |] $
  map
    (\ (a, b) c ->
       [|
         case compare $( varE a ) $( varE b ) of
             EQ -> $c
             r -> r
         |])
    $ zip as bs

Perhaps

foldr
  (($) .
     (\ (a, b) c ->
        [|
          case compare $( varE a ) $( varE b ) of
              EQ -> $c
              r -> r
          |]))
  [| EQ |]
  (zip as bs)

Reduce duplication
Open

    currentValueVar <- lift $ newTVar initialEntity

Found

currentValueVar <- lift $ newTVar initialEntity
itemHandlesVar <- lift $ newTVar M.empty
FlowLayoutState{flsMetrics =
                  metrics@Metrics{metricsMainWidth = metricMainWidth}} <- get

Perhaps

Combine with flaw-editor/Flaw/Editor/Entity/Basic.hs:450:5
Severity
Category
Status
Source
Language