Skip to content

Instantly share code, notes, and snippets.

@maoe
Created November 8, 2009 16:15
Show Gist options
  • Save maoe/229341 to your computer and use it in GitHub Desktop.
Save maoe/229341 to your computer and use it in GitHub Desktop.
-- ghc --make -O2 -prof -auto-all -caf-all -fforce-recomp lazyio-forkIO-unbalanced.hs
module Main where
import Data.ByteString.Lazy (ByteString)
import qualified Data.ByteString.Lazy.Char8 as BS (readFile, putStr, unpack)
import System.Environment (getArgs)
import Control.Concurrent (forkIO)
main :: IO ()
main = do
(f:_) <- getArgs
c <- BS.readFile f
forkIO $ BS.putStr c
putStr $ BS.unpack c
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment