stackage-setup prerelease download page #87

This commit is contained in:
Dan Burton 2015-04-23 21:28:57 -07:00
parent 1117ca93c9
commit 2f1fb53537
2 changed files with 24 additions and 3 deletions

View File

@ -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")

View File

@ -1,5 +1,21 @@
<h1>Warning: pre-release
<p>The following executable is considered experimental.
<p>More operating systems and architectures will be supported upon official release.
<h1>Download
$forall (arch, exe) <- downloadCandidates
<ul .downloads>
<li>
<a href=@{executableLink arch exe}>
#{toPathPiece arch}: #{toPathPiece exe}
$if currentlySupported arch
<li>
#{toPathPiece arch}:
<a href=@{executableLink arch exe}>
#{toPathPiece exe}
<h1>What is stackage-setup?
<p>The stackage-setup executable is an easy way to download and set up the basic executables needed for developing Haskell.
<p>You can find these executables in:
<code>~/.stackage/environment/$group/$group-$version/bin/
<p>For example, ghc, ghc-pkg, haddock, etc for ghc-7.8.4 are installed here:
<code>~/.stackage/environment/ghc/ghc-7.8.4/bin/