playing with bytestreams in haskell