Sortition revamp #18
simulation.yaml
on: pull_request
Check with HLint
13s
Check with fourmolu
8s
Matrix: simulation-test
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
|