Created
May 4, 2019 04:56
-
-
Save naoto-ogawa/5a592480fa2e7a197e500458169c0f75 to your computer and use it in GitHub Desktop.
io-stream sample 3 (copy)
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 SampleStream where | |
import Prelude as P hiding(lines) | |
import qualified Data.ByteString.UTF8 as BU | |
import System.IO.Streams | |
import System.IO.Streams.Debug | |
copy :: IO () | |
copy = withFileAsOutput "./test/data/Types.hs.out1" (\os -> do | |
withFileAsInput "./test/data/Types.hs" (\is -> do | |
-- is1 <- lines is | |
-- is2 <- debugInputBS (BU.fromString "test") stdout is1 | |
-- connect is2 os | |
connect is os | |
) | |
) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment