Skip to content

Instantly share code, notes, and snippets.

@funrep
Created July 21, 2013 09:33
Show Gist options
  • Save funrep/6048051 to your computer and use it in GitHub Desktop.
Save funrep/6048051 to your computer and use it in GitHub Desktop.
-- 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