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

Proposal: Remove HFunctor's fmap' with GHCs supporting QuantifiedConstraints. #153

Closed
wants to merge 1 commit into from

Commits on Apr 12, 2019

  1. Remove HFunctor's fmap' with GHCs supporting QuantifiedConstraints.

    As was mentioned in the `HFunctor` documentation, we can eliminate the
    vestigial `fmap'` method with QuantifiedConstraints. This implementation
    is provided by Bottu et al.'s _Quantified Class Constraints_.
    
    The advantage of this patch is that it expresses the nature of
    `HFunctor` in a more direct manner, rather than with the
    dummy-function workaround. The disadvantage is that only GHC 8.6
    supports QuantifiedConstraints, so we have to use CPP to define the
    polyfill (as it were) to handle it.
    
    This changes the `HFunctor` interface but should maintain
    compatibility, as `fmap'` was never implemented by hand outside of `Sum`.
    patrickt committed Apr 12, 2019
    Configuration menu
    Copy the full SHA
    407bb56 View commit details
    Browse the repository at this point in the history