We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Redundant <$>
LambdaCase
Redundant <$> should not trigger for lengthy LambdaCase
Map.lookup dbaPath <$> readIORef storeRef >>= \case Nothing -> do (hdr, da) <- mmapDBA @a (rootDir </> dbaPath) Nothing False modifyIORef' storeRef $ Map.insert dbaPath (DbaData hdr da) return (hdr, da) Just (DbaData hdr da@(DeviceArray _cap _fp :: DeviceArray a')) -> case eqT of Nothing -> throwIO . userError $ "element type mismatch for dba in store: " ++ dbaPath Just (Refl :: a :~: a') -> return (hdr, da)
Point-free style is less optimal for lengthy LambdaCase blocks
Redundant <$> Found: Map.lookup dbaPath <$> readIORef storeRef >>= \case Nothing -> do (hdr, da) <- mmapDBA @a (rootDir </> dbaPath) Nothing False modifyIORef' storeRef $ Map.insert dbaPath (DbaData hdr da) return (hdr, da) Just (DbaData hdr da@(DeviceArray _cap _fp :: DeviceArray a')) -> case eqT of Nothing -> throwIO . userError $ "element type mismatch for dba in store: " ++ dbaPath Just (Refl :: a :~: a') -> return (hdr, da) Why not: readIORef storeRef >>= (\case Nothing -> do (hdr, da) <- mmapDBA @a (rootDir </> dbaPath) Nothing False modifyIORef' storeRef $ Map.insert dbaPath (DbaData hdr da) return (hdr, da) Just (DbaData hdr da@(DeviceArray _cap _fp :: DeviceArray a')) -> case eqT of Nothing -> throwIO . userError $ "element type mismatch for dba in store: " ++ dbaPath Just (Refl :: a :~: a') -> return (hdr, da)) . Map.lookup dbaPath hlint(refact:Redundant <$>)
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Redundant <$>
should not trigger for lengthyLambdaCase
Point-free style is less optimal for lengthy
LambdaCase
blocksThe text was updated successfully, but these errors were encountered: