-
-
Notifications
You must be signed in to change notification settings - Fork 80
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 lifted handle functions #323
Add lifted handle functions #323
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.
There is no place for me here... I will choose the truth I like.
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.
Neat work!
Thanks for the Inline
and specialise
pragmas everywhere! 👍🏼
src/Relude/Lifted.hs
Outdated
@@ -95,3 +98,6 @@ Lifted reexports from "Data.IORef" module. | |||
{- $terminal | |||
Lifted functions to work with stdin and stdout. | |||
-} | |||
{- $handle | |||
Lifted functions to work with IO Handles. |
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.
Lifted functions to work with IO Handles. | |
Lifted functions to work with 'Relude.Base.IO' 'Handle's. |
src/Relude/Lifted/Handle.hs
Outdated
, hIsEOF | ||
, hSetBuffering | ||
, hGetBuffering | ||
, module System.IO |
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.
I would prefer to inline this export explicitly.
It is better for documentation and you can see straight away what is exported from this module without going into sources 🙂
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.
Nice work! A few suggestions from my side as well 🙂
src/Relude/Lifted/Handle.hs
Outdated
Stability: Stable | ||
Portability: Portable | ||
|
||
Lifted functions to with IO Handles. |
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.
Lifted functions to with IO Handles. | |
Lifted functions to work with 'IO' 'Handle's. |
src/Relude/Lifted/Handle.hs
Outdated
@since 0.8.0.0 | ||
-} | ||
hSetBuffering :: MonadIO m => IO.Handle -> IO.BufferMode -> m () | ||
hSetBuffering = (liftIO .) . IO.hSetBuffering |
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.
I would prefer a less point-free implementation
hSetBuffering = (liftIO .) . IO.hSetBuffering | |
hSetBuffering h = liftIO . IO.hSetBuffering h |
Hi @rektrex! I've noticed that there are still a few documentation suggestions left unfixed. Would you like to apply them as well, so we can proceed with this PR? Looking forward to having these changes merged after everything is done 🙂 |
Co-authored-by: Veronika Romashkina <vrom911@gmail.com>
Sorry, forgot to add [ci skip]. |
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.
Great! Thank you so much ✨
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.
Great work! 💪
@rektrex Sorry for the delay in merge. Stack on Travis didn't work around that time, so the CI was failing. I've rerun the Travis CI, and it passed! 💚 Thanks again for the PR 👍 |
Resolves #314
Checklist:
HLint
hlint.dhall
accordingly to my changes (add new rules for the new imports, remove old ones, when they are outdated, etc.)..hlint.yaml
file (see this instructions).General
stylish-haskell
file.[ci skip]
text to the docs-only related commit's name.