Created
July 1, 2011 04:07
-
-
Save KirinDave/1057855 to your computer and use it in GitHub Desktop.
Amping up the redis client library in haskell.
This file contains 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
subscriptionEnumerator :: (BS s, MonadIO m) => | |
Redis | |
-> Int | |
-> Enumerator (Message s) m b | |
subscriptionEnumerator rs timeout (Continue k) = do | |
nextRead <- liftIO $ listen rs timeout; | |
let chunk = Chunks $ maybeToList nextRead in | |
k chunk >>== subscriptionEnumerator rs timeout | |
subscriptionEnumerator rs timeout step = returnI step |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment