Skip to content

Instantly share code, notes, and snippets.

@sebastiaanvisser
sebastiaanvisser / g0.hs
Created September 10, 2012 08:07
Composing algebras.
{-# LANGUAGE
GADTs
, KindSignatures
, RankNTypes
, TupleSections
, TypeOperators
#-}
module Generics.Morphism where
import Control.Arrow
@piscisaureus
piscisaureus / pr.md
Created August 13, 2012 16:12
Checkout github pull requests locally

Locate the section for your github remote in the .git/config file. It looks like this:

[remote "origin"]
	fetch = +refs/heads/*:refs/remotes/origin/*
	url = [email protected]:joyent/node.git

Now add the line fetch = +refs/pull/*/head:refs/remotes/origin/pr/* to this section. Obviously, change the github url to match your project's URL. It ends up looking like this:

@ekmett
ekmett / Space.hs
Created June 7, 2011 14:58
haskell vector spaces
{-# LANGUAGE TypeFamilies, FlexibleContexts, TypeOperators, UndecidableInstances, GeneralizedNewtypeDeriving #-}
module Numeric.Vector.Space where
import Data.Functor.Representable.Trie hiding (Entry)
import Data.Key (Adjustable(..), Key)
import qualified Data.Key as Key
import qualified Data.Heap as Heap
import Data.Heap (Heap, Entry(..))
import qualified Data.List.NonEmpty as NonEmpty
import Data.List.NonEmpty (NonEmpty(..))