softwaremill / magnolia

Easy, fast, transparent generic derivation of typeclass instances
https://softwaremill.com/open-source/
Apache License 2.0
754 stars 116 forks source link

Add more typeclass examples and test cases. #439

Open micsza opened 1 year ago

micsza commented 1 year ago

There is quite a lot of type-class (aka TC) examples and their derivations in tests but how about adding few more? This could be a good warm-up for new-coming contributors as well as it could provide the users more documentary examples of how to use magnolia api to create their own derivations.

Walk-through for newcommers:

  1. Choose your base branch (scala2 vs scala3).
  2. Browse through the existing TC examples, their derivations and test cases.
  3. Invent your own fancy TC and write its derivation.
  4. Add test cases using your TC.
  5. Optionally, repeat for the other branch.

TCs improving the existing api usage documentation and tests for non-covered cases would be appreciated.