hPutBuf package:ghc-internal

hPutBuf hdl buf count writes count 8-bit bytes from the buffer buf to the handle hdl. It returns (). hPutBuf ignores any text encoding that applies to the Handle, writing the bytes directly to the underlying file or device. hPutBuf ignores the prevailing TextEncoding and NewlineMode on the Handle, and writes bytes directly. This operation may fail with:
  • ResourceVanished if the handle is a pipe or socket, and the reading end is closed. (If this is a POSIX system, and the program has not asked to ignore SIGPIPE, then a SIGPIPE may be delivered instead, whose default action is to terminate the program).