-
Notifications
You must be signed in to change notification settings - Fork 183
Fix haddocks of Data.IntMap.compose #1143
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
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Mind fixing this in |
The docs say -- | Relate the keys of one map to the values of
-- the other, by using the values of the former as keys for lookups
-- in the latter.
...
compose :: IntMap c -> IntMap Int -> IntMap c which looks correct to me: -- | Relate the keys of one map (IntMap Int) to the values of
-- the other (IntMap c), by using the values of the former (IntMap Int) as keys for lookups
-- in the latter (IntMap c). |
Ah, my bad. You are both correct:
I've force-pushed a new suggestion. Thanks for reading critically! |
Aha! "Relate" as in "map", as opposed to as in "identify". I think this proves the text needs to be rephrased totally. |
I think "relate" can be justified, because a Map (and an IntMap) is, after all, a relation. |
Maybe "link" ? |
Perhaps:
This still uses "relates", but uses it in a way that makes it fairly unambiguous what it means, I think. @Mikolaj? |
Yes, this helps. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, this does seem like an improvement.
The words "former" and "latter" in the documentation of
compose
onIntMap
were swapped. This PR puts them the right way round.