Created
May 15, 2015 19:07
-
-
Save expipiplus1/7dc7525d24e3bbe19dff to your computer and use it in GitHub Desktop.
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
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