Skip to content

Instantly share code, notes, and snippets.


Twan van Laarhoven twanvl

View GitHub Profile
twanvl / gist:3873221
Created Oct 11, 2012
MonadTrans with explicit dictionaries
View gist:3873221
{-# LANGUAGE KindSignatures #-}
{-# LANGUAGE ConstraintKinds, GADTs #-}
{-# LANGUAGE FlexibleContexts #-}
import GHC.Exts
-- see
data Dict :: Constraint -> * where
Dict :: c => Dict c
twanvl / gist:2938456
Created Jun 15, 2012
Applicative Concurrent computation without unnecessary threads
View gist:2938456
{-# LANGUAGE ImplicitParams #-}
import Control.Monad
import Control.Monad.Fix
import Control.Applicative
import Control.Concurrent
import Control.Concurrent.MVar
import Control.Exception
import Prelude hiding (catch)
import Data.IORef
import Data.Traversable
You can’t perform that action at this time.