Skip to content

Commit

Permalink
Restore bincompat
Browse files Browse the repository at this point in the history
  • Loading branch information
armanbilge authored and NthPortal committed Sep 4, 2023
1 parent d80d959 commit e948a1d
Showing 1 changed file with 40 additions and 0 deletions.
40 changes: 40 additions & 0 deletions core/src/main/scala-2.13+/cats/data/NonEmptyLazyList.scala
Original file line number Diff line number Diff line change
Expand Up @@ -65,9 +65,17 @@ object NonEmptyLazyList extends NonEmptyLazyListInstances {
def fromLazyListPrepend[A](a: => A, ll: => LazyList[A]): NonEmptyLazyList[A] =
create(a #:: ll)

@deprecated("Use overload with by-name args", "2.11.0")
def fromLazyListPrepend[A]()(a: A, ll: LazyList[A]): NonEmptyLazyList[A] =
fromLazyListPrepend(a, ll)

def fromLazyListAppend[A](ll: => LazyList[A], a: => A): NonEmptyLazyList[A] =
create(ll #::: a #:: LazyList.empty)

@deprecated("Use overload with by-name args", "2.11.0")
def fromLazyListAppend[A]()(ll: LazyList[A], a: A): NonEmptyLazyList[A] =
fromLazyListAppend(ll, a)

def apply[A](a: => A, as: A*): NonEmptyLazyList[A] =
create(a #:: LazyList.from(as))

Expand Down Expand Up @@ -168,6 +176,10 @@ class NonEmptyLazyListOps[A](private val value: NonEmptyLazyList[A])
final def concat[AA >: A](ll: => LazyList[AA]): NonEmptyLazyList[AA] =
appendLazyList(ll)

@deprecated("Use overload with by-name args", "2.11.0")
final private[data] def concat[AA >: A]()(ll: LazyList[AA]): NonEmptyLazyList[AA] =
concat(ll)

/**
* Alias for `concat`
*/
Expand All @@ -180,24 +192,40 @@ class NonEmptyLazyListOps[A](private val value: NonEmptyLazyList[A])
final def concatNell[AA >: A](nell: => NonEmptyLazyList[AA]): NonEmptyLazyList[AA] =
appendNell(nell)

@deprecated("Use overload with by-name args", "2.11.0")
final private[data] def concatNell[AA >: A]()(nell: NonEmptyLazyList[AA]): NonEmptyLazyList[AA] =
concatNell(nell)

/**
* Alias for `concatNell`
*/
final def ++[AA >: A](nell: => NonEmptyLazyList[AA])(implicit d: DummyImplicit): NonEmptyLazyList[AA] =
concatNell(nell)

@deprecated("Use overload with by-name args", "2.11.0")
final private[data] def ++[AA >: A]()(ll: NonEmptyLazyList[AA]): NonEmptyLazyList[AA] =
++(ll)

/**
* Appends the given LazyList
*/
final def appendLazyList[AA >: A](ll: => LazyList[AA]): NonEmptyLazyList[AA] =
create(toLazyList #::: ll)

@deprecated("Use overload with by-name args", "2.11.0")
final private[data] def appendLazyList[AA >: A]()(ll: LazyList[AA]): NonEmptyLazyList[AA] =
appendLazyList(ll)

/**
* Alias for `appendLazyList`
*/
final def :++[AA >: A](ll: => LazyList[AA]): NonEmptyLazyList[AA] =
appendLazyList(ll)

@deprecated("Use overload with by-name args", "2.11.0")
final private[data] def :++[AA >: A]()(ll: LazyList[AA]): NonEmptyLazyList[AA] =
appendLazyList(ll)

/**
* Prepends the given NonEmptyLazyList
*/
Expand All @@ -210,12 +238,20 @@ class NonEmptyLazyListOps[A](private val value: NonEmptyLazyList[A])
final def :++[AA >: A](nell: => NonEmptyLazyList[AA])(implicit d: DummyImplicit): NonEmptyLazyList[AA] =
appendNell(nell)

@deprecated("Use overload with by-name args", "2.11.0")
final private[data] def ++:[AA >: A]()(ll: NonEmptyLazyList[AA]): NonEmptyLazyList[AA] =
++:(ll)

/**
* Prepends the given LazyList
*/
final def prependLazyList[AA >: A](ll: => LazyList[AA]): NonEmptyLazyList[AA] =
create(ll #::: toLazyList)

@deprecated("Use overload with by-name args", "2.11.0")
final private[data] def prependLazyList[AA >: A]()(ll: LazyList[AA]): NonEmptyLazyList[AA] =
prependLazyList(ll)

/**
* Alias for `prependLazyList`
*/
Expand All @@ -228,6 +264,10 @@ class NonEmptyLazyListOps[A](private val value: NonEmptyLazyList[A])
final def prependNell[AA >: A](nell: => NonEmptyLazyList[AA]): NonEmptyLazyList[AA] =
create(nell.toLazyList #::: toLazyList)

@deprecated("Use overload with by-name args", "2.11.0")
final private[data] def prependNell[AA >: A]()(nell: NonEmptyLazyList[AA]): NonEmptyLazyList[AA] =
prependNell(nell)

/**
* Alias for `prependNell`
*/
Expand Down

0 comments on commit e948a1d

Please sign in to comment.