Created
July 21, 2013 09:33
-
-
Save funrep/6048051 to your computer and use it in GitHub Desktop.
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
-- NOTE: I'm using pipes 4.0 here. | |
module Main where | |
import Pipes | |
import qualified Pipes.Prelude as P | |
main = runEffect $ server >-> client | |
server :: () -> Server String String IO () | |
server = do | |
s <- request () | |
respond s | |
client :: () -> Server String String IO () | |
client = do | |
respond "HI" | |
s <- request () | |
putStrLn $ "Sent and recieved: \"" ++ s ++ "\"" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment