It's now here, in The Programmer's Compendium. The content is the same as before, but being part of the compendium means that it's actively maintained.
This file contains 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
# Usage (from project root): ./docgen.sh <Repo Name> <Version> <Hackage Username> <Hackage Password> | |
# e.g. ./docgen.sh Bang 0.1.1.0 5outh F4kePa55word | |
#!/bin/bash | |
cabal configure && cabal build && cabal haddock --hyperlink-source \ | |
--html-location='http://hackage.haskell.org/package/$pkg/docs' \ | |
--contents-location='http://hackage.haskell.org/package/$pkg' | |
S=$? | |
if [ "${S}" -eq "0" ]; then | |
cd "dist/doc/html" | |
DDIR="${1}-${2}-docs" |
This file contains 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 ConstraintKinds, RankNTypes, TypeFamilies, FlexibleInstances #-} | |
{- | Description: representing functions that can be differentiated | |
The 'AnyRF' wrapper holds functions that can be used | |
for the objective (`f`) or for constraints (`g`). Many functions | |
in the instances provided are partial: this seems to be unavoidable | |
because the input variables haven't been decided yet, so you should | |
not be allowed to use 'compare' on these. But for now just use the | |
standard Prelude classes, and unimplementable functions (which | |
would not produce an 'AnyRF') are calls to 'error'. |
This file contains 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 bash | |
cabal configure && cabal build && cabal haddock --hyperlink-source \ | |
--html-location='/package/$pkg-$version/docs' \ | |
--contents-location='/package/$pkg' | |
S=$? | |
if [ "${S}" -eq "0" ]; then | |
cd "dist/doc/html" | |
DDIR="${1}-${2}-docs" | |
cp -r "${1}" "${DDIR}" && tar -c -v -z --format=ustar -f "${DDIR}.tar.gz" "${DDIR}" | |
CS=$? |
This file contains 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 sh | |
## | |
# This is script with usefull tips taken from: | |
# https://github.com/mathiasbynens/dotfiles/blob/master/.osx | |
# | |
# install it: | |
# curl -sL https://raw.github.com/gist/2108403/hack.sh | sh | |
# |