Skip to content

Commit e197ab3

Browse files
author
Luka Jacobowitz
committed
Move newtype to its own file
1 parent bba1a5d commit e197ab3

File tree

3 files changed

+9
-6
lines changed

3 files changed

+9
-6
lines changed
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
package cats
2+
package data
3+
4+
trait Newtype { self =>
5+
private[data] type Base
6+
private[data] trait Tag extends Any
7+
private[cats] type Type[A] <: Base with Tag
8+
}

core/src/main/scala/cats/data/Newtype2.scala

Whitespace-only changes.

core/src/main/scala/cats/data/NonEmptySet.scala

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -23,11 +23,6 @@ import cats.{Always, Eq, Eval, Foldable, Later, Now, Reducible, SemigroupK, Show
2323

2424
import scala.collection.immutable._
2525

26-
trait Newtype { self =>
27-
private[data] type Base
28-
private[data] trait Tag extends Any
29-
private[cats] type Type[A] <: Base with Tag
30-
}
3126

3227
private[data] object NonEmptySetImpl extends NonEmptySetInstances with Newtype {
3328

@@ -56,7 +51,7 @@ private[data] object NonEmptySetImpl extends NonEmptySetInstances with Newtype {
5651
}
5752

5853

59-
private[data] sealed class NonEmptySetOps[A](val value: NonEmptySetImpl.Type[A]) {
54+
sealed class NonEmptySetOps[A](val value: NonEmptySet[A]) {
6055

6156
private implicit val ordering: Ordering[A] = toSortedSet.ordering
6257
private implicit val order: Order[A] = Order.fromOrdering

0 commit comments

Comments
 (0)