diff --git a/config/robots.txt b/config/robots.txt index 71a3797..1a7eeb8 100644 --- a/config/robots.txt +++ b/config/robots.txt @@ -1,3 +1,4 @@ User-agent: * Disallow: /haddock/ +Disallow: /diff/ Sitemap: https://www.stackage.org/sitemap.xml diff --git a/src/Handler/StackageHome.hs b/src/Handler/StackageHome.hs index f1e69bb..c11dc78 100644 --- a/src/Handler/StackageHome.hs +++ b/src/Handler/StackageHome.hs @@ -53,8 +53,9 @@ getStackageDiffR :: SnapName -> SnapName -> Handler TypedContent getStackageDiffR name1 name2 = track "Handler.StackageHome.getStackageDiffR" $ do Entity sid1 _ <- lookupSnapshot name1 >>= maybe notFound return Entity sid2 _ <- lookupSnapshot name2 >>= maybe notFound return - (map (snapshotName . entityVal) -> snapNames) <- getSnapshots Nothing 0 0 - let (ltsSnaps, nightlySnaps) = partition isLts $ sortOn Down snapNames + let fixit = sortOn Down . map (snapshotName . entityVal) + ltsSnaps <- fixit <$> getSnapshots (Just LtsBranch) 20 0 + nightlySnaps <- fixit <$> getSnapshots (Just NightlyBranch) 20 0 snapDiff <- getSnapshotDiff sid1 sid2 selectRep $ do provideRep $ defaultLayout $ do