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

Improve documentation grammar and usage. #1088

Merged

Conversation

jonathanknowles
Copy link
Contributor

@jonathanknowles jonathanknowles commented Jan 6, 2025

This PR makes a few small grammar fixes within documentation and comments.

In particular, it:

  • replaces some instances of the word "lookup" with "look up" when used as a verb;
  • inserts the word "the" in places where it is obviously missing;
  • changes some instances of "the function" to "this function".

"To look up (a thing)" is a phrasal verb, whereas the single word
"lookup" (written without spaces) is generally used as a noun (for
example: "in order to avoid an expensive lookup") and occasionally
as an adjective (for example: "a lookup table").

Some parts of the documentation already use "look up" in a verbal
context.

For example, `Data.Map.Internal.hs:1295` models correct usage:

```hs
-- Look up a key and return a result indicating whether it was found
-- and what path was taken.
lookupTrace :: Ord k => k -> Map k a -> TraceResult a
```

This commit adjusts the rest of the documentation (and comments) to
match this usage (when "look up" is used as a verb). When "lookup"
is used as a noun or an adjective, we leave it alone.

This usage of phrasal verbs is similar to:

- "pick up"  (verb) vs "pickup"  (noun)
- "sit up"   (verb) vs "situp"   (noun)
- "log in"   (verb) vs "login"   (noun)
- "start up" (verb) vs "startup" (noun)
- "set up"   (verb) vs "setup"   (noun)
This commit also replaces "the" with "this" for consistency with
documentation for other functions.
@meooow25 meooow25 merged commit 9cc03be into haskell:master Jan 11, 2025
13 checks passed
@meooow25
Copy link
Contributor

Thanks!

@jonathanknowles
Copy link
Contributor Author

Thanks!

@meooow25 You're welcome!

@jonathanknowles jonathanknowles deleted the jonathanknowles/doc-grammar-fixes branch January 12, 2025 05:26
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

Successfully merging this pull request may close these issues.

2 participants