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

Add more typeclass instances for NonEmptyText and NullableNonEmptyText #21

Merged
merged 6 commits into from
Oct 31, 2024

Conversation

curranosaurus
Copy link
Contributor

In this PR, I added some typeclass instances for NonEmptyText and NullableNonEmptyText. These come from three sources.

  1. I standardized the existing typeclass coverage between the two types.
  2. I added some typeclasses instances that come from Text
  3. I added a Hashable instance to both classes because that seems generally useful.

Adding NFData (category 2) required adding a dependency on deepseq.
Adding Hashable required adding a dependency on hashable.

If we prefer to keep this library low-dependency, I'm happy to remove those two instances. The instance I actually need for my work is Ord (NullableNonEmptyText n).

@curranosaurus
Copy link
Contributor Author

CI is failing, but the error appears unrelated to my PR.

@MaxGabriel
Copy link

If we prefer to keep this library low-dependency, I'm happy to remove those two instances. The instance I actually need for my work is Ord (NullableNonEmptyText n).

deepseq is a dependency of text, and hashable is a dependency of aeson. This library depends on text and aeson so seems fine to me!

@curranosaurus
Copy link
Contributor Author

If we prefer to keep this library low-dependency, I'm happy to remove those two instances. The instance I actually need for my work is Ord (NullableNonEmptyText n).

deepseq is a dependency of text, and hashable is a dependency of aeson. This library depends on text and aeson so seems fine to me!

Good point, I didn't think about it that way.

@curranosaurus curranosaurus merged commit dc33925 into main Oct 31, 2024
0 of 6 checks passed
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.

3 participants