Skip to content

Sortition revamp

Sortition revamp #18

Triggered via pull request January 23, 2025 16:12
Status Failure
Total duration 8m 37s
Artifacts

simulation.yaml

on: pull_request
Check with HLint
13s
Check with HLint
Check with fourmolu
8s
Check with fourmolu
Matrix: simulation-test
Fit to window
Zoom out
Zoom in

Annotations

1 error and 2 warnings
Check with HLint
HLint failed with status: 1. Warning (1), Suggestion (1)
Check with HLint: simulation/src/LeiosProtocol/Short.hs#L464
Warning in numWins in module LeiosProtocol.Short: Redundant lambda ▫︎ Found: "numWins (StakeFraction sigma) (NetworkRate rate) m\n = \\ p\n -> maybe 0 snd\n $ Map.lookupLT\n (realToFrac p / realToFrac (exp $ negate (rate * sigma))) m" ▫︎ Perhaps: "numWins (StakeFraction sigma) (NetworkRate rate) m p\n = maybe 0 snd\n $ Map.lookupLT\n (realToFrac p / realToFrac (exp $ negate (rate * sigma))) m"
Check with HLint: simulation/src/LeiosProtocol/Short.hs#L467
Suggestion in Sortition in module LeiosProtocol.Short: Use newtype instead of data ▫︎ Found: "data Sortition = Sortition (Double -> Word64)" ▫︎ Perhaps: "newtype Sortition = Sortition (Double -> Word64)" ▫︎ Note: decreases laziness