-
Notifications
You must be signed in to change notification settings - Fork 28
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 bindings to bytestring package #151
Add bindings to bytestring package #151
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks 👍
Let's add all functions from https://hackage.haskell.org/package/bytestring-0.11.4.0/docs/Data-ByteString-Char8.html#g:29 (and corresponding for lazy version) to Effectful.Console.ByteString{,Lazy} for completion. Same with https://hackage.haskell.org/package/bytestring-0.11.4.0/docs/Data-ByteString-Char8.html#g:31 and corresponding for lazy versions, you excluded a few functions and I'm not sure why. |
What's the status of this? Is it still #151 (comment)? @mmhat I'd be happy to help if you need it! |
@ocharles feel free to open a separate PR based on this one with missing functions if you need this in now-ish. |
@ocharles I plan to continue working on it eventually but unfortunately I don't have time to finish this PR right now. So feel free to continue working on it. Yes, the parts mentioned in #151 (comment) are the only remaining issues. |
Cool, thanks both! I have no burning need for this, but now that we've ported CircuitHub to use |
@mmhat ping. I'd like to include this in 2.3.0.0 which will be released soon. |
@arybczak I'll finish it during the upcoming weekend. |
@arybczak I addressed the issue with the missing functions pointed out in #151 (comment). Please let me know if something else is missing or needs to be changed and I'll try to resolve that quickly this time. |
…ctful.FileSystem.IO.ByteString
The version bounds for of tasty-bench<=0.3.3 allow tasty>=1.5. But that combination does not build, see for example: https://github.com/haskell-effectful/effectful/actions/runs/6135853029/job/16650024577
b7c6d18
to
4abb127
Compare
@arybczak I added version bounds for tasty-bench and disabled benchmarks on GHC<9.8. I had to do this to get a green CI; If we want to restore the previous behavior I suggest to do that in a separate PR. |
Thanks 🙂 |
This PR tries to fill a gap in the current
effectful
package: We provide bindings toSystem.IO
andUnliftIO.IO.File
which allow us to get a handle for a file or write a file, but we do not provide the necessary operations to actually read from/write to the handles or read the contents of a file without usingIOE
. These missing operations are provided here together with lifted versions of otherIO
related functions from thebytestring
package which were added for the sake of completeness.The PR also adds a new
Console
effect (as mentioned here) that signals stdin/stdout/stderr usage and is used by theEffectful.ByteString
modules. It may not be suitable for larger applications but IMHO it is valuable for smaller ones or prototyping where there is no need for a solution like streaming library or a logging framework.