Skip to content

Instantly share code, notes, and snippets.

@bgamari
Created January 30, 2012 19:59
Show Gist options
  • Save bgamari/1706324 to your computer and use it in GitHub Desktop.
Save bgamari/1706324 to your computer and use it in GitHub Desktop.
Hedis thunk leak
{-# LANGUAGE OverloadedStrings #-}
import Data.ByteString.Char8 (ByteString)
import qualified Data.ByteString.Char8 as BS
import Data.Serialize
import Control.Monad
import System.IO
import Database.Redis
import Data.List.Split
import Control.Monad.IO.Class
type Entity = ByteString
connectInfo = defaultConnectInfo {connectHost="localhost"}
main = do
conn ← connect connectInfo
go conn 1
go conn n = do
runRedis conn $ sadd "hello" [encode n]
go conn (n+1::Int)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment