hlint suggestions
hlint didn't like reverse, and suggested using Data.Ord Down instead
This commit is contained in:
parent
0ecf899b56
commit
55c8806186
|
@ -24,6 +24,7 @@ module Mtlstats.Report (report, gameDate) where
|
||||||
import Data.List (sortOn)
|
import Data.List (sortOn)
|
||||||
import qualified Data.Map as M
|
import qualified Data.Map as M
|
||||||
import Data.Maybe (fromMaybe, mapMaybe)
|
import Data.Maybe (fromMaybe, mapMaybe)
|
||||||
|
import Data.Ord (Down (Down))
|
||||||
import Lens.Micro ((^.))
|
import Lens.Micro ((^.))
|
||||||
|
|
||||||
import Mtlstats.Config
|
import Mtlstats.Config
|
||||||
|
@ -136,8 +137,7 @@ yearToDateStatsReport :: Int -> ProgState -> [String]
|
||||||
yearToDateStatsReport width s = let
|
yearToDateStatsReport width s = let
|
||||||
db = s^.database
|
db = s^.database
|
||||||
|
|
||||||
playerStats = reverse
|
playerStats = sortOn (Down . psPoints . snd)
|
||||||
$ sortOn (psPoints . snd)
|
|
||||||
$ map (\p -> (p, p^.pYtd))
|
$ map (\p -> (p, p^.pYtd))
|
||||||
$ filter playerIsActive
|
$ filter playerIsActive
|
||||||
$ db^.dbPlayers
|
$ db^.dbPlayers
|
||||||
|
@ -154,8 +154,7 @@ lifetimeStatsReport :: Int -> ProgState -> [String]
|
||||||
lifetimeStatsReport width s = let
|
lifetimeStatsReport width s = let
|
||||||
db = s^.database
|
db = s^.database
|
||||||
|
|
||||||
playerStats = reverse
|
playerStats = sortOn (Down . psPoints . snd)
|
||||||
$ sortOn (psPoints . snd)
|
|
||||||
$ map (\p -> (p, p^.pLifetime))
|
$ map (\p -> (p, p^.pLifetime))
|
||||||
$ db^.dbPlayers
|
$ db^.dbPlayers
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user