Skip to content

Instantly share code, notes, and snippets.

@expipiplus1
Created May 15, 2015 19:07
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save expipiplus1/7dc7525d24e3bbe19dff to your computer and use it in GitHub Desktop.
Save expipiplus1/7dc7525d24e3bbe19dff to your computer and use it in GitHub Desktop.
module Main where
import Data.Conduit
import Control.Monad.IO.Class
import Control.Monad
source :: Source IO Char
source = forever $
do a <- liftIO getChar
yield a
debugSink :: Show a => Sink a IO ()
debugSink = forever $
do liftIO $ putStr "DebugPrint: "
a <- await
liftIO $ print a
main :: IO ()
main = source $$ debugSink
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment