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

Ord instance for InternedText #11

Open
taktoa opened this issue Jun 28, 2017 · 0 comments
Open

Ord instance for InternedText #11

taktoa opened this issue Jun 28, 2017 · 0 comments

Comments

@taktoa
Copy link

taktoa commented Jun 28, 2017

The Ord instance for InternedText compares identifiers rather than the underlying text. Presumably this is for efficiency, and is an entirely reasonable choice. However, I definitely think this behavior should be documented, since it is not obvious that a textual datatype will have anything other than the usual lexicographic sort order. People using InternedText are, in general, going to treat it as a drop-in hash-consed replacement for Text, unless there is documentation to the contrary.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant