1921 - Remove support for GHC8.10 #1922
Draft
IOG Hydra / ci/hydra-build:x86_64-linux.checks.hlint
failed
Dec 13, 2024 in 45s
Build failed
1 failed steps
Details
Failed Steps
Step 1
Derivation
/nix/store/1hxsyym9y4d9f2q9fk6lfk48z48cwfi1-hlint-check.drv
Log
cardano-chain-gen/src/Cardano/Mock/Query.hs:(141,7)-(150,16): Suggestion: Fuse on/on
Found:
from $ table @Db.Constitution `innerJoin` table @Db.VotingAnchor
`on`
(\ (constit :& anchor)
-> (constit ^. Db.ConstitutionVotingAnchorId)
==. (anchor ^. Db.VotingAnchorId))
`innerJoin` table @Db.EpochState
`on`
(\ (constit :& _ :& epoch)
-> just (constit ^. Db.ConstitutionId)
==. (epoch ^. Db.EpochStateConstitutionId))
Perhaps:
(from $ table @Db.Constitution `innerJoin` table @Db.VotingAnchor)
`on`
(((\ (constit :& anchor)
-> (constit ^. Db.ConstitutionVotingAnchorId)
==. (anchor ^. Db.VotingAnchorId))
`innerJoin` table @Db.EpochState)
. (\ (constit :& _ :& epoch)
-> just (constit ^. Db.ConstitutionId)
==. (epoch ^. Db.EpochStateConstitutionId)))
cardano-chain-gen/src/Cardano/Mock/Query.hs:176:15-36: Suggestion: Use =<<
Found:
join (unValue <$> res)
Perhaps:
unValue =<< res
cardano-chain-gen/src/Cardano/Mock/Forging/Tx/Shelley.hs:3:1-34: Warning: Unused LANGUAGE pragma
Found:
{-# LANGUAGE OverloadedStrings #-}
Perhaps you should remove it.
cardano-chain-gen/src/Cardano/Mock/Forging/Tx/Conway/Scenarios.hs:(55,7)-(57,33): Suggestion: Use zipWith
Found:
map
(\ (payCred, stakeCred)
-> Addr Testnet payCred (StakeRefBase stakeCred))
(zip payCreds stakeCreds)
Perhaps:
Prelude.zipWith
(Prelude.curry
(\ (payCred, stakeCred)
-> Addr Testnet payCred (StakeRefBase stakeCred)))
payCreds stakeCreds
cardano-chain-gen/src/Cardano/Mock/Forging/Tx/Conway/Scenarios.hs:69:6-61: Suggestion: Use zipWith
Found:
map (mkDelegCert state') $ zip (cycle [0, 1, 2]) txCreds
Perhaps:
Prelude.zipWith
(Prelude.curry (mkDelegCert state')) (cycle [0, 1, 2]) txCreds
cardano-chain-gen/test/Test/Cardano/Db/Mock/UnifiedApi.hs:69:3-91: Warning: Use replicateM
Found:
forM [1 .. blocksToCreate]
$ \ _ -> forgeNextFindLeaderAndSubmit interpreter mockServer []
Perhaps:
replicateM
blocksToCreate
(forgeNextFindLeaderAndSubmit interpreter mockServer [])
cardano-db/src/Cardano/Db/Version/V13_0/Query.hs:3:1-34: Warning: Unused LANGUAGE pragma
Found:
{-# LANGUAGE OverloadedStrings #-}
Perhaps you should remove it.
cardano-db-sync/app/http-get-json-metadata.hs:13:1-45: Warning: Avoid restricted alias
Found:
import qualified Data.ByteString.Char8 as BSC
Perhaps:
import qualified Data.ByteString.Char8 as BS
Note: may break the code
cardano-db-sync/src/Cardano/DbSync/DbAction.hs:59:3-35: Warning: Use unless
Found:
if isDone then pure () else retry
Perhaps:
Control.Monad.unless isDone $ retry
cardano-db-sync/src/Cardano/DbSync/DbAction.hs:59:3-35: Warning: Use unless
Found:
if isDone then pure () else retry
Perhaps:
Control.Monad.unless isDone retry
cardano-db-sync/src/Cardano/DbSync/StateQuery.hs:4:1-34: Warning: Unused LANGUAGE pragma
Found:
{-# LANGUAGE OverloadedStrings #-}
Perhaps you should remove it.
cardano-db-sync/src/Cardano/DbSync/Config/Node.hs:(77,3)-(78,41): Warning: Eta reduce
Found:
parseJSON v = Aeson.withObject "NodeConfig" parse v
Perhaps:
parseJSON = Aeson.withObject "NodeConfig" parse
cardano-db-sync/src/Cardano/DbSync/Era/Shelley/Generic/Block.hs:4:1-34: Warning: Unused LANGUAGE pragma
Found:
{-# LANGUAGE OverloadedStrings #-}
Perhaps you should remove it.
cardano-db-sync/src/Cardano/DbSync/Era/Shelley/Generic/ProtoParams.hs:2:1-34: Warning: Unused LANGUAGE pragma
Found:
{-# LANGUAGE OverloadedStrings #-}
Perhaps you should remove it.
cardano-db-sync/src/Cardano/DbSync/Era/Shelley/Generic/StakeDist.hs:6:1-34: Warning: Unused LANGUAGE pragma
Found:
{-# LANGUAGE OverloadedStrings #-}
Perhaps you should remove it.
cardano-db-sync/src/Cardano/DbSync/Ledger/State.hs:697:10-66: Warning: Avoid reverse
Found:
reverse $ List.sortOn getSlotNoSnapshot $ inMem <> onDisk
Perhaps:
Exception.sortOn
(Data.Ord.Down Exception.. getSlotNoSnapshot) (inMem <> onDisk)
Note: Stabilizes sort order
cardano-db-sync/test/Cardano/DbSync/Gen.hs:1:1-34: Warning: Unused LANGUAGE pragma
Found:
{-# LANGUAGE OverloadedStrings #-}
Perhaps you should remove it.
cardano-db-sync/test/Cardano/DbSync/Gen.hs:(63,3)-(64,33): Warning: Functor law
Found:
SyncNodeParams <$> (ConfigFile <$> filePath)
Perhaps:
(SyncNodeParams . ConfigFile <$> filePath)
cardano-smash-server/src/Cardano/SMASH/Server/Config.hs:103:5-38: Warning: Eta reduce
Found:
prepareCred name = Text.strip name
Perhaps:
prepareCred = Text.strip
cardano-smash-server/src/Cardano/SMASH/Server/Types.hs:81:3-43: Warning: Eta reduce
Found:
parseUrlPiece poolId = parsePoolId poolId
Perhaps:
parseUrlPiece = parsePoolId
cardano-smash-server/src/Cardano/SMASH/Server/Types.hs:280:3-58: Warning: Eta reduce
Found:
parseUrlPiece tickerName = validateTickerName tickerName
Perhaps:
parseUrlPiece = validateTickerName
21 hints
=====================================================================
Note: to ignore a particular hint (e.g. "Reduce duplication"), write
this in the source file:
{-# ANN module ("HLint: ignore Reduce duplication" :: Text) #-}
You can also apply it just to a particular function, which is better:
{-# ANN funcName ("HLint: ignore Reduce duplication" :: Text) #-}
Loading