-
Notifications
You must be signed in to change notification settings - Fork 11
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
Ord instance appears to be broken #15
Comments
I Just spotted this too, this is because: instance Ord ULID where
compare (ULID ts1 _) (ULID ts2 _) = compare ts1 ts2 This means the random component is ignored and breaks lexicographic ordering. I don't see any reason that the |
I know it seems weird, but I'd argue that this is the correct behavior: Can you give an example for code that should work, but doesn't because of this behavior? |
My use case that is broken involves putting This is an issue with any data type where the definitions of
The way the ordering is currently implemented in this library is currently not lexicographic and is a partial order rather than the total order implied by the |
The text was updated successfully, but these errors were encountered: