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
with import <nixpkgs> {}; | |
# As of 2019-12-03 this requries nixpkgs-unstable, plus additional cvxpy derivations. | |
# Those can be found in https://github.com/teh/nixpkgs/tree/cvxpy. | |
# If your <nixpkgs> is managed by git, then one way to get cvxpy is ... | |
# git remote add teh git@github.com:teh/nixpkgs.git | |
# git checkout -b cvxpy teh/cvxpy | |
# git rebase nixpkgs-unstable | |
# Then your nixpkgs will contain the necessary derivations. | |
# Soon this step may be unnecessary. | |
stdenv.mkDerivation { |
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
self: super: | |
let | |
lib = super.haskell.lib; | |
#addPkg = path: rest: lib.dontCheck (lib.dontHaddock (self.haskellPackages.callPackage path rest)); | |
stdenv = super.stdenv; | |
pkgs = super.pkgs; | |
in { | |
haskellPackages = super.haskellPackages.extend (hself: hsuper: { | |
"Agda" = super.haskellPackages.callPackage | |
({ mkDerivation, aeson, alex, array, async, base, binary |
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 to install; | |
#curl -Lks https://gist.githubusercontent.com/timsears/ee325ee4a0e60923cfc12c4cda561cb9/raw/dotfile-install | bash | |
git clone --bare https://github.com/timsears/dotfile.git $HOME/.dotfile | |
function dotfile { | |
git --git-dir=$HOME/.dotfile/ --work-tree=$HOME $@ | |
} | |
mkdir -p .dotfile-backup | |
dotfile checkout | |
if [ $? = 0 ]; then | |
echo "Checked out dotfile project."; |
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
module Main where | |
import Text.Printf | |
import Control.Applicative | |
import Data.List | |
import Data.Function (on) | |
import qualified Data.Map as M | |
import Data.Map ((!)) | |
import Control.Monad | |
--import Control.Monad.Logic |
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
-- | fizzbuzz | |
module Main where | |
import Control.Monad (join) | |
import Text.Printf (printf) | |
data FB = Fizz | Buzz | FizzBuzz deriving Show | |
-- lazy infinite lists | |
threes :: [Maybe FB] |
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 DeriveFunctor #-} | |
{-# LANGUAGE ViewPatterns #-} | |
module Main where | |
import Fixed.FreeMonad | |
import Data.Interface.TSequence | |
import Control.Monad | |
import Control.Applicative | |
import qualified Control.Monad.Free as F | |
data FDirective next = FL next | FR next | FS |