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 TemplateHaskell #-} | |
module Main where | |
import Control.Monad | |
import Control.Monad.State | |
import Control.Monad.Trans.Iter | |
import Control.Lens | |
import Data.Set (Set) | |
import qualified Data.Set as Set |
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 TemplateHaskell #-} | |
{-# LANGUAGE DeriveFunctor #-} | |
{-# LANGUAGE FlexibleContexts #-} | |
module Main where | |
import Control.Monad | |
import Control.Monad.Free | |
import Control.Monad.Free.TH | |
data Lang next |
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
" General bundles | |
NeoBundle 'Shougo/vimproc', { | |
\ 'build' : { | |
\ 'windows' : 'make -f make_mingw32.mak', | |
\ 'cygwin' : 'make -f make_cygwin.mak', | |
\ 'mac' : 'make -f make_mac.mak', | |
\ 'unix' : 'make -f make_unix.mak', | |
\ }, | |
\ } | |
NeoBundle 'Shougo/unite.vim' |
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
#!/bin/sh | |
set -x | |
CIRCLE_TAG=`git name-rev --tags --name-only $(git rev-parse HEAD)` | |
docker login -e $DOCKER_EMAIL -u $DOCKER_USER -p $DOCKER_PASS | |
if [ "$CIRCLE_TAG" -ne "undefined" ]; then | |
docker tag user/repo user/repo:$CIRCLE_TAG |
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 #-} | |
{-# LANGUAGE EmptyCase #-} | |
{-# LANGUAGE RankNTypes #-} | |
{-# LANGUAGE TypeOperators #-} | |
{-# LANGUAGE UndecidableInstances #-} | |
module PDividing where | |
import Data.Foldable | |
import Data.Monoid | |
import Data.Profunctor |
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
class Contravariant1 p where | |
contramap1 :: (a -> b) -> p b x -> p a x | |
class Contravariant1 p => Divisible1 p where | |
conquer1 :: p a x | |
divide1 :: (a -> (b, c)) -> p b x -> p c x -> p a x | |
class Divisible1 p => Decidable1 p where | |
lose1 :: (a -> Void) -> p a x | |
choose1 :: (a -> Either b c) -> p b x -> p c x -> p a x |
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
class (Generic1 t, GDecidingR1 q (Rep1 t)) => DecidingR1 q t where | |
decidingR1 :: Decidable (f b) => p q -> (forall g. q g => f b (g a)) -> f b a -> f b (t a) | |
instance (Generic1 t, GDecidingR1 q (Rep1 t)) => DecidingR1 q t where | |
decidingR1 p f r = contramap from1 $ gdecidingR1 p f r | |
class GDecidingR1 q t where | |
gdecidingR1 :: Decidable (f b) => p q -> (forall g. q g => f b (g a)) -> f b a -> f b (t a) |
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
class Unit1 a | |
instance Unit1 a | |
gfoldMap :: (Deciding1 Unit1 f, Monoid m) => (a -> m) -> f a -> m | |
gfoldMap = flip . getOp $ deciding1 (Proxy :: Proxy Unit1) (Op mempty) (Op (flip id)) |
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 #-} | |
{-# LANGUAGE DataKinds #-} | |
{-# LANGUAGE FlexibleContexts #-} | |
{-# LANGUAGE FlexibleInstances #-} | |
{-# LANGUAGE GADTs #-} | |
{-# LANGUAGE InstanceSigs #-} | |
{-# LANGUAGE KindSignatures #-} | |
{-# LANGUAGE MultiParamTypeClasses #-} | |
{-# LANGUAGE PartialTypeSignatures #-} | |
{-# LANGUAGE PolyKinds #-} |
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 DataKinds #-} | |
{-# LANGUAGE DeriveGeneric #-} | |
{-# LANGUAGE GeneralizedNewtypeDeriving #-} | |
{-# LANGUAGE OverloadedStrings #-} | |
{-# LANGUAGE TypeOperators #-} | |
module GitHub where | |
import Control.Lens | |
import Data.Aeson | |
import Data.Aeson.Types (camelTo) |