hPutStrLn package:bytestring

Write a ByteString to a handle, appending a newline byte. Unlike hPutStr, this is not atomic: other threads might write to the handle between writing of the bytestring and the newline.
Write a ByteString to a handle, appending a newline byte. The chunks will be written one at a time, followed by a newline. Other threads might write to the Handle in between, and hence hPutStrLn alone is not suitable for concurrent writes.