Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PackageRank #1091

Open
wants to merge 130 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
130 commits
Select commit Hold shift + click to select a range
2563231
started new PageRank branch
kubaneko Jul 1, 2022
64b7f9b
correct the error
kubaneko Jul 1, 2022
b937df5
Created PackageRank module and added it to build
kubaneko Jul 3, 2022
5eed33c
write out ranking criteria
kubaneko Jul 3, 2022
d6abb2f
started with maintainer number
kubaneko Jul 4, 2022
1cf1a9f
added Upload Feature and got number of maintainers for package
kubaneko Jul 5, 2022
6ad9db2
divided rankPackage to pure and IO version
kubaneko Jul 5, 2022
b9a2417
added benchmark and test info
kubaneko Jul 5, 2022
9dbea87
added Download Feature
kubaneko Jul 7, 2022
fcbdd2d
formatted a bit
kubaneko Jul 8, 2022
d0b73cf
used brittany
kubaneko Jul 8, 2022
8a80277
added further info about the package
kubaneko Jul 11, 2022
9d68303
added isApp function
kubaneko Jul 12, 2022
2af5b62
added Scorer type and started to extract versions
kubaneko Jul 13, 2022
3d6b96e
more work on versions
kubaneko Jul 14, 2022
7dc4589
got versions and partitioned based on status
kubaneko Jul 15, 2022
96cdd01
separated versions into versionList and verPart
kubaneko Jul 15, 2022
206a412
added last upload times
kubaneko Jul 15, 2022
1676b3d
added freshnessScore
kubaneko Jul 15, 2022
19d200d
added Download Scorer
kubaneko Jul 15, 2022
22ed2b4
finished simple temporalScore (rankPackageIO)
kubaneko Jul 16, 2022
05c74bf
separated rankIO from temporalScore
kubaneko Jul 17, 2022
f8f78bc
added pageRank
kubaneko Jul 17, 2022
a1f5315
added versionScore
kubaneko Jul 18, 2022
0e6db67
added authorScore
kubaneko Jul 19, 2022
10d14a2
Fix `non-canonical-return` warnings
andreasabel Jul 21, 2022
1daad17
Bump CI to GHC 9.2.3 and restrict to master branch
andreasabel Jul 21, 2022
5329594
Check authorisation (#1111)
AliasQli Jul 21, 2022
22614b5
instance Semigroup Scorer
kubaneko Jul 22, 2022
90717dd
got tarballs and fixed warnings
kubaneko Jul 23, 2022
973a957
extracted documentation length
kubaneko Jul 25, 2022
03b3f81
got tarEntries for package and fixed it for documentation
kubaneko Jul 27, 2022
c84f467
Fix #1105: change order of markdown parsers to allow pipes in lists
andreasabel Jul 24, 2022
09e058c
added codeScore
kubaneko Jul 29, 2022
a8ae12e
replaced some Features by ListFeature
kubaneko Aug 2, 2022
124006f
added some Features to BrowseFeatures - prototype
kubaneko Aug 3, 2022
f8d176b
Revert "added some Features to BrowseFeatures - prototype"
kubaneko Aug 4, 2022
18e769d
Revert "replaced some Features by ListFeature"
kubaneko Aug 5, 2022
0bae698
changed ListFeature to fit PackageRank
kubaneko Aug 5, 2022
500571b
changed PackageRank to fit in constructItem
kubaneko Aug 5, 2022
de621f7
integrated PackageRank into ListFeature
kubaneko Aug 7, 2022
327af26
--no-edit
kubaneko Aug 7, 2022
343af58
tried to add an column and failed
kubaneko Aug 7, 2022
3ec7a86
switch Doubles for Floats
kubaneko Aug 7, 2022
82444ac
added the column and redid some packageRank issues
kubaneko Aug 9, 2022
c3aa816
fixed some basic bugs
kubaneko Aug 9, 2022
212d169
removed Browse/parser changes
kubaneko Aug 16, 2022
7304a06
Fixed missing titile and changed fixed description
kubaneko Aug 16, 2022
8380020
Strict Scorer
kubaneko Aug 16, 2022
868e58d
fixed some partial functions
kubaneko Aug 17, 2022
e033aa5
fixed some bugs
kubaneko Aug 17, 2022
60f8b83
fixed a bug
kubaneko Aug 17, 2022
ff667de
retrieves src correctly
kubaneko Aug 18, 2022
137d09d
fixed documentation retrieval
kubaneko Aug 19, 2022
33d7807
Fix #1128, fix #1130 by adding bounds to Cabal-syntax and haddock-lib…
andreasabel Aug 23, 2022
2377900
Bump CI to 9.2.4 and some deps
andreasabel Aug 23, 2022
a36abf9
changed the algorithm to match cargo
kubaneko Aug 23, 2022
c8a07a6
prototype for readme parser (collects some info about markdown)
kubaneko Aug 25, 2022
919b311
forgot to add the parser
kubaneko Aug 25, 2022
db0f10a
Force .txt and .text to have UTF-8 MIME charset (#1133)
Kleidukos Aug 25, 2022
f6c1e48
Upgrade to haddock-library-1.11.0 (#1126)
AliasQli Aug 26, 2022
0a8a85d
finished readmeScore
kubaneko Aug 26, 2022
a0e7a8f
changed documentation parameter to get reasonable output
kubaneko Aug 27, 2022
07fb0a2
changed some parameters to reflect hackage
kubaneko Aug 27, 2022
413038c
moved PackageRank into PackageList Feature and changed UI so packageR…
kubaneko Aug 28, 2022
834a12f
added some Exception handling
kubaneko Aug 30, 2022
7c36cf7
some comments and refactoring
kubaneko Sep 4, 2022
3a4ebbc
Use NonEmpty (#1)
ysangkok Sep 7, 2022
4f60d74
started new PageRank branch
kubaneko Jul 1, 2022
d071bd7
correct the error
kubaneko Jul 1, 2022
c5eb106
Created PackageRank module and added it to build
kubaneko Jul 3, 2022
a8f4d09
write out ranking criteria
kubaneko Jul 3, 2022
6abacff
started with maintainer number
kubaneko Jul 4, 2022
745ba37
added Upload Feature and got number of maintainers for package
kubaneko Jul 5, 2022
5b83f9a
divided rankPackage to pure and IO version
kubaneko Jul 5, 2022
1b3ddb1
added benchmark and test info
kubaneko Jul 5, 2022
d28983a
added Download Feature
kubaneko Jul 7, 2022
7b989ee
formatted a bit
kubaneko Jul 8, 2022
cec9c72
used brittany
kubaneko Jul 8, 2022
51ee598
added further info about the package
kubaneko Jul 11, 2022
ce5d6ae
added isApp function
kubaneko Jul 12, 2022
902f404
added Scorer type and started to extract versions
kubaneko Jul 13, 2022
29104fa
more work on versions
kubaneko Jul 14, 2022
62021ba
got versions and partitioned based on status
kubaneko Jul 15, 2022
4a521b8
separated versions into versionList and verPart
kubaneko Jul 15, 2022
c0d0e34
added last upload times
kubaneko Jul 15, 2022
9413a0d
added freshnessScore
kubaneko Jul 15, 2022
8f0f49c
added Download Scorer
kubaneko Jul 15, 2022
7ae9ac8
finished simple temporalScore (rankPackageIO)
kubaneko Jul 16, 2022
f0e7920
separated rankIO from temporalScore
kubaneko Jul 17, 2022
0eb4c94
added pageRank
kubaneko Jul 17, 2022
924c06a
added versionScore
kubaneko Jul 18, 2022
a6bfafd
added authorScore
kubaneko Jul 19, 2022
0186f6e
instance Semigroup Scorer
kubaneko Jul 22, 2022
d3a6c06
got tarballs and fixed warnings
kubaneko Jul 23, 2022
a34fed2
extracted documentation length
kubaneko Jul 25, 2022
6058249
got tarEntries for package and fixed it for documentation
kubaneko Jul 27, 2022
b1ac101
added codeScore
kubaneko Jul 29, 2022
68d2d67
replaced some Features by ListFeature
kubaneko Aug 2, 2022
544e9c0
added some Features to BrowseFeatures - prototype
kubaneko Aug 3, 2022
5e5cc6a
Revert "added some Features to BrowseFeatures - prototype"
kubaneko Aug 4, 2022
8c08fd1
Revert "replaced some Features by ListFeature"
kubaneko Aug 5, 2022
2e5ac4b
changed ListFeature to fit PackageRank
kubaneko Aug 5, 2022
8e8bf89
changed PackageRank to fit in constructItem
kubaneko Aug 5, 2022
da3c345
integrated PackageRank into ListFeature
kubaneko Aug 7, 2022
a9351aa
--no-edit
kubaneko Aug 7, 2022
728fb0d
tried to add an column and failed
kubaneko Aug 7, 2022
0d538ec
switch Doubles for Floats
kubaneko Aug 7, 2022
83cf50c
added the column and redid some packageRank issues
kubaneko Aug 9, 2022
1865b9d
fixed some basic bugs
kubaneko Aug 9, 2022
3c562bf
removed Browse/parser changes
kubaneko Aug 16, 2022
2e266dc
Fixed missing titile and changed fixed description
kubaneko Aug 16, 2022
7ed9cf5
Strict Scorer
kubaneko Aug 16, 2022
30d48cc
fixed some partial functions
kubaneko Aug 17, 2022
830cfd5
fixed some bugs
kubaneko Aug 17, 2022
df26e92
fixed a bug
kubaneko Aug 17, 2022
d889087
retrieves src correctly
kubaneko Aug 18, 2022
40bfc1b
fixed documentation retrieval
kubaneko Aug 19, 2022
a568a40
changed the algorithm to match cargo
kubaneko Aug 23, 2022
bec7e05
prototype for readme parser (collects some info about markdown)
kubaneko Aug 25, 2022
c0d4cb6
forgot to add the parser
kubaneko Aug 25, 2022
0a98ed2
finished readmeScore
kubaneko Aug 26, 2022
e1e6452
changed documentation parameter to get reasonable output
kubaneko Aug 27, 2022
618dea1
changed some parameters to reflect hackage
kubaneko Aug 27, 2022
560050c
moved PackageRank into PackageList Feature and changed UI so packageR…
kubaneko Aug 28, 2022
0bb394e
added some Exception handling
kubaneko Aug 30, 2022
dbc9141
some comments and refactoring
kubaneko Sep 4, 2022
b9b73cc
Use NonEmpty (#1)
ysangkok Sep 7, 2022
8f119d2
Merge branch 'PageRank' of github.com:kubaneko/hackage-server into Pa…
kubaneko Sep 18, 2022
a41b375
test commit
kubaneko Oct 2, 2022
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
32 changes: 19 additions & 13 deletions .github/workflows/haskell-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,18 +8,24 @@
#
# For more information, see https://github.com/haskell-CI/haskell-ci
#
# version: 0.14.3.20220416
# version: 0.15.20220822
#
# REGENDATA ("0.14.3.20220416",["github","hackage-server.cabal"])
# REGENDATA ("0.15.20220822",["github","hackage-server.cabal"])
#
name: Haskell-CI
on:
- push
- pull_request
push:
branches:
- master
- ci*
pull_request:
branches:
- master
- ci*
jobs:
linux:
name: Haskell-CI - Linux - ${{ matrix.compiler }}
runs-on: ubuntu-18.04
runs-on: ubuntu-20.04
timeout-minutes:
60
container:
Expand All @@ -28,9 +34,9 @@ jobs:
strategy:
matrix:
include:
- compiler: ghc-9.2.2
- compiler: ghc-9.2.4
compilerKind: ghc
compilerVersion: 9.2.2
compilerVersion: 9.2.4
setup-method: ghcup
allow-failure: false
- compiler: ghc-9.0.2
Expand All @@ -56,20 +62,20 @@ jobs:
apt-get install -y --no-install-recommends gnupg ca-certificates dirmngr curl git software-properties-common libtinfo5
if [ "${{ matrix.setup-method }}" = ghcup ]; then
mkdir -p "$HOME/.ghcup/bin"
curl -sL https://downloads.haskell.org/ghcup/0.1.17.5/x86_64-linux-ghcup-0.1.17.5 > "$HOME/.ghcup/bin/ghcup"
curl -sL https://downloads.haskell.org/ghcup/0.1.18.0/x86_64-linux-ghcup-0.1.18.0 > "$HOME/.ghcup/bin/ghcup"
chmod a+x "$HOME/.ghcup/bin/ghcup"
"$HOME/.ghcup/bin/ghcup" install ghc "$HCVER"
"$HOME/.ghcup/bin/ghcup" install cabal 3.6.2.0
"$HOME/.ghcup/bin/ghcup" install ghc "$HCVER" || (cat "$HOME"/.ghcup/logs/*.* && false)
"$HOME/.ghcup/bin/ghcup" install cabal 3.6.2.0 || (cat "$HOME"/.ghcup/logs/*.* && false)
apt-get update
apt-get install -y libbrotli-dev
else
apt-add-repository -y 'ppa:hvr/ghc'
apt-get update
apt-get install -y "$HCNAME" libbrotli-dev
mkdir -p "$HOME/.ghcup/bin"
curl -sL https://downloads.haskell.org/ghcup/0.1.17.5/x86_64-linux-ghcup-0.1.17.5 > "$HOME/.ghcup/bin/ghcup"
curl -sL https://downloads.haskell.org/ghcup/0.1.18.0/x86_64-linux-ghcup-0.1.18.0 > "$HOME/.ghcup/bin/ghcup"
chmod a+x "$HOME/.ghcup/bin/ghcup"
"$HOME/.ghcup/bin/ghcup" install cabal 3.6.2.0
"$HOME/.ghcup/bin/ghcup" install cabal 3.6.2.0 || (cat "$HOME"/.ghcup/logs/*.* && false)
fi
env:
HCKIND: ${{ matrix.compilerKind }}
Expand Down Expand Up @@ -212,7 +218,7 @@ jobs:
${CABAL} -vnormal check
- name: haddock
run: |
$CABAL v2-haddock $ARG_COMPILER --with-haddock $HADDOCK $ARG_TESTS $ARG_BENCH all
$CABAL v2-haddock --haddock-all $ARG_COMPILER --with-haddock $HADDOCK $ARG_TESTS $ARG_BENCH all
- name: unconstrained build
run: |
rm -f cabal.project.local
Expand Down
10 changes: 8 additions & 2 deletions .github/workflows/nix-shell.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,13 @@
name: "Test nix-shell"
on:
- push
- pull_request
push:
branches:
- master
- ci*
pull_request:
branches:
- master
- ci*
jobs:
nix-shell:
runs-on: ubuntu-latest
Expand Down
9 changes: 8 additions & 1 deletion cabal.haskell-ci
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
branches: master ci*

installed: +all -Cabal -text -parsec

-- -- irc-channels works with GHA, but why send to a channel
Expand All @@ -11,4 +13,9 @@ installed: +all -Cabal -text -parsec
-- Use Ubuntu 20.04
distribution: focal

apt: libbrotli-dev
apt: libbrotli-dev

-- Make sure the haddock step is included,
-- even though we don't define any library.
haddock-components: all
-- since haskell-ci 0.15.20220822
1 change: 1 addition & 0 deletions datafiles/static/browse.js
Original file line number Diff line number Diff line change
Expand Up @@ -134,6 +134,7 @@ const replaceRows = (response) => {
tr.appendChild(createTags(row.tags));
tr.appendChild(createLastUpload(row.lastUpload));
tr.appendChild(createMaintainers(row.maintainers));
tr.appendChild(createSimpleText(row.packageRank));
kubaneko marked this conversation as resolved.
Show resolved Hide resolved
l.appendChild(tr);
}
};
Expand Down
4 changes: 4 additions & 0 deletions datafiles/templates/Html/browse.html.st
Original file line number Diff line number Diff line change
Expand Up @@ -130,6 +130,9 @@
#arrow-maintainers {
width: 100px;
}
#arrow-packageRank {
width: 150px;
}
.lastUpload, #sliderAndOutput {
white-space: nowrap;
}
Expand Down Expand Up @@ -250,6 +253,7 @@
<th id=arrow-tags><a href="javascript: sort('tags')">Tags</a></th>
<th id=arrow-lastUpload><a href="javascript: sort('lastUpload')">Last U/L</a></th>
<th id=arrow-maintainers><a href="javascript: sort('maintainers')">Maintainers</a></th>
<th id=arrow-packageRank><a href="javascript: sort('packageRank')">Package Rank</a></th>
</tr>
</thead>
<tbody id="listing"></tbody>
Expand Down
1 change: 1 addition & 0 deletions datafiles/templates/Html/noscript-search-form.html.st
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
<option $if(tags)$ selected $endif$ value=tags>tags</option>
<option $if(lastUpload)$ selected $endif$ value=lastUpload>date of last upload</option>
<option $if(maintainers)$ selected $endif$ value=maintainers>maintainers</option>
<option $if(packageRank)$ selected $endif$ value=packageRank>rank of the package</option>
</select>
</label>
</div>
Expand Down
28 changes: 19 additions & 9 deletions hackage-server.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ copyright: 2008-2015 Duncan Coutts,
license: BSD-3-Clause
license-file: LICENSE

tested-with: GHC == { 9.2.2, 9.0.2, 8.10.7, 8.8.4 }
tested-with: GHC == { 9.2.4, 9.0.2, 8.10.7, 8.8.4 }

data-dir: datafiles
data-files:
Expand Down Expand Up @@ -116,8 +116,11 @@ common defaults
, scientific
-- other dependencies shared by most components
build-depends:
, aeson ^>= 2.0.3.0
, aeson ^>= 2.0.3.0 || ^>= 2.1.0.0
, Cabal ^>= 3.6.3.0
, Cabal-syntax ^>= 3.6.0.0
-- Cabal-syntax needs to be bound to constrain hackage-security
-- see https://github.com/haskell/hackage-server/issues/1130
, fail ^>= 4.9.0
-- we use Control.Monad.Except, introduced in mtl-2.2.1
, network >= 3 && < 3.2
Expand All @@ -126,7 +129,7 @@ common defaults
, parsec ^>= 3.1.13
, tar ^>= 0.5
, unordered-containers ^>= 0.2.10
, vector ^>= 0.12
, vector ^>= 0.12 || ^>= 0.13.0.0
, zlib ^>= 0.6.2

ghc-options: -Wall -fwarn-tabs -fno-warn-unused-do-bind -fno-warn-deprecated-flags -funbox-strict-fields
Expand Down Expand Up @@ -307,6 +310,8 @@ library lib-server
Distribution.Server.Features.PackageCandidates.Backup
Distribution.Server.Features.PackageFeed
Distribution.Server.Features.PackageList
Distribution.Server.Features.PackageList.PackageRank
Distribution.Server.Features.PackageList.MStats
Distribution.Server.Features.Distro
Distribution.Server.Features.Distro.Distributions
Distribution.Server.Features.Distro.Backup
Expand Down Expand Up @@ -374,7 +379,7 @@ library lib-server
, async ^>= 2.2.1
-- requires bumping http-io-streams
, attoparsec ^>= 0.14.4
, attoparsec-iso8601 ^>= 1.0
, attoparsec-iso8601 ^>= 1.0 || ^>= 1.1.0.0
, base16-bytestring ^>= 1.0
-- requires bumping http-io-streams
, base64-bytestring ^>= 1.2.1.0
Expand All @@ -390,18 +395,23 @@ library lib-server
, cryptohash-sha256 ^>= 0.11.100
, csv ^>= 0.1
, ed25519 ^>= 0.0.5
, hackage-security ^>= 0.6
, hackage-security >= 0.6 && < 0.7
-- N.B: hackage-security-0.6.2 uses Cabal-syntax-3.8.1.0
-- see https://github.com/haskell/hackage-server/issues/1130
-- Thus, we need to include Cabal-syntax as dependency explicitly
, hackage-security-HTTP ^>= 0.1.1
, haddock-library > 1.7 && < 2
, happstack-server ^>= 7.7.1
, hashable ^>= 1.3 || ^>= 1.4
, haddock-library ^>= 1.11.0
-- haddock-library-1.11.0 changed type of markupOrderedList
-- see https://github.com/haskell/hackage-server/issues/1128
, happstack-server ^>= 7.7.1 || ^>= 7.8.0
, hashable ^>= 1.3 || ^>= 1.4
, hslogger ^>= 1.3.1
, lifted-base ^>= 0.2.1
, mime-mail ^>= 0.5
, random ^>= 1.2
, rss ^>= 3000.2.0.7
, safecopy ^>= 0.10
, semigroups ^>= 0.19
, semigroups ^>= 0.20
, split ^>= 0.2
, stm ^>= 2.5.0
, tagged ^>= 0.8.5
Expand Down
2 changes: 2 additions & 0 deletions src/Distribution/Server/Features.hs
Original file line number Diff line number Diff line change
Expand Up @@ -285,6 +285,8 @@ initHackageFeatures env@ServerEnv{serverVerbosity = verbosity} = do
versionsFeature
usersFeature
uploadFeature
documentationCoreFeature
tarIndexCacheFeature

searchFeature <- mkSearchFeature
coreFeature
Expand Down
4 changes: 3 additions & 1 deletion src/Distribution/Server/Features/Browse.hs
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ import qualified Data.Set as S
import Data.Time (getCurrentTime)
import Data.Time.Format.ISO8601 (iso8601Show)
import System.FilePath ((</>))
import GHC.Float.RealFracMethods (roundFloatInteger)

import Data.Aeson (Value(Array), object, toJSON, (.=))
import qualified Data.Aeson.Key as Key
Expand Down Expand Up @@ -138,7 +139,7 @@ packageIndexInfoToValue :: CoreResource -> TagsResource -> UserResource -> Packa
packageIndexInfoToValue
coreResource tagsResource userResource
PackageItem{itemName, itemDownloads, itemVotes,
itemDesc, itemTags, itemLastUpload, itemMaintainer} =
itemDesc, itemTags, itemLastUpload, itemMaintainer, itemPackageRank} =
object
[ Key.fromString "name" .= renderPackage itemName
, Key.fromString "downloads" .= itemDownloads
Expand All @@ -147,6 +148,7 @@ packageIndexInfoToValue
, Key.fromString "tags" .= map renderTag (S.toAscList itemTags)
, Key.fromString "lastUpload" .= iso8601Show itemLastUpload
, Key.fromString "maintainers" .= map renderUser itemMaintainer
, Key.fromString "packageRank" .= (roundFloatInteger (1000 * itemPackageRank))
]
where
renderTag :: Tag -> Value
Expand Down
1 change: 1 addition & 0 deletions src/Distribution/Server/Features/Browse/ApplyFilter.hs
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@ sort isSearch sortColumn sortDirection =
Tags -> comparing (S.toAscList . itemTags)
LastUpload -> comparing itemLastUpload
Maintainers -> comparing itemMaintainer
PackageRank -> comparing itemPackageRank
in sortBy (maybeReverse comparer)
where
maybeReverse =
Expand Down
4 changes: 3 additions & 1 deletion src/Distribution/Server/Features/Browse/Options.hs
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import Distribution.Server.Features.Browse.Parsers (Filter, conditions, condsToF

data IsSearch = IsSearch | IsNotSearch

data NormalColumn = Name | Downloads | Rating | Description | Tags | LastUpload | Maintainers
data NormalColumn = Name | Downloads | Rating | Description | Tags | LastUpload | Maintainers | PackageRank
deriving (Show, Eq)

data Column = DefaultColumn | NormalColumn NormalColumn
Expand Down Expand Up @@ -37,6 +37,7 @@ instance FromJSON Column where
"tags" -> pure $ NormalColumn Tags
"lastUpload" -> pure $ NormalColumn LastUpload
"maintainers" -> pure $ NormalColumn Maintainers
"packageRank" -> pure $ NormalColumn PackageRank
t -> fail $ "Column invalid: " ++ T.unpack t

columnToTemplateName :: Column -> String
Expand All @@ -49,6 +50,7 @@ columnToTemplateName = \case
NormalColumn Tags -> "tags"
NormalColumn LastUpload -> "lastUpload"
NormalColumn Maintainers -> "maintainers"
NormalColumn PackageRank -> "packageRank"

instance FromJSON Direction where
parseJSON =
Expand Down
2 changes: 1 addition & 1 deletion src/Distribution/Server/Features/HaskellPlatform.hs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{-# LANGUAGE RankNTypes, NamedFieldPuns, RecordWildCards #-}
module Distribution.Server.Features.HaskellPlatform (
PlatformFeature,
PlatformFeature(..),
PlatformResource(..),
initPlatformFeature,
) where
Expand Down
Loading