Any plan to support comparator? #5

Closed
ninegua opened this Issue Mar 18, 2012 · 2 comments

Comments

Projects
None yet
2 participants
@ninegua

ninegua commented Mar 18, 2012

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?

@kim

This comment has been minimized.

Show comment Hide comment
@kim

kim Mar 18, 2012

Owner

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?

Owner

kim commented Mar 18, 2012

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?

@ninegua

This comment has been minimized.

Show comment Hide comment
@ninegua

ninegua Mar 18, 2012

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.

ninegua commented Mar 18, 2012

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 in ce9b6ba Apr 21, 2012

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment