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

Document Key and mention it in the tutorial #985

Open
nh2 opened this issue Jan 7, 2023 · 2 comments
Open

Document Key and mention it in the tutorial #985

nh2 opened this issue Jan 7, 2023 · 2 comments

Comments

@nh2
Copy link
Member

nh2 commented Jan 7, 2023

In https://hackage.haskell.org/package/aeson-2.1.1.0/docs/Data-Aeson-Key.html#t:Key there are no haddocks, and the "How to use this library" section has not a single example that shows non-literal keys being used (coming e.g. from Text).

It would be great if:

  • Haddocks were added to Key that motivate its existence, so that e.g. hovering it from an IDE gives tips on how to obtain that type
  • an example of keys being converted from Text, so that beginners or upgraders from pre-2.0 have an esier time
@nh2
Copy link
Member Author

nh2 commented Jan 9, 2023

A bit more detail:

If you read the docs of (.:) and click on Key in the type signature, the page jumps to a re-export of Key in the same module where Key is an opaque type without any information on how to make one.

@phadej
Copy link
Collaborator

phadej commented Jan 9, 2023

the page jumps to

That's unfortunate. I wonder what happens if we change the haddock link to 'Data.Aeson.Key.Key', so it would jump to correct module?

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

2 participants