Skip to content

Commit 4ca27a1

Browse files
authored
Merge pull request #4767 from satorg/fix-typos
Fixes some typos spotted in method names and docs
2 parents 19fa347 + d85324a commit 4ca27a1

File tree

3 files changed

+13
-5
lines changed

3 files changed

+13
-5
lines changed

docs/faq.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -259,7 +259,7 @@ For example, `Set` can violate the "covariant composition" law of `Functor`, whi
259259
fa.map(f).map(g) <-> fa.map(f.andThen(g))
260260
```
261261

262-
Since `Set` in internally based on universal hashing and equality, it violates this law when used with a data type that
262+
Since `Set` is internally based on universal hashing and equality, it violates this law when used with a data type that
263263
overrides `equals` and `hashCode` in a such a way that its instances may appear equal but de-facto contain different
264264
values. One example of this type is `scala.concurrent.duration.Duration`:
265265

laws/src/main/scala/cats/laws/NonEmptyAlternativeLaws.scala

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,11 +34,19 @@ trait NonEmptyAlternativeLaws[F[_]] extends ApplicativeLaws[F] with SemigroupKLa
3434
def nonEmptyAlternativeRightDistributivity[A, B](fa: F[A], ff: F[A => B], fg: F[A => B]): IsEq[F[B]] =
3535
((ff |+| fg).ap(fa)) <-> ((ff.ap(fa)) |+| (fg.ap(fa)))
3636

37-
def nonEmptyAlternativePrependKConsitentWithPureAndCombineK[A](fa: F[A], a: A): IsEq[F[A]] =
37+
def nonEmptyAlternativePrependKConsistentWithPureAndCombineK[A](fa: F[A], a: A): IsEq[F[A]] =
3838
fa.prependK(a) <-> (a.pure[F] <+> fa)
3939

40-
def nonEmptyAlternativeAppendKConsitentWithPureAndCombineK[A](fa: F[A], a: A): IsEq[F[A]] =
40+
def nonEmptyAlternativeAppendKConsistentWithPureAndCombineK[A](fa: F[A], a: A): IsEq[F[A]] =
4141
fa.appendK(a) <-> (fa <+> a.pure[F])
42+
43+
@deprecated("typo in the name, use nonEmptyAlternativePrependKConsistentWithPureAndCombineK instead", "2.14.0")
44+
private[laws] def nonEmptyAlternativePrependKConsitentWithPureAndCombineK[A](fa: F[A], a: A): IsEq[F[A]] =
45+
nonEmptyAlternativePrependKConsistentWithPureAndCombineK(fa, a)
46+
47+
@deprecated("typo in the name, use nonEmptyAlternativeAppendKConsistentWithPureAndCombineK instead", "2.14.0")
48+
private[laws] def nonEmptyAlternativeAppendKConsitentWithPureAndCombineK[A](fa: F[A], a: A): IsEq[F[A]] =
49+
nonEmptyAlternativeAppendKConsistentWithPureAndCombineK(fa, a)
4250
}
4351

4452
object NonEmptyAlternativeLaws {

laws/src/main/scala/cats/laws/discipline/NonEmptyAlternativeTests.scala

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,9 +53,9 @@ trait NonEmptyAlternativeTests[F[_]] extends ApplicativeTests[F] with SemigroupK
5353
"left distributivity" -> forAll(laws.nonEmptyAlternativeLeftDistributivity[A, B] _),
5454
"right distributivity" -> forAll(laws.nonEmptyAlternativeRightDistributivity[A, B] _),
5555
"prependK consistent with pure and combineK" ->
56-
forAll(laws.nonEmptyAlternativePrependKConsitentWithPureAndCombineK[A] _),
56+
forAll(laws.nonEmptyAlternativePrependKConsistentWithPureAndCombineK[A] _),
5757
"appendK consistent with pure and combineK" ->
58-
forAll(laws.nonEmptyAlternativeAppendKConsitentWithPureAndCombineK[A] _)
58+
forAll(laws.nonEmptyAlternativeAppendKConsistentWithPureAndCombineK[A] _)
5959
)
6060
}
6161
}

0 commit comments

Comments
 (0)