joelwilliamson / bimap

Bidirectional mapping between two key types
BSD 3-Clause "New" or "Revised" License
22 stars 8 forks source link

Strict variant of Bimap #19

Open LaurentRDC opened 5 months ago

LaurentRDC commented 5 months ago

Hello,

This PR adds a new module, Data.Bimap.Strict, which uses strict Maps under the hood. Using a strict version of 'Bimap' has resolved space leaks in commercial applications.

Note that while the original 'Bimap' implementation uses strictness annotations, the internal Maps are only evaluated to weak-head normal form, which may not be strict enough.

I have also taken the liberty of incrementing the version to 0.6

LaurentRDC commented 5 months ago

You might want to take a look at #20 before this PR