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>) { |
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:
| {- 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 |
| 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 |
| 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 |
| #!/bin/sh | |
| # | |
| # Recipe for reproducing a linkage error with GHC 7.8.3 under OSX. | |
| # | |
| # GHC was installed using https://ghcformacosx.github.io/ | |
| # | |
| # Specific 7.8.3 version: https://github.com/ghcformacosx/ghc-dot-app/releases/download/v7.8.3-r1/ghc-7.8.3-r1.zip | |
| # | |
| # Output of the find command at the end will include a reference to 'findExecutable3_info', | |
| # but nowhere does the tar package reference the function 'findExecutable'. |
| -- Hackage versions as of 2012-05-23 00:00:00 UTC | |
| constraints: | |
| 4Blocks <= 0.2, | |
| AC-Angle <= 1.0, | |
| AC-Boolean <= 1.1.0, | |
| AC-BuildPlatform <= 1.1.0, | |
| AC-Colour <= 1.1.4, | |
| AC-EasyRaster-GTK <= 1.1.3, | |
| AC-HalfInteger <= 1.2.1, | |
| AC-MiniTest <= 1.1.1, |
| {-# LANGUAGE OverloadedStrings #-} | |
| import Text.Blaze.Svg11 ((!), mkPath, rotate, l, m) | |
| import qualified Text.Blaze.Svg11 as S | |
| import qualified Text.Blaze.Svg11.Attributes as A | |
| import Text.Blaze.Svg.Renderer.String (renderSvg) | |
| import qualified Text.Blaze.Html5 as H | |
| import Text.Blaze.Html.Renderer.Text | |
| import qualified Data.Text.Lazy.IO as TL | |
| main :: IO () |
| { | |
| module Nested where | |
| import Control.Monad | |
| } | |
| %wrapper "monadUserState" | |
| $whitespace = [\ \t\b] | |
| $digit = 0-9 -- digits |
| -- Solution to "Let it snow" 1had - http://lpaste.net/118571 | |
| import qualified Data.Map.Strict as M | |
| import Data.List | |
| import Control.Monad | |
| import Data.Maybe | |
| data SnowFlake = Six | Star | Eight | Flower | Unit | |
| deriving (Eq, Ord, Show) |