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

Drop outdated comment #328

Merged
merged 2 commits into from
Nov 26, 2020

Conversation

vdukhovni
Copy link
Contributor

The Lazy lines function has not been too strict for some
time now. The issue was resolved a day or so after the comment
was added, but the comment was inadvertently left behind.

The Lazy `lines` function has not been `too` strict for some
time now.  The issue was resolved a day or so after the comment
was added, but the comment was inadvertently left behind.
Copy link
Member

@sjakobi sjakobi left a comment

Choose a reason for hiding this comment

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

Thanks!

> prop_lazy =
(L.unpack . head . lazylines $ L.append (L.pack "a\nb\n") (error "failed"))
==
"a"
Copy link
Contributor

Choose a reason for hiding this comment

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

Could we possibly add this to the test suite?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Can I ask someone else to pitch in?

Copy link
Contributor

@Bodigrim Bodigrim Nov 26, 2020

Choose a reason for hiding this comment

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

I am a bit reluctant to backport two commits to bytestring-0.11 branch, when we can make do with one. Please just add

prop_lines_lazy = head (LC.lines (LC.append (LC.pack "a\nb\n") undefined)) == LC.pack "a"

to Properties.hs and mention prop_lines_lazy in ll_tests, that's it.

    , testProperty "lines_lazy"         prop_lines_lazy

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done.

Copy link
Contributor

@Bodigrim Bodigrim left a comment

Choose a reason for hiding this comment

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

Thanks!

@Bodigrim Bodigrim merged commit 101566e into haskell:master Nov 26, 2020
@Bodigrim Bodigrim added this to the 0.11.1.0 milestone Nov 26, 2020
Bodigrim pushed a commit that referenced this pull request Nov 27, 2020
* Drop outdated comment

The Lazy `lines` function has not been `too` strict for some
time now.  The issue was resolved a day or so after the comment
was added, but the comment was inadvertently left behind.

* Add lazy `lines` non-strictness test

Co-authored-by: Viktor Dukhovni <[email protected]>
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.

4 participants