mirror of
https://github.com/commercialhaskell/stackage-server.git
synced 2026-01-12 04:08:29 +01:00
Link to FAQ; give age of LTS snapshots
This commit is contained in:
parent
7e44c31152
commit
cc1dc6ffe5
@ -790,7 +790,7 @@ getPackageCount :: GetStackageDatabase m
|
||||
getPackageCount sid = run $ count [SnapshotPackageSnapshot ==. sid]
|
||||
|
||||
getLatestLtsByGhc :: GetStackageDatabase m
|
||||
=> m [(Int, Int, Text)]
|
||||
=> m [(Int, Int, Text, Day)]
|
||||
getLatestLtsByGhc = run $ fmap (dedupe . map toTuple) $ do
|
||||
E.select $ E.from $ \(lts `E.InnerJoin` snapshot) -> do
|
||||
E.on $ lts E.^. LtsSnap E.==. snapshot E.^. SnapshotId
|
||||
@ -799,9 +799,9 @@ getLatestLtsByGhc = run $ fmap (dedupe . map toTuple) $ do
|
||||
return (lts, snapshot)
|
||||
where
|
||||
toTuple (Entity _ lts, Entity _ snapshot) =
|
||||
(ltsMajor lts, ltsMinor lts, snapshotGhc snapshot)
|
||||
(ltsMajor lts, ltsMinor lts, snapshotGhc snapshot, snapshotCreated snapshot)
|
||||
|
||||
dedupe [] = []
|
||||
dedupe (x:xs) = x : dedupe (dropWhile (\y -> thd x == thd y) xs)
|
||||
|
||||
thd (_, _, x) = x
|
||||
thd (_, _, x, _) = x
|
||||
|
||||
@ -33,11 +33,16 @@
|
||||
bleeding-edge nightly release.
|
||||
|
||||
<p>
|
||||
<a href="https://www.stackage.org/lts">
|
||||
<a href="/lts">
|
||||
LTS Haskell
|
||||
<p>
|
||||
<a href="https://www.stackage.org/nightly">
|
||||
<a href="/nightly">
|
||||
Stackage Nightly
|
||||
|
||||
<p>
|
||||
Have more questions? We have a #
|
||||
<a href="https://github.com/fpco/stackage#frequently-asked-questions">FAQ section on Github
|
||||
.
|
||||
<h3>
|
||||
Related initiatives
|
||||
<p>
|
||||
@ -51,9 +56,10 @@
|
||||
<h3>
|
||||
Latest LTS per GHC version
|
||||
<ul>
|
||||
$forall (major, minor, ghc) <- latestLtsByGhc
|
||||
$forall (major, minor, ghc, date) <- latestLtsByGhc
|
||||
<li>
|
||||
<a href=@{SnapshotR (SNLts major minor) StackageHomeR}>LTS #{major}.#{minor} for GHC #{ghc}
|
||||
<a href=@{SnapshotR (SNLts major minor) StackageHomeR}>LTS #{major}.#{minor} for GHC #{ghc}#
|
||||
\, published #{dateDiff now' date}
|
||||
<h3>
|
||||
Package Maintainers
|
||||
<p>
|
||||
|
||||
Loading…
Reference in New Issue
Block a user