I hereby claim:
- I am jamesthompson on github.
- I am james_rth (https://keybase.io/james_rth) on keybase.
- I have a public key ASDoRfTsm8xenyyW3WnK2OabszUxiN4gGDNit_NJtwfUsgo
To claim this, I am signing this object:
{-# LANGUAGE AllowAmbiguousTypes #-} | |
{-# LANGUAGE DataKinds #-} | |
{-# LANGUAGE DerivingStrategies #-} | |
{-# LANGUAGE FlexibleContexts #-} | |
{-# LANGUAGE FlexibleInstances #-} | |
{-# LANGUAGE GADTs #-} | |
{-# LANGUAGE GeneralizedNewtypeDeriving #-} | |
{-# LANGUAGE InstanceSigs #-} | |
{-# LANGUAGE KindSignatures #-} |
I hereby claim:
To claim this, I am signing this object:
#!/bin/sh | |
set +ex | |
# A script to install stack on Raspbian | |
# Use stack installer script to install stack | |
curl -sSL https://get.haskellstack.org/ | sh | |
# Use apt-get to install llvm |
{-# LANGUAGE DefaultSignatures #-} | |
{-# LANGUAGE DeriveAnyClass #-} | |
{-# LANGUAGE DeriveGeneric #-} | |
{-# LANGUAGE FlexibleContexts #-} | |
{-# LANGUAGE FlexibleInstances #-} | |
{-# LANGUAGE MultiParamTypeClasses #-} | |
{-# LANGUAGE TupleSections #-} | |
{-# LANGUAGE TypeFamilies #-} | |
{-# LANGUAGE TypeOperators #-} |
import Data.List (intersperse) | |
import Data.Monoid (mconcat) | |
triangleIO :: IO () | |
triangleIO = putStrLn triangle | |
triangle :: String | |
triangle = mconcat . intersperse "\n" . fmap (intersperse ' ') $ cycle ['0'] | |
where cycle x = x : (cycle x >>= growOne) | |
growOne (x:z) = [opp x:x:z] |
import Control.Comonad (extract, (<<=), (=>>)) | |
import Control.Monad (void) | |
import Data.Functor (fmap) | |
import Data.List (intersperse) | |
import Data.List.NonEmpty (NonEmpty, toList, (<|)) | |
import Data.Monoid (mconcat) | |
import Data.Traversable (traverse) | |
import Prelude (IO, Int, String, drop, id, mod, otherwise, | |
putStrLn, take, undefined, ($), (.), (==)) |
{ | |
"name": "DemoApp", | |
"preferences": [ | |
{ | |
"categories": [ | |
{ | |
"example": "guardian-stevebell: New opinion from Steve Bell at the Guardian", | |
"id": "news", | |
"matches": [ | |
"guardian-stevebell: (.*)" |
module TrentTree where | |
import Control.Monad.Trans.Class -- from the `transformers` package | |
import Control.Monad.Trans.Except -- from the `errors` package | |
import Data.Monoid ((<>)) | |
import Data.Tree | |
import System.Directory (doesDirectoryExist, | |
getDirectoryContents) | |
import System.FilePath (combine, takeFileName) |
{ | |
defaults = | |
{ config, pkgs, ... }: | |
{ deployment.targetEnv = "virtualbox"; | |
deployment.virtualbox.memorySize = 2048; # Mb | |
deployment.virtualbox.headless = true; | |
}; | |
} |
{ numZookeeperNodes ? 1 }: | |
with import <nixpkgs/lib>; | |
let | |
makeMachine = n: nameValuePair "zk-${toString n}" | |
({ config, pkgs, nodes, ... }: |