buffering package:pathtype

block-buffering should be enabled if possible. The size of the buffer is n items if the argument is Just n and is otherwise implementation-dependent.
line-buffering should be enabled if possible.
buffering is disabled if possible.
Computation hGetBuffering hdl returns the current buffering mode for hdl.
Computation hSetBuffering hdl mode sets the mode of buffering for handle hdl on subsequent reads and writes. If the buffer mode is changed from BlockBuffering or LineBuffering to NoBuffering, then
  • if hdl is writable, the buffer is flushed as for hFlush;
  • if hdl is not writable, the contents of the buffer is discarded.
This operation may fail with:
  • isPermissionError if the handle has already been used for reading or writing and the implementation does not allow the buffering mode to be changed.