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

Implement stimes for Doc #135

Merged
merged 6 commits into from
Jun 30, 2020
Merged

Implement stimes for Doc #135

merged 6 commits into from
Jun 30, 2020

Conversation

sjakobi
Copy link
Collaborator

@sjakobi sjakobi commented Jan 25, 2020

Fixes #133.

@@ -142,6 +142,16 @@ data Doc ann =
instance Semigroup (Doc ann) where
(<>) = Cat
sconcat (x :| xs) = hcat (x:xs)
stimes n x
| n <= 0 = Empty
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

This is a behaviour change: The default definition fails if n <= 0.

@sjakobi sjakobi added the PVP: major Requires a major version bump label Feb 8, 2020
@quchen
Copy link
Owner

quchen commented Mar 6, 2020

Also: love the »PVP major« label.

@sjakobi
Copy link
Collaborator Author

sjakobi commented Mar 6, 2020

Also: love the »PVP major« label.

I basically copied that practice from @hvr who uses it in bytestring and probably other projects too.

@sjakobi sjakobi merged commit fbbc66e into master Jun 30, 2020
@sjakobi sjakobi deleted the 133-stimes branch June 30, 2020 01:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Performance PVP: major Requires a major version bump
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Doc's Semigroup instance should have a custom stimes
2 participants