-
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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module Lib | |
where | |
import Graphics.Gnuplot.Simple | |
import qualified Graphics.Gnuplot.Terminal.SVG as SVG | |
foo = do | |
let zs = [ (x,x) | x <- [1..10] ] | |
plotList [Key Nothing | |
,YRange (0,maximum (map snd zs) + 1) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- Updated for GHC 7.10 | |
{--------------------------------------------------------------------- | |
A HASKELL LIBRARY OF MONADIC PARSER COMBINATORS | |
17th April 1997 | |
Graham Hutton Erik Meijer | |
University of Nottingham University of Utrecht |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Use Gists to store code you would like to remember later on | |
console.log(window); // log the "window" object to the console |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module SplitFile | |
( splitFile, splitFileOn, splitHandle, splitHandleOn, findNext, findNewLine | |
) where | |
import System.IO | |
import qualified Data.ByteString.Char8 as B | |
splitFileOn :: (Char -> Bool) -> Int -> FilePath -> IO [Integer] | |
splitFileOn find parts path = do | |
h <- openBinaryFile path ReadMode |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module Misc | |
( withOutputTo | |
) where | |
import System.IO | |
import GHC.IO.Handle | |
import Control.Exception | |
-- | Run an IO action with stdout redirected to a file. | |
-- Restores stdout upon completion of the action. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- 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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{-# LANGUAGE OverloadedStrings #-} | |
{-# LANGUAGE DeriveGeneric #-} | |
module Lib | |
where | |
import Data.Aeson | |
import GHC.Generics (Generic) | |
import Data.Stringable |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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=''' |