Created
November 11, 2013 12:07
-
-
Save joastbg/7412252 to your computer and use it in GitHub Desktop.
Haskell - Simple example of how to use Redis, from the hedis documentation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| {-# LANGUAGE OverloadedStrings #-} | |
| import Database.Redis | |
| import Control.Monad.Trans | |
| main :: IO () | |
| main = do | |
| conn <- connect defaultConnectInfo | |
| runRedis conn $ do | |
| set "foo" "123" | |
| set "bar" "456" | |
| foo <- get "foo" | |
| bar <- get "bar" | |
| liftIO $ print (foo, bar) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment