All Projects → 7mind → no-more-orphans

7mind / no-more-orphans

Licence: MIT license
Companion repository for 'No More Orphans'

Programming Languages

scala
5932 projects

Projects that are alternatives of or similar to no-more-orphans

scalaz-deriving
Principled, fast, typeclass derivation.
Stars: ✭ 52 (+333.33%)
Mutual labels:  typeclasses
ninny-json
JSON typeclasses that know the difference between null and absent fields
Stars: ✭ 19 (+58.33%)
Mutual labels:  typeclasses
lectures
Learn Functional Programming in Scala
Stars: ✭ 114 (+850%)
Mutual labels:  typeclasses
AUXify
Introduces macro/meta annotations @ aux, @ self, @ instance, @ apply, @ delegated, @ syntax and String-based type class LabelledGeneric
Stars: ✭ 25 (+108.33%)
Mutual labels:  typeclasses
typeclass-interface-pattern
Ideas, thoughts, and notes on a typeclass/interface based polymorphism pattern for standard C
Stars: ✭ 26 (+116.67%)
Mutual labels:  typeclasses
scalanum
No description or website provided.
Stars: ✭ 12 (+0%)
Mutual labels:  typeclasses
Arrow
Λrrow - Functional companion to Kotlin's Standard Library
Stars: ✭ 4,771 (+39658.33%)
Mutual labels:  typeclasses
classes
Smart, pythonic, ad-hoc, typed polymorphism for Python
Stars: ✭ 461 (+3741.67%)
Mutual labels:  typeclasses
play2scalaz
Scalaz typeclasses <~> Playframework2 typeclasses
Stars: ✭ 14 (+16.67%)
Mutual labels:  typeclasses
concise-cheat-sheets
Cheat Sheets for programming languages and tools
Stars: ✭ 98 (+716.67%)
Mutual labels:  typeclasses
pulp
Scala library for guiceless dependency injection
Stars: ✭ 26 (+116.67%)
Mutual labels:  implicits

No More Orphans

This is a sample project that defines a couple optional typeclass instances using No More Orphans trick. More details are in the accompanying blog post.

Use SBT to run the test suite:

git clone https://github.com/7mind/no-more-orphans.git
cd no-more-orphans
sbt test

Tested on Scala 2.12.12, 2.13.3, 2.11.12 (2.11 only works partially) and dotty

Addendum: the pattern may not work for non-higher-kinded types on Scala 2 (i.e. plain types like Int, not type constructors like List[_] or typeclasses like Monad[_[_]]).

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].