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

Unboxing and streamlining Map maps #873

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Commits on Nov 20, 2022

  1. Unboxing and streamlining Map maps

    * Use an unboxed-sum version of `Maybe` to implement `mapMaybeWithKey`.
      This potentially (I suspect usually) allows all the `Maybe`s to be
      erased.
    
    * Comprehensive rewrite rules for both strict and lazy versions of
      `map`, `mapWithKey`, `mapMaybeWithKey`, and `filterWithKey` quickly
      get out of hand. Following `unordered-containers`, tame the mess
      by implementing both lazy and strict mapping functions in terms of
      versions that use unboxed results. Rewrite rules on these underlying
      functions will then apply uniformly. One concern: I found it a bit
      tricky to get the unfoldings I wanted; lots of things had to be marked
      `INLINABLE` explicitly.
    treeowl committed Nov 20, 2022
    Configuration menu
    Copy the full SHA
    f287120 View commit details
    Browse the repository at this point in the history