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 asumMap and foldMapA by coercing foldMap #191

Merged
merged 2 commits into from
Sep 21, 2019

Conversation

josephcsible
Copy link
Contributor

This is how fmapDefault and foldMapDefault look in base,
and is useful for the same reasons.

Checklist:

HLint

  • I've changed the exposed interface (add new reexports, remove reexports, rename reexported things, etc.).
    • I've updated hlint.dhall accordingly to my changes (add new rules for the new imports, remove old ones, when they are outdated, etc.).
    • I've generated the new .hlint.yaml file (see this instructions).

General

  • I've updated the CHANGELOG with the short description of my latest changes.
  • All new and existing tests pass.
  • I keep the code style used in the files I've changed (see style-guide for more details).
  • I've used the stylish-haskell file.
  • My change requires the documentation updates.
    • I've updated the documentation accordingly.
  • I've added the [ci skip] text to the docs-only related commit's name.

Copy link
Contributor

@chshersh chshersh left a comment

Choose a reason for hiding this comment

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

This looks like a good change 👍 I have several suggestions but overall seems nice.

src/Relude/Foldable/Fold.hs Outdated Show resolved Hide resolved
src/Relude/Foldable/Fold.hs Outdated Show resolved Hide resolved
Copy link
Contributor

@chshersh chshersh left a comment

Choose a reason for hiding this comment

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

Thanks!

josephcsible and others added 2 commits September 21, 2019 12:28
This is how `fmapDefault` and `foldMapDefault` look in base,
and is useful for the same reasons.
Co-Authored-By: Dmitrii Kovanikov <kovanikov@gmail.com>
@vrom911 vrom911 merged commit 97211f9 into kowainik:master Sep 21, 2019
@josephcsible josephcsible deleted the coercefoldmap branch September 21, 2019 21:20
@josephcsible
Copy link
Contributor Author

Note to self: If we ever have ala from Lens, or "via applications" from ghc-proposals/ghc-proposals#218, use those to make these even simpler.

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

Successfully merging this pull request may close these issues.

None yet

3 participants