File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed
src/Distribution/Server/Features Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -42,13 +42,13 @@ import System.FilePath ( isExtensionOf )
42
42
import qualified System.IO as SIO
43
43
44
44
data Scorer = Scorer
45
- { maximum :: Float
45
+ { maximumS :: Float
46
46
, score :: Float
47
47
}
48
48
deriving Show
49
49
50
50
instance Semigroup Scorer where
51
- (Scorer a b) <> (Scorer c d) = Scorer (a + b ) (c + d)
51
+ (Scorer a b) <> (Scorer c d) = Scorer (a + c ) (b + d)
52
52
53
53
scorer :: Float -> Float -> Scorer
54
54
scorer maxim scr =
@@ -62,7 +62,7 @@ boolScor k True = Scorer k k
62
62
boolScor k False = Scorer k 0
63
63
64
64
total :: Scorer -> Float
65
- total (Scorer a b) = a / b
65
+ total (Scorer a b) = b / a
66
66
67
67
major :: Num a => [a ] -> a
68
68
major (x : _) = x
@@ -257,7 +257,7 @@ rankPackagePage p = tests <> benchs <> desc <> homeP <> sourceRp <> cats
257
257
where
258
258
tests = boolScor 50 (hasTests p)
259
259
benchs = boolScor 10 (hasBenchmarks p)
260
- desc = Scorer 30 (min 1 (int2Float (S. length $ description p) / 300 ))
260
+ desc = scorer 30 (min 1 (int2Float (S. length $ description p) / 300 ))
261
261
-- documentation = boolScor 30 ()
262
262
homeP = boolScor 30 (not $ S. null $ homepage p)
263
263
sourceRp = boolScor 8 (not $ null $ sourceRepos p)
You can’t perform that action at this time.
0 commit comments