Skip to content


Subversion checkout URL

You can clone with
Download ZIP


Any plan to support comparator? #5

ninegua opened this Issue · 2 comments

2 participants


I've only took a brief look, and it seems that comparator api is in the low level C interface, but missing from the Haskell API. Do you guys have any plan?


It is planned, but the initial attempts resulted in some issues with regards to memory management and concurrency resulting from the foreign import safe (as opposed to unsafe) which are necessary to allow foreign code to call back into Haskell. I'm not yet sure how to solve this best, but working on a monadic API which would allow to encapsulate the necessary state threading.

May I ask what your concrete use cases for custom comparators are?


To be able to enumerate keys in specific order. But I guess without comparator it just means a more clever way to encode the key.

@kim kim closed this issue from a commit
@kim Re-introduce user-defined comparator
* fixes #5
* Todo:
  * tweak foreign imports, possibly not all of them need to be 'safe'
  * maybe it's time to switch to record syntax for options to reduce clutter
@kim kim closed this in ce9b6ba
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.