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

feat: instances for literal and union types #63

Merged
merged 5 commits into from
Jan 25, 2025
Merged

Conversation

MartinHH
Copy link
Owner

  • Arbitrary instances for literal types
  • Arbitrary, Shrink and Cogen instances for union types

- Arbitrary instances for literal types
- Arbitrary, Shrink and Cogen instances for union types
import scala.quoted.*

// macros for union based on this StackOverflow answer by Dmytro Mitin:
// https://stackoverflow.com/a/78567397/6152669
Copy link
Owner Author

Choose a reason for hiding this comment

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

TODO: figure out how to properly attribute this.

According to official SO rules, this would need to be licensed under CC BY-SA 4.0 which probably not be a big problem as this will be used for testing only (and rather not redistributed), but will make the use of this library less pleasent than if it were licensed under something more inviting (like Apache 2.0).

I probably should try to bother Dmytro Mitin to get him to agree to something more reasonable than offical SO licensing.

Copy link
Owner Author

Choose a reason for hiding this comment

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

So I now learned: according to the FSF, code snipetts of less than 15 lines are not legally significant + looking how I took the idea from SO and applied it to similar, but not identical code, I'd argue that this only took the soultion idea and did not copy any creative work.

Anyway, if you ever read this, Dmytro: I'm open for any suggestions how else to attribute you, I just did not want to bother you with this.

@MartinHH MartinHH merged commit a0668fc into main Jan 25, 2025
4 checks passed
@MartinHH MartinHH deleted the feat/extras_sbt branch January 25, 2025 14:34
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.

1 participant