Open meooow25 opened 8 months ago
Hello, could you please review this PR?
Updated Map
's lookupMin
and lookupMax
as discussed. Sharing the core below.
Updated again to put a bang on k
, as recommended in GHC#24340.
Though it looks like k
is evaluated every time in core (case k1_somV of k2_X0 { __DEFAULT ->...
in https://github.com/haskell/containers/pull/976#discussion_r1451918255), the core does not tell the full story. This is out of my depth but, as explained in the GHC issue above, code generation down the line gets rid of this eval.
@treeowl does this look good?
I'd like to take one more look at it after I finish waking up and mixing dough.
@treeowl?
@treeowl, reminder to review.
Rebased.
I wanted to use
IntSet.lookupMin
today and realized it's not defined.lookupMin
andlookupMax
already exist for Set, Map, and IntMap.Edit: Also