-
Notifications
You must be signed in to change notification settings - Fork 141
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
Document possible interleaving of hPutStrLn. #201
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! Documentation like this is very valuable!
Could you check that the resulting Haddocks look good? I suspect that an empty line after the first sentence could help.
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.
Cheers!
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.
LGTM.
@cartazio
@@ -1690,6 +1694,10 @@ putStr :: ByteString -> IO () | |||
putStr = hPut stdout | |||
|
|||
-- | Write a ByteString to stdout, appending a newline byte |
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.
Could you please add a period, similar to the change in line 1682?
@@ -1690,6 +1694,10 @@ putStr :: ByteString -> IO () | |||
putStr = hPut stdout | |||
|
|||
-- | Write a ByteString to stdout, appending a newline byte | |||
-- | |||
-- This is not atomic. |
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.
It would be helpful to say what is atomic, to provide a hint for users interested to achieve this property. "Unlike putStr
, this function is not atomic" or something along this.
-- | Write a ByteString to a handle, appending a newline byte | ||
-- | Write a ByteString to a handle, appending a newline byte. | ||
-- | ||
-- This is not atomic. |
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.
It would be helpful to say what is atomic, to provide a hint for users interested to achieve this property. "Unlike hPutStr, this function is not atomic" or something along this.
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.
This line might not be needed, because the following sentence explains the behaviour more conretely.
So, the test suite is failing on this PR for some reason. Does this need a rebase or something? From travis:
|
Yes, it needs to be rebased, which will fix the problem. (This was one of the fixes I took care of when fixing all the outstanding CI issues). I'd still like to see #227 merged, which fixes testing Sitting on #227 is not a good idea. We should merge it, and if unexpectedly a minor issue is found, fix it. It lays a solid foundation for moving forward. |
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.
LGTM now too.
I'd rebase this on master myself but it's in another repo so I cannot. |
Rebased and merged in course of #259. Thanks @AndreasPK! |
See #200