stackage-server/templates/stackage-home.hamlet
2014-12-14 21:59:03 +01:00

139 lines
4.9 KiB
Plaintext

$newline never
<div .container>
<h1>
#{stackageTitle stackage}
<p>
Published on #{yearMonthDay (stackageUploaded stackage)}
$if hasBundle
<span .separator>
<span>
<a href=@{SnapshotR slug StackageCabalConfigR} title="If you want to stick with upstream Hackage but get a stable package set">
\cabal.config
$if isOwner
<p>
You are the owner of this snapshot. You can #
<a href=@{UploadHaddockR $ toPathPiece slug}>upload haddocks#
.
<p>
<pre>
remote-repo: stackage-#{slug}:@{SnapshotR slug StackageHomeR}
<h3>
Setup guide #
<small>
(click to expand)
<div class="accordion" id="accordion2">
<div class="accordion-group">
<div class="accordion-heading">
<a class="accordion-toggle" data-toggle="collapse" data-parent="#accordion#{base + 0}" href="#collapse1">
<span .number>#{base + 1}
Copy the
<code>remote-repo
line to your Cabal configuration file
<div id="collapse1" class="accordion-body collapse">
<div class="accordion-inner">
<p>
Your #
<code>config
\ file for Cabal should be in your user home directory. For example:
<ul>
<li>Linux: #
<code>
/home/alonzo/.cabal/config
<li>Windows: #
<code>
C:\Users\alonzo\AppData\Roaming\cabal\config
<p>Once you have this open, find the line that says:
<pre>
remote-repo: hackage.haskell.org:http://hackage.haskell.org/packages/archive
<p>
Replace it with the #
<code>remote-repo
\ code sample above.
<div class="accordion-group">
<div class="accordion-heading">
<a class="accordion-toggle" data-toggle="collapse" data-parent="#accordion#{base + 0}" href="#collapse2">
<span .number>#{base + 2}
Remove any existing package config
<div id="collapse2" class="accordion-body collapse">
<div class="accordion-inner">
<p>
If you already have installed some packages from Hackage
\ or elsewhere and you want to start from a fresh package
\ set, you can remove your
<code>ghc/&lt;os&gt;-&lt;ghc-version&gt;
\ directory.
<ul>
<li>
In Linux, the directory is #
<code>~/.ghc
<li>
On Windows the #
<code>.ghc
\ directory, similar to the Cabal
\ configuration, will be under something like: #
<code>
C:\Users\alonzo\AppData\Roaming\ghc
<p>
To clear the GHC 7.2.2. environment, all the
\ user-installed packages, you can remove the directory #
<code>x86_64-linux-7.2.2
.
<em> Be careful
\ that you are sure
\ that you want to clear your package set (re-installing
\ packages takes time!) and that you clear the right one.
<div class="accordion-group">
<div class="accordion-heading">
<a class="accordion-toggle" data-toggle="collapse" data-parent="#accordion#{base + 0}" href="#collapse3">
<span .number>#{base + 3}
Run
<code>
cabal update
<div id="collapse3" class="accordion-body collapse">
<div class="accordion-inner">
<p>
This will download the package index from Stackage and
\ update your local one.
<p>
Now you're ready to install packages!
<h3>
Packages
<div .container .content>
<div .packages>
<table .table>
<thead>
<th>Package
<th>Docs
<th>Synopsis
<tbody>
$forall (name,mversion,synopsis,mdoc) <- packages
<tr>
<td>
<a href=@{PackageR name}>
#{name}
$maybe version <- mversion
-#{asText version}
<td>
$maybe doc <- mdoc
<a href=@{doc}>Docs
<td>
#{synopsis}
<div .container>
<p .bottom-links>
$if hasBundle
<span>
<a href=@{SnapshotR slug StackageBundleR} title="This is useful for making modifications to an existing snapshot">
\Bundle