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

Block with a custom comparison function #4774

Closed
vicuna opened this issue Apr 21, 2009 · 2 comments
Closed

Block with a custom comparison function #4774

vicuna opened this issue Apr 21, 2009 · 2 comments

Comments

@vicuna
Copy link

vicuna commented Apr 21, 2009

Original bug ID: 4774
Reporter: @diml
Assigned to: @diml
Status: resolved (set by @diml on 2016-12-07T17:23:42Z)
Resolution: suspended
Priority: normal
Severity: feature
Version: 3.11.0
Category: ~DO NOT USE (was: OCaml general)
Tags: patch
Monitored by: @gasche @ygrek @glondu @hcarty

Bug description

The following patch add a new special tag (user_tag = 245) for blocks containing a value with a custom comparison function. This allow the user to create values with a specific comparison function, which is often really useful.

I also attached a module Custom_value, for the creation of such value.

The second patch (poly-set-map.diff) add an implementation of polymorphic set and map using this technique.

File attachments

@vicuna
Copy link
Author

vicuna commented Apr 27, 2009

Comment author: @diml

I added a better version of the two patches. In particular for polymorphic sets and maps, the code is shared between the functorized version and the defunctorized version.

@vicuna
Copy link
Author

vicuna commented Dec 7, 2016

Comment author: @diml

I'm no longer interested in this. ppx_compare is a cleaner alternative to polymorphic comparison. I will let someone else resubmit a patch on github if they are still interested

@vicuna vicuna closed this as completed Dec 7, 2016
@vicuna vicuna assigned ghost Mar 14, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant