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

[Chapter 6] Add a note on optional type class instance names #461

Merged
merged 2 commits into from
Nov 30, 2023

Conversation

Zelenya
Copy link

@Zelenya Zelenya commented Nov 18, 2023

No description provided.

text/chapter6.md Outdated
This code declares a type class instance called `showBoolean` – in PureScript, type class instances can be named to aid the readability of the generated JavaScript. We say that the `Boolean` type _belongs to the `Show` type class_.
This code declares a type class instance; we say that the `Boolean` type _belongs to the `Show` type class_.

> Optionally, we can give names to type class instances to aid the readability of the generated JavaScript. For example:
Copy link
Member

@milesfrain milesfrain Nov 20, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not blocking, but would be informative to include a snippet of the generated JS containing showBoolean. Even better would be to include both versions with and without the custom name.

But if this is too much detail, that explanation could go in the main docs and be linked to from the book.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh yeah, good idea 🙏

@milesfrain milesfrain merged commit 44013c6 into master Nov 30, 2023
2 checks passed
@milesfrain milesfrain deleted the chapter-6/optional-type-class-instance-names branch November 30, 2023 05:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants