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 terminal IO functions #148

Merged
merged 5 commits into from
Dec 4, 2017
Merged

Add terminal IO functions #148

merged 5 commits into from
Dec 4, 2017

Conversation

beojan
Copy link
Contributor

@beojan beojan commented Dec 4, 2017

I haven't added @since comments, since this would depend on what release this goes into.

@snoyberg
Copy link
Owner

snoyberg commented Dec 4, 2017

This new version will be 1.3.1. Can you add the @since comments, update the package.yaml file and ChangeLog, and make corresponding changes to classy-prelude-conduit/package.yaml and classy-prelude-yesod/package.yaml for the version number and bounds? (Without those last changes, stack build will fail with a bounds error.)

@beojan
Copy link
Contributor Author

beojan commented Dec 4, 2017

Done
EDIT: Do you also want to bump the classy-prelude-conduit and classy-prelude-yesod version numbers?

-- Uses system locale settings
--
-- @since 1.3.1
interact :: MonadIO m => (Text -> Text) -> m ()
Copy link
Owner

Choose a reason for hiding this comment

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

Is a strict Text the correct data type to use here? I'm generally opposed to lazy I/O, but a strict I/O version of interact is pretty confusing. At the very least, it should be documented. (Same basic idea applies to getContents, though due to the type signature of interact the downsides of lazy I/O are much less severe.)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Switched it to lazy IO. It does have the downside here that LTexts have to be used instead of Texts, while in the Prelude, it's Strings either way.

Copy link
Owner

Choose a reason for hiding this comment

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

I agree that it's a downside.


-- | Write a character to stdout
--
-- Uses system locale settings
Copy link
Owner

Choose a reason for hiding this comment

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

This is missing a @since

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Fixed.


-- | Read a line from stdin
--
-- Uses system locale settings
Copy link
Owner

Choose a reason for hiding this comment

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

Missing @since

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Fixed.

@snoyberg
Copy link
Owner

snoyberg commented Dec 4, 2017

Thanks! Just waiting for CI to pass then I'll merge.

@snoyberg snoyberg merged commit 202a976 into snoyberg:master Dec 4, 2017
@snoyberg
Copy link
Owner

snoyberg commented Dec 4, 2017

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants