Some notes on building hl (the haskell.org website) on an Unbuntu box.
-
Follow the instructions at https://www.stackage.org/install#ubuntu to install the GHC tool chain.
-
Install the following packages:
sudo apt-get install -y libicu-dev
-
Run:
| Currently hackage-server only builds with GHC 7.6.3. | |
| # Installing ghc 7.6.3 for OSX | |
| # download the GHC 7.6.3 tarball for OSX (64-bit) | |
| # for links to other OSes: https://www.haskell.org/ghc/download_ghc_7_6_3 | |
| wget https://www.haskell.org/ghc/dist/7.6.3/ghc-7.6.3-x86_64-apple-darwin.tar.bz2 | |
| tar jxf ghc-7.6.3-x86_64-apple-darwin.tar.bz2 | |
| cd ghc-7.6.3 | |
| mkdir $HOME/apps |
| module Foo where | |
| -- This is a translation to Haskell of parts of the paper | |
| -- "A Schemer's View of Monads" by Adam C. Foltzer & Daniel P. Friedman: | |
| -- | |
| -- https://cgi.soic.indiana.edu/~c311/lib/exe/fetch.php?media=manymonads.pdf | |
| import Control.Monad.State | |
| -- `Tree a` is a way of describing only those S-exps which are trees |
| {- Simple pretty printer for the AST created by Language.Haskell.Exts. | |
| - | |
| - Usage: program source.hs | |
| - | |
| -} | |
| import qualified Language.Haskell.Exts as E | |
| import Language.Haskell.Exts.Parser (ParseResult(..)) | |
| import Data.List | |
| import System.Environment |
Some notes on building hl (the haskell.org website) on an Unbuntu box.
Follow the instructions at https://www.stackage.org/install#ubuntu to install the GHC tool chain.
Install the following packages:
sudo apt-get install -y libicu-dev
Run:
| #!/usr/bin/perl | |
| use POSIX qw(strftime); | |
| $| = 1; | |
| sub annotate_handle { | |
| my ($handle) = @_; | |
| my $start = time(); | |
| while (<$handle>) { |
| #!/usr/bin/env python | |
| # | |
| # Provision a static lighttpd server in $HOME/.lighttpd/config-<port> | |
| import os | |
| import re | |
| import sys | |
| from os.path import expanduser | |
| CONF_TEMPLATE=''' |
| {-# LANGUAGE OverloadedStrings #-} | |
| {-# LANGUAGE DeriveGeneric #-} | |
| module Lib | |
| where | |
| import Data.Aeson | |
| import GHC.Generics (Generic) | |
| import Data.Stringable |
| -- Example of using the Rakhana libraries. | |
| -# LANGUAGE NoMonomorphismRestriction #-} | |
| module Foo | |
| where | |
| import Data.Rakhana | |
| import Control.Monad.Trans (liftIO) | |
| import qualified Data.ByteString.Char8 as B |
| #!/bin/sh | |
| # | |
| # Script to populate a TUF directory with a new set of private keys. | |
| # | |
| # Note: Need to install the hackage-repo-tool package from Hackage. | |
| REPO_TOOL=hackage-repo-tool | |
| KEYS_DIR=/tmp/keys | |
| DATA_DIR=./datafiles |
Download and build the newest haddock. The build instructions are
in README.md.
git clone https://github.com/haskell/haddock.git cd haddock
cabal sandbox init cabal sandbox add-source haddock-library cabal sandbox add-source haddock-api cabal install --dependencies-only