diff --git a/core/src/main/scala/cats/data/NonEmptyMapImpl.scala b/core/src/main/scala/cats/data/NonEmptyMapImpl.scala index 052ccc2a51..9b8cebd01a 100644 --- a/core/src/main/scala/cats/data/NonEmptyMapImpl.scala +++ b/core/src/main/scala/cats/data/NonEmptyMapImpl.scala @@ -70,7 +70,7 @@ object NonEmptyMapImpl extends NonEmptyMapInstances with Newtype2 { } -sealed class NonEmptyMapOps[K, A](val value: NonEmptyMap[K, A]) { +sealed class NonEmptyMapOps[K, A](private[data] val value: NonEmptyMap[K, A]) { /** * Converts this map to a `SortedMap`. diff --git a/core/src/main/scala/cats/data/NonEmptySet.scala b/core/src/main/scala/cats/data/NonEmptySet.scala index ad5e5b3dc2..f9b7dd78a4 100644 --- a/core/src/main/scala/cats/data/NonEmptySet.scala +++ b/core/src/main/scala/cats/data/NonEmptySet.scala @@ -62,7 +62,7 @@ object NonEmptySetImpl extends NonEmptySetInstances with Newtype { } @suppressUnusedImportWarningForScalaVersionSpecific -sealed class NonEmptySetOps[A](val value: NonEmptySet[A]) { +sealed class NonEmptySetOps[A](private[data] val value: NonEmptySet[A]) { implicit private val ordering: Ordering[A] = toSortedSet.ordering implicit private val order: Order[A] = Order.fromOrdering