Skip to content

Commit c68d6d0

Browse files
authored
Merge pull request #226 from gvolpe/rename-cats-eq-to-eqv
Rename cats.eq to cats.eqv
2 parents 5a27b4c + b516693 commit c68d6d0

File tree

3 files changed

+8
-8
lines changed

3 files changed

+8
-8
lines changed

README.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ implicit def encoder$macro$1[A, B: Encoder]: Encoder.AsObject[Foo[A, B]] = ...
2929

3030
`Foo` can also be a newtype in form of [estatico](https://github.com/estatico/scala-newtype) or [supertagged](https://github.com/rudogma/scala-supertagged) libraries.
3131

32-
If you have problems with the initialization order you can optionally put the
32+
If you have problems with the initialization order you can optionally put the
3333
`insertInstancesHere()` call to the body of your companion object to specify the place where `implicit val`s should be inserted.
3434

3535

@@ -64,11 +64,11 @@ In this case you should extend `SpecificDerivation` instead, like `object foo ex
6464

6565
## Expression table
6666

67-
| Derivation line | Translation |
67+
| Derivation line | Translation |
6868
|-----------------------------------------------------------|------------------------------------------------------------|
6969
| `@derive(...foo, ...)` | `implicit val foo$macro: Foo[A] = foo.instance` |
70-
| `@derive(...foo(bar))` | `implicit val foo$macro : Foo[A] = foo(bar)` |
71-
| `@derive(...foo.quux(bar))` | `implicit val foo$macro : Foo[A] = foo.quux(bar)` |
70+
| `@derive(...foo(bar))` | `implicit val foo$macro : Foo[A] = foo(bar)` |
71+
| `@derive(...foo.quux(bar))` | `implicit val foo$macro : Foo[A] = foo.quux(bar)` |
7272
| `@derive(...foo, ...)` when `A` is a newtype over `B` | `implicit val foo$macro: Foo[A] = foo.newtype[B].instance` |
7373

7474

@@ -78,7 +78,7 @@ In this case you should extend `SpecificDerivation` instead, like `object foo ex
7878
This works by adding the `@delegating` annotation to your delegator object:
7979
```scala
8080
@delegating("full.qualified.method.path")
81-
```
81+
```
8282
Then call `macro Derevo.delegate`, `macro Derevo.delegateParams`, `macro Derevo.delegateParams2` or `macro Derevo.delegateParams3` in the corresponding methods.
8383
An example can be found [here](https://github.com/tofu-tf/derevo/blob/supertagged/circe/src/main/scala/derevo/circe/circe.scala).
8484

@@ -109,7 +109,7 @@ libraryDependencies += "tf.tofu" %% "derevo-cats" % "latest version in badge"
109109

110110
```scala
111111
import derevo.derive
112-
import derevo.cats.{eq => eqv, show, order, monoid}
112+
import derevo.cats.{eqv, show, order, monoid}
113113

114114
import cats.Monoid
115115
import cats.instances.string._

cats/src/main/scala/derevo/cats/eq.scala renamed to cats/src/main/scala/derevo/cats/eqv.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import magnolia.{CaseClass, Magnolia, SealedTrait}
55
import derevo.Derivation
66
import derevo.NewTypeDerivation
77

8-
object eq extends Derivation[Eq] with NewTypeDerivation[Eq] {
8+
object eqv extends Derivation[Eq] with NewTypeDerivation[Eq] {
99
type Typeclass[T] = Eq[T]
1010

1111
def combine[T](ctx: CaseClass[Eq, T]): Eq[T] = new Eq[T] {

cats/src/test/scala/derevo/cats/EqSpec.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
package derevo.cats
22

33
import cats.Eq
4-
import derevo.cats.{eq => eqv}
4+
import derevo.cats._
55
import derevo.derive
66
import org.scalatest.freespec.AnyFreeSpec
77
import io.estatico.newtype.macros.newtype

0 commit comments

Comments
 (0)