Skip to content

Instantly share code, notes, and snippets.

@rylev
Created May 13, 2014 15:08
Show Gist options
  • Save rylev/1da4bf6aeed4ca10141d to your computer and use it in GitHub Desktop.
Save rylev/1da4bf6aeed4ca10141d to your computer and use it in GitHub Desktop.
Cargo Cult Hedis
import Database.Redis
import Control.Monad.IO.Class
import Data.ByteString.Char8
main :: IO ()
main = do
conn <- connect defaultConnectInfo
runRedis conn $ do
set (pack "hello") (pack "hello")
hello <- get $ pack "hello"
liftIO $ print $ hello
print "Success"
@rylev
Copy link
Author

rylev commented May 13, 2014

This prints:

Right (Just "hello")
"Success"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment