From 2f1fb5353727936f7f32ee930915ff4c33ab5f76 Mon Sep 17 00:00:00 2001 From: Dan Burton Date: Thu, 23 Apr 2015 21:28:57 -0700 Subject: [PATCH] stackage-setup prerelease download page #87 --- Handler/Download.hs | 5 +++++ templates/download.hamlet | 22 +++++++++++++++++++--- 2 files changed, 24 insertions(+), 3 deletions(-) diff --git a/Handler/Download.hs b/Handler/Download.hs index 86c87aa..770d609 100644 --- a/Handler/Download.hs +++ b/Handler/Download.hs @@ -12,6 +12,7 @@ executableFor Win32 = StackageWindowsExecutable executableFor Win64 = StackageWindowsExecutable executableFor _ = StackageUnixExecutable +-- TODO: link to s3 executableLink :: SupportedArch -> StackageExecutable -> Route App executableLink arch exe = StaticR $ StaticRoute ["setup", toPathPiece arch, toPathPiece exe] [] @@ -21,6 +22,10 @@ downloadCandidates = map (\arch -> (arch, executableFor arch)) [minBound .. maxBound] +currentlySupported :: SupportedArch -> Bool +currentlySupported Linux64 = True +currentlySupported _ = False + getDownloadR :: Handler Html getDownloadR = defaultLayout $ do $(widgetFile "download") diff --git a/templates/download.hamlet b/templates/download.hamlet index 25585e4..dc0a599 100644 --- a/templates/download.hamlet +++ b/templates/download.hamlet @@ -1,5 +1,21 @@ +

Warning: pre-release + +

The following executable is considered experimental. +

More operating systems and architectures will be supported upon official release. + +

Download $forall (arch, exe) <- downloadCandidates