Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add convenient I/O operations using ByteString for payload #35

Closed
hvr opened this issue Jan 12, 2015 · 2 comments
Closed

Add convenient I/O operations using ByteString for payload #35

hvr opened this issue Jan 12, 2015 · 2 comments

Comments

@hvr
Copy link
Member

hvr commented Jan 12, 2015

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.

See also http://thread.gmane.org/gmane.comp.lang.haskell.libraries/23812/focus=23816

@hasufell
Copy link
Member

hasufell commented Apr 3, 2016

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?

@onurcanbektas
Copy link

onurcanbektas commented Jul 6, 2018

I would like to get start on this issue, but, to be honest, I couldn't understand what is the exact issue ? :)

Note: the link is dead.

mmhat added a commit to mmhat/unix that referenced this issue May 15, 2021
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.
mmhat added a commit to mmhat/unix that referenced this issue Jul 5, 2022
mmhat added a commit to mmhat/unix that referenced this issue Jul 5, 2022
@hasufell hasufell added this to the 2.8.0.0 milestone Jul 10, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants