Skip to content

Instantly share code, notes, and snippets.

@adbrowne
adbrowne / Church.hs
Created February 11, 2016 01:35
Church encoded free monads vs not
-- runs fast
{-# LANGUAGE DeriveFunctor #-}
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE TemplateHaskell #-}
module Main where
import Control.Monad
import Control.Monad.Free.Church
import Control.Monad.Free.TH
@adbrowne
adbrowne / FreeAp.hs
Last active August 30, 2016 01:59
Free Applicative Example
module Main where
import Lib
import Data.Monoid
import Data.Maybe
import qualified Data.Map.Strict as Map
import Control.Concurrent (threadDelay)
import Control.Concurrent.Async
import Control.Applicative.Free