Skip to content

Instantly share code, notes, and snippets.

michaelt michaelt

Block or report user

Report or block michaelt

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@kosmikus
kosmikus / TinyServant.hs
Created Nov 1, 2015
Implementation of a small Servant-like DSL
View TinyServant.hs
{-# LANGUAGE DataKinds, PolyKinds, TypeOperators #-}
{-# LANGUAGE TypeFamilies, FlexibleInstances, ScopedTypeVariables #-}
{-# LANGUAGE InstanceSigs #-}
module TinyServant where
import Control.Applicative
import GHC.TypeLits
import Text.Read
import Data.Time
@alexanderkjeldaas
alexanderkjeldaas / peace.sh
Last active Dec 19, 2015
Safer cabal --upgrade-dependencies. Easy detection of non-optimal upper bounds. Unregister broken packages with ghc. Reset ghc pkg db.
View peace.sh
# unregister broken GHC packages. Run this a few times to resolve
# dependency rot in installed packages. ghc-pkg-clean -f
# cabal/dev/packages*.conf also works.
function ghc-pkg-clean() {
for p in `ghc-pkg check $* 2>&1 | grep problems | awk '{print $6}' | sed -e 's/:$//'`
do
echo unregistering $p; ghc-pkg $* unregister $p
done
}
You can’t perform that action at this time.