diff --git a/Handler/StackageHome.hs b/Handler/StackageHome.hs index 92fd432..26e20b0 100644 --- a/Handler/StackageHome.hs +++ b/Handler/StackageHome.hs @@ -11,9 +11,13 @@ getStackageHomeR ident = do return (stackage, user) hasBundle <- storeExists $ SnapshotBundle ident - let isInclusiveOrExclusive = - "inclusive" `isSuffixOf` stackageTitle stackage || - "exclusive" `isSuffixOf` stackageTitle stackage + let minclusive = + if "inclusive" `isSuffixOf` stackageTitle stackage + then Just True + else if "exclusive" `isSuffixOf` stackageTitle stackage + then Just False + else Nothing + base = maybe 0 (const 1) minclusive :: Int defaultLayout $ do setTitle $ toHtml $ stackageTitle stackage $(widgetFile "stackage-home") diff --git a/templates/stackage-home.hamlet b/templates/stackage-home.hamlet index f5bad40..08b3b69 100644 --- a/templates/stackage-home.hamlet +++ b/templates/stackage-home.hamlet @@ -1,11 +1,11 @@ $newline never
Published on #{yearMonthDay (stackageUploaded stackage)}
-
- $if True
+ $if hasBundle
+
\Metadata
@@ -16,7 +16,7 @@ $newline never
What's the difference between inclusive and exclusive snapshots?
+ This snapshot is: #
+
+ $if inclusive
+ inclusive
+ $else
+ exclusive
+
+ $if inclusive
+ This means that it contains packages from Hackage too,
+ \ which are not guaranteed to build.
+ $if not inclusive
+ This means that it contains only packages that build
+ \ and have been tested (excludes packages from Hackage
+ \ that may or may not build.
+
+ For a detailed explanation of the differences and reasons for inclusive and exclusive snapshots, see the FAQ on this topic.
+
remote-repo: stackage:@{StackageHomeR ident}
- $if isInclusiveOrExclusive
+ $maybe _ <- minclusive
@@ -25,10 +25,36 @@ $newline never
(click to expand)