Skip to content

Add a newtype Unit#106

Merged
mixphix merged 1 commit into
haskell:masterfrom
meooow25:unit
Aug 25, 2024
Merged

Add a newtype Unit#106
mixphix merged 1 commit into
haskell:masterfrom
meooow25:unit

Conversation

@meooow25

Copy link
Copy Markdown
Contributor

Unit is a newtype over () with handy Semigroup+Monoid instances, where (<>) = seq. This allows reducing structures to normal form using foldMap-like functions.

Closes #105.

The names Unit and runUnit make sense to me, but if you'd prefer something else let me know.

@meooow25

Copy link
Copy Markdown
Contributor Author

Looks like the CI needs fixing.

@Bodigrim

Copy link
Copy Markdown
Contributor

Looks like the CI needs fixing.

Yeah, regenerate it with the newest haskell-ci.

mixphix added a commit that referenced this pull request Aug 25, 2024
Unit is a newtype over () with handy Semigroup+Monoid instances,
where (<>) = seq. This allows reducing structures to normal form
using foldMap-like functions.
@meooow25

Copy link
Copy Markdown
Contributor Author

Thanks, rebased.

@mixphix mixphix merged commit 9f5e491 into haskell:master Aug 25, 2024
@meooow25 meooow25 deleted the unit branch August 25, 2024 14:43
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.

Add Unit

3 participants