You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Operations like fdRead which read the data as [Char] are often not what you'd want. Instead you'd want the payload to be a ByteString.
Instead of having to roll your own, by using a combination of the unix-bytestring and unix packages, unix ought to directly provide such convenience functions.
This was really confusing to me. If you are already that low-level that you use the unix package and mess with file descriptors... you are probably very far away from anything String based. You don't really want to write a 10GB file using the String type, do you?
This commit addes two new functions: fdReadBytes and fdWriteBytes.
They are like fdRead and fdWrite respectively but instead of
reading/writing String they use ByteStrings.
Operations like
fdRead
which read the data as[Char]
are often not what you'd want. Instead you'd want the payload to be aByteString
.Instead of having to roll your own, by using a combination of the
unix-bytestring
andunix
packages,unix
ought to directly provide such convenience functions.See also http://thread.gmane.org/gmane.comp.lang.haskell.libraries/23812/focus=23816
The text was updated successfully, but these errors were encountered: