Skip to content

Commit e948a1d

Browse files
armanbilgeNthPortal
authored andcommitted
Restore bincompat
1 parent d80d959 commit e948a1d

File tree

1 file changed

+40
-0
lines changed

1 file changed

+40
-0
lines changed

core/src/main/scala-2.13+/cats/data/NonEmptyLazyList.scala

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,9 +65,17 @@ object NonEmptyLazyList extends NonEmptyLazyListInstances {
6565
def fromLazyListPrepend[A](a: => A, ll: => LazyList[A]): NonEmptyLazyList[A] =
6666
create(a #:: ll)
6767

68+
@deprecated("Use overload with by-name args", "2.11.0")
69+
def fromLazyListPrepend[A]()(a: A, ll: LazyList[A]): NonEmptyLazyList[A] =
70+
fromLazyListPrepend(a, ll)
71+
6872
def fromLazyListAppend[A](ll: => LazyList[A], a: => A): NonEmptyLazyList[A] =
6973
create(ll #::: a #:: LazyList.empty)
7074

75+
@deprecated("Use overload with by-name args", "2.11.0")
76+
def fromLazyListAppend[A]()(ll: LazyList[A], a: A): NonEmptyLazyList[A] =
77+
fromLazyListAppend(ll, a)
78+
7179
def apply[A](a: => A, as: A*): NonEmptyLazyList[A] =
7280
create(a #:: LazyList.from(as))
7381

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

179+
@deprecated("Use overload with by-name args", "2.11.0")
180+
final private[data] def concat[AA >: A]()(ll: LazyList[AA]): NonEmptyLazyList[AA] =
181+
concat(ll)
182+
171183
/**
172184
* Alias for `concat`
173185
*/
@@ -180,24 +192,40 @@ class NonEmptyLazyListOps[A](private val value: NonEmptyLazyList[A])
180192
final def concatNell[AA >: A](nell: => NonEmptyLazyList[AA]): NonEmptyLazyList[AA] =
181193
appendNell(nell)
182194

195+
@deprecated("Use overload with by-name args", "2.11.0")
196+
final private[data] def concatNell[AA >: A]()(nell: NonEmptyLazyList[AA]): NonEmptyLazyList[AA] =
197+
concatNell(nell)
198+
183199
/**
184200
* Alias for `concatNell`
185201
*/
186202
final def ++[AA >: A](nell: => NonEmptyLazyList[AA])(implicit d: DummyImplicit): NonEmptyLazyList[AA] =
187203
concatNell(nell)
188204

205+
@deprecated("Use overload with by-name args", "2.11.0")
206+
final private[data] def ++[AA >: A]()(ll: NonEmptyLazyList[AA]): NonEmptyLazyList[AA] =
207+
++(ll)
208+
189209
/**
190210
* Appends the given LazyList
191211
*/
192212
final def appendLazyList[AA >: A](ll: => LazyList[AA]): NonEmptyLazyList[AA] =
193213
create(toLazyList #::: ll)
194214

215+
@deprecated("Use overload with by-name args", "2.11.0")
216+
final private[data] def appendLazyList[AA >: A]()(ll: LazyList[AA]): NonEmptyLazyList[AA] =
217+
appendLazyList(ll)
218+
195219
/**
196220
* Alias for `appendLazyList`
197221
*/
198222
final def :++[AA >: A](ll: => LazyList[AA]): NonEmptyLazyList[AA] =
199223
appendLazyList(ll)
200224

225+
@deprecated("Use overload with by-name args", "2.11.0")
226+
final private[data] def :++[AA >: A]()(ll: LazyList[AA]): NonEmptyLazyList[AA] =
227+
appendLazyList(ll)
228+
201229
/**
202230
* Prepends the given NonEmptyLazyList
203231
*/
@@ -210,12 +238,20 @@ class NonEmptyLazyListOps[A](private val value: NonEmptyLazyList[A])
210238
final def :++[AA >: A](nell: => NonEmptyLazyList[AA])(implicit d: DummyImplicit): NonEmptyLazyList[AA] =
211239
appendNell(nell)
212240

241+
@deprecated("Use overload with by-name args", "2.11.0")
242+
final private[data] def ++:[AA >: A]()(ll: NonEmptyLazyList[AA]): NonEmptyLazyList[AA] =
243+
++:(ll)
244+
213245
/**
214246
* Prepends the given LazyList
215247
*/
216248
final def prependLazyList[AA >: A](ll: => LazyList[AA]): NonEmptyLazyList[AA] =
217249
create(ll #::: toLazyList)
218250

251+
@deprecated("Use overload with by-name args", "2.11.0")
252+
final private[data] def prependLazyList[AA >: A]()(ll: LazyList[AA]): NonEmptyLazyList[AA] =
253+
prependLazyList(ll)
254+
219255
/**
220256
* Alias for `prependLazyList`
221257
*/
@@ -228,6 +264,10 @@ class NonEmptyLazyListOps[A](private val value: NonEmptyLazyList[A])
228264
final def prependNell[AA >: A](nell: => NonEmptyLazyList[AA]): NonEmptyLazyList[AA] =
229265
create(nell.toLazyList #::: toLazyList)
230266

267+
@deprecated("Use overload with by-name args", "2.11.0")
268+
final private[data] def prependNell[AA >: A]()(nell: NonEmptyLazyList[AA]): NonEmptyLazyList[AA] =
269+
prependNell(nell)
270+
231271
/**
232272
* Alias for `prependNell`
233273
*/

0 commit comments

Comments
 (0)