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
# Enable some user level services | |
systemd.user.services = { | |
status-notifier-watcher = { | |
enable = true; | |
description= "status notifier watcher"; | |
wantedBy = [ "default.target" ]; | |
before = [ "taffybar.service" ]; | |
serviceConfig = { | |
Type = "simple"; |
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
-- *sniff sniff* .. I smell, overkill | |
type family CmdArg (a :: k) :: Type | |
-- Totally overdone, but you can use promoted types for a bit of fun... | |
-- I don't use the promoted type here, but could be nice for flexibility later, maybe. | |
data Cmd (a :: k) (v :: Type -> Type) where | |
Cmd :: Show (CmdArg a) => CmdArg a -> Cmd a v | |
deriving instance Show (Cmd a v) |
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 RankNTypes #-} | |
module StateAPI where | |
import Control.Lens (Lens', cons, lens, (%~)) | |
import Control.Monad.IO.Class (MonadIO) | |
import Data.Function ((&)) | |
import Data.Typeable (Typeable) | |
import Hedgehog |
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
cSetDrinkCoffee3 | |
:: forall g m. (MonadGen g, MonadTest m, MonadIO m) | |
=> C.Machine | |
-> Command g m Model | |
cSetDrinkCoffee3 mach = emptyCmd (alwaysGen SetDrinkCoffee) exec | |
& flip require (\(Model dtype) _ -> dtype == Coffee) | |
& flip ensure (\_ _ _ out -> case out of | |
C.Coffee {} -> success | |
_ -> failure | |
) |
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
resolver: ghc-8.4.3 | |
system-ghc: true | |
install-ghc: false |
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
{ pkgs ? import <nixpkgs> {} | |
}: | |
with pkgs; | |
let | |
hie = | |
import (fetchTarball "https://github.com/puffnfresh/hie-nix/archive/6b1fd52e4946dc0d94c7892238d06be51a079d31.tar.gz") { inherit pkgs; }; | |
hieWrapper = writeShellScriptBin "hie" '' | |
argv=( "$@" ) |
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 | |
CODE=$(pwd)/result/bin/code | |
function get_ver() { | |
curl --silent "https://raw.githubusercontent.com/$1/$2/master/package.json" | grep '"version":' | awk '{ print $2 }' | tr -d '[:alpha:]", :' | |
} | |
function get_vsixpackage_sha() { | |
URL="https://$1.gallery.vsassets.io/_apis/public/gallery/publisher/$1/extension/$2/latest/assetbyname/Microsoft.VisualStudio.Services.VSIXPackage" |
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
-- Given [a,b] - Gives [a,b,a,b] | |
wutDecoder :: Monad f => Decoder f [Int] | |
wutDecoder = withCursor $ \curs -> do | |
-- Move into the array | |
x <- down curs | |
-- Decode first | |
a <- int pint x | |
-- Step to the right | |
x' <- moveRightN 1 x | |
-- Decode that one |
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
data Tally = Tally | |
{ _tallyTally :: Map Text Int | |
} | |
deriving (Eq, Show) | |
makeLenses ''Tally | |
newtype CoveredProperty = PC | |
{ unPC :: PropertyT (StateT Tally IO) () | |
} |
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 Seppy where | |
import Control.Applicative (liftA2, (<$>), (<*>), (<*), (<*), (<|>)) | |
import Data.Char (Char) | |
import Data.Foldable (asum) | |
import Text.Parser.Char (CharParsing, char,alphaNum) | |
import Text.Parser.Combinators (try,many) |