You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
// [error] Symbol 'type cats.Semigroupal' is missing from the classpath.
282
282
// [error] This symbol is required by 'type mylib.CatsSemigroupalSemigroupKInvariant.ImpllSemigroupalSemigroupKInvariant'.
@@ -349,7 +349,7 @@ Extracting a pattern
349
349
It may be tedious to create a new class for each foreign type we want to declare optional instances for, we can extract
350
350
the pattern into reusable pieces and get rid of `asInstanceOf` calls in the process by carefully crafting equality evidence.
351
351
You may find one possible [implementation](https://github.com/7mind/no-more-orphans/blob/master/mylib/src/main/scala/mylib/pattern/GetTc.scala)
352
-
of this pattern in the [companion repository](https://github.com/7mind/no-more-orphans) for this blog post. The repository
352
+
of this pattern in the [companion repository](https://github.com/7mind/no-more-orphans) for this blog post. (ADDENDUM: "generalized" version of the pattern in GetTc.scala does not work as reliably as the raw pattern documented above and is not portable to Scala 3. The current best reference for this pattern is as it's currently used in izumi project: [OrphanDefs.scala](https://github.com/7mind/izumi/blob/9d3eedfcbaf29bdad4565d0745f746ab7b816be9/fundamentals/fundamentals-orphans/src/main/scala/izumi/fundamentals/orphans/OrphanDefs.scala)) The repository
353
353
also hosts the final versions of [`MyBox`](https://github.com/7mind/no-more-orphans/blob/master/mylib/src/main/scala/mylib/MyBox.scala)
354
354
and [`MyMonad`](https://github.com/7mind/no-more-orphans/blob/master/mylib/src/main/scala/mylib/MyMonad.scala) and a test suite showcasing correct implementation of the pattern.
0 commit comments