Skip to content

Add lifted handle functions#323

Merged
chshersh merged 7 commits intokowainik:masterfrom
rektrex:add_lifted_handle_functions
Sep 30, 2020
Merged

Add lifted handle functions#323
chshersh merged 7 commits intokowainik:masterfrom
rektrex:add_lifted_handle_functions

Conversation

@rektrex
Copy link
Copy Markdown
Collaborator

@rektrex rektrex commented Aug 14, 2020

Resolves #314

Checklist:

HLint

  • I've changed the exposed interface (add new reexports, remove reexports, rename reexported things, etc.).
    • I've updated hlint.dhall accordingly to my changes (add new rules for the new imports, remove old ones, when they are outdated, etc.).
    • I've generated the new .hlint.yaml file (see this instructions).

General

  • I've updated the CHANGELOG with the short description of my latest changes.
  • All new and existing tests pass.
  • I keep the code style used in the files I've changed (see style-guide for more details).
  • I've used the stylish-haskell file.
  • My change requires the documentation updates.
    • I've updated the documentation accordingly.
  • I've added the [ci skip] text to the docs-only related commit's name.

Copy link
Copy Markdown
Contributor

@hint-man hint-man bot left a 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.

@chshersh chshersh mentioned this pull request Aug 21, 2020
10 tasks
@chshersh chshersh added the reexport Reexport something new label Aug 21, 2020
Copy link
Copy Markdown
Member

@vrom911 vrom911 left a 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! 👍🏼

Lifted functions to work with stdin and stdout.
-}
{- $handle
Lifted functions to work with IO Handles.
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
Lifted functions to work with IO Handles.
Lifted functions to work with 'Relude.Base.IO' 'Handle's.

, hIsEOF
, hSetBuffering
, hGetBuffering
, module System.IO
Copy link
Copy Markdown
Member

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 🙂

Copy link
Copy Markdown
Contributor

@chshersh chshersh left a 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 🙂

Stability: Stable
Portability: Portable

Lifted functions to with IO Handles.
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
Lifted functions to with IO Handles.
Lifted functions to work with 'IO' 'Handle's.

@since 0.8.0.0
-}
hSetBuffering :: MonadIO m => IO.Handle -> IO.BufferMode -> m ()
hSetBuffering = (liftIO .) . IO.hSetBuffering
Copy link
Copy Markdown
Contributor

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

Suggested change
hSetBuffering = (liftIO .) . IO.hSetBuffering
hSetBuffering h = liftIO . IO.hSetBuffering h

@chshersh
Copy link
Copy Markdown
Contributor

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>
@rektrex
Copy link
Copy Markdown
Collaborator Author

rektrex commented Sep 21, 2020

Sorry, forgot to add [ci skip].

Copy link
Copy Markdown
Member

@vrom911 vrom911 left a 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 ✨

Copy link
Copy Markdown
Contributor

@chshersh chshersh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great work! 💪

@chshersh chshersh merged commit 61d85ea into kowainik:master Sep 30, 2020
@chshersh
Copy link
Copy Markdown
Contributor

@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 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

reexport Reexport something new

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Reexport 'hFlush'

3 participants