Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Scala3 style imports #4677

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
1 change: 0 additions & 1 deletion .scalafmt.conf
Original file line number Diff line number Diff line change
Expand Up @@ -29,5 +29,4 @@ project.excludeFilters = [
rewrite.scala3.convertToNewSyntax = true
runner.dialectOverride.allowSignificantIndentation = false
runner.dialectOverride.allowAsForImportRename = false
runner.dialectOverride.allowStarWildcardImport = false
runner.dialectOverride.allowPostfixStarVarargSplices = false
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ package instances

import java.math.MathContext

import algebra.ring._
import algebra.ring.*

package object bigDecimal extends BigDecimalInstances

Expand Down
2 changes: 1 addition & 1 deletion algebra-core/src/main/scala/algebra/instances/bigInt.scala
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
package algebra
package instances

import algebra.ring._
import algebra.ring.*

package object bigInt extends BigIntInstances

Expand Down
2 changes: 1 addition & 1 deletion algebra-core/src/main/scala/algebra/instances/bitSet.scala
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ package instances

import scala.collection.immutable.BitSet

import algebra.lattice._
import algebra.lattice.*

package object bitSet extends BitSetInstances

Expand Down
4 changes: 2 additions & 2 deletions algebra-core/src/main/scala/algebra/instances/byte.scala
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@
package algebra
package instances

import algebra.lattice._
import algebra.ring._
import algebra.lattice.*
import algebra.ring.*

package object byte extends ByteInstances

Expand Down
4 changes: 2 additions & 2 deletions algebra-core/src/main/scala/algebra/instances/int.scala
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@
package algebra
package instances

import algebra.lattice._
import algebra.ring._
import algebra.lattice.*
import algebra.ring.*

package object int extends IntInstances

Expand Down
4 changes: 2 additions & 2 deletions algebra-core/src/main/scala/algebra/instances/long.scala
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@
package algebra
package instances

import algebra.lattice._
import algebra.ring._
import algebra.lattice.*
import algebra.ring.*

package object long extends LongInstances

Expand Down
2 changes: 1 addition & 1 deletion algebra-core/src/main/scala/algebra/instances/map.scala
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ package instances
import scala.annotation.nowarn
import scala.collection.mutable

import algebra.ring._
import algebra.ring.*

package object map extends MapInstances

Expand Down
4 changes: 2 additions & 2 deletions algebra-core/src/main/scala/algebra/instances/short.scala
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@
package algebra
package instances

import algebra.lattice._
import algebra.ring._
import algebra.lattice.*
import algebra.ring.*

package object short extends ShortInstances

Expand Down
4 changes: 2 additions & 2 deletions algebra-core/src/test/scala/algebra/ring/RingTest.scala
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,9 @@

package algebra.ring

import algebra.instances.bigInt._
import algebra.instances.bigInt.*

import org.scalacheck.Prop._
import org.scalacheck.Prop.*

class RingTest extends munit.DisciplineSuite {
test("Ring.defaultFromBigInt") {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@

package algebra.laws

import cats.kernel._
import cats.kernel.*

import org.typelevel.discipline.Laws

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,10 @@

package algebra.laws

import algebra._
import algebra.lattice._
import algebra.*
import algebra.lattice.*
import org.scalacheck.{Arbitrary, Prop}
import org.scalacheck.Prop._
import org.scalacheck.Prop.*
import org.typelevel.discipline.Laws

@deprecated("Laws moved to LogicLaws", since = "2.7.0")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,13 +21,13 @@

package algebra.laws

import cats.kernel._
import cats.kernel.instances.option._
import cats.kernel.*
import cats.kernel.instances.option.*

import org.typelevel.discipline.Laws

import org.scalacheck.{Arbitrary, Prop}
import org.scalacheck.Prop._
import org.scalacheck.Prop.*

@deprecated("Provided by cats.kernel.laws", since = "2.7.0")
object GroupLaws {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,11 @@

package algebra.laws

import algebra._
import algebra.lattice._
import algebra.*
import algebra.lattice.*

import org.scalacheck.{Arbitrary, Prop}
import org.scalacheck.Prop._
import org.scalacheck.Prop.*
import scala.annotation.nowarn

object LatticeLaws {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,15 +21,15 @@

package algebra.laws

import algebra._
import algebra.lattice._
import algebra.*
import algebra.lattice.*

import org.typelevel.discipline.Laws

import org.scalacheck.{Arbitrary, Prop}
import org.scalacheck.Prop._
import org.scalacheck.Prop.*

import algebra.instances.boolean._
import algebra.instances.boolean.*

object LatticePartialOrderLaws {
def apply[A: Eq: Arbitrary] = new LatticePartialOrderLaws[A] {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,11 @@

package algebra.laws

import algebra._
import algebra.*
import algebra.lattice.{Bool, GenBool, Heyting}

import org.scalacheck.{Arbitrary, Prop}
import org.scalacheck.Prop._
import org.scalacheck.Prop.*
import scala.annotation.nowarn

object LogicLaws {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,14 +21,14 @@

package algebra.laws

import cats.kernel._
import cats.kernel.*

import org.typelevel.discipline.Laws

import org.scalacheck.{Arbitrary, Cogen, Prop}
import org.scalacheck.Prop._
import org.scalacheck.Prop.*

import cats.kernel.instances.all._
import cats.kernel.instances.all.*
import algebra.ring.Signed
import algebra.ring.CommutativeRing
import algebra.ring.TruncatedDivision
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,15 +22,15 @@
package algebra
package laws

import algebra.ring._
import algebra.ring.*

import algebra.laws.platform.Platform

import org.typelevel.discipline.Predicate

import org.scalacheck.{Arbitrary, Prop}
import org.scalacheck.Arbitrary._
import org.scalacheck.Prop._
import org.scalacheck.Arbitrary.*
import org.scalacheck.Prop.*
import scala.annotation.nowarn

object RingLaws {
Expand Down
6 changes: 3 additions & 3 deletions algebra-laws/shared/src/main/scala/algebra/laws/Rules.scala
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,10 @@

package algebra.laws

import cats.kernel._
import org.scalacheck.Prop._
import cats.kernel.*
import org.scalacheck.Prop.*
import org.scalacheck.{Arbitrary, Prop}
import cats.kernel.instances.boolean._
import cats.kernel.instances.boolean.*
import cats.kernel.laws.discipline.SerializableTests

object Rules {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@

package algebra

import org.scalacheck._
import org.scalacheck.*
import org.scalacheck.util.Pretty
import Prop.{False, Proof, Result}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@ import java.math.MathContext

import org.scalacheck.Arbitrary

import algebra._
import algebra.ring._
import algebra.*
import algebra.ring.*

/**
* A wrapper type for approximate floating point values like Float, Double, and
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,9 @@
package algebra
package laws

import algebra.lattice._
import algebra.ring._
import algebra.instances.all._
import algebra.lattice.*
import algebra.ring.*
import algebra.instances.all.*
import algebra.instances.BigDecimalAlgebra

import algebra.laws.platform.Platform
Expand Down
2 changes: 1 addition & 1 deletion algebra-laws/shared/src/test/scala/algebra/laws/Rat.scala
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ package algebra
package laws

import algebra.lattice.DistributiveLattice
import algebra.ring._
import algebra.ring.*
import org.scalacheck.{Arbitrary, Gen}
import org.scalacheck.Arbitrary.arbitrary

Expand Down
2 changes: 1 addition & 1 deletion alleycats-core/src/main/scala/alleycats/Empty.scala
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
package alleycats

import cats.{Eq, Monoid}
import cats.syntax.eq._
import cats.syntax.eq.*

trait Empty[A] extends Serializable {
def empty: A
Expand Down
2 changes: 1 addition & 1 deletion alleycats-core/src/main/scala/alleycats/One.scala
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
package alleycats

import cats.Eq
import cats.syntax.eq._
import cats.syntax.eq.*

trait One[A] extends Serializable {
def one: A
Expand Down
2 changes: 1 addition & 1 deletion alleycats-core/src/main/scala/alleycats/Zero.scala
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
package alleycats

import cats.Eq
import cats.syntax.eq._
import cats.syntax.eq.*

trait Zero[A] extends Serializable {
def zero: A
Expand Down
2 changes: 1 addition & 1 deletion alleycats-core/src/main/scala/alleycats/std/map.scala
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
package alleycats
package std

import cats._
import cats.*
import cats.data.Chain
import cats.kernel.instances.StaticMethods.wrapMutableIndexedSeq

Expand Down
2 changes: 1 addition & 1 deletion alleycats-core/src/main/scala/alleycats/std/set.scala
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
package alleycats
package std

import alleycats.compat.scalaVersionSpecific._
import alleycats.compat.scalaVersionSpecific.*
import cats.{Alternative, Always, Applicative, Eval, Foldable, Monad, Monoid, Traverse, TraverseFilter}

import scala.annotation.tailrec
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ package alleycats
package syntax

import cats.Foldable
import cats.syntax.foldable._
import cats.syntax.foldable.*

object foldable extends FoldableSyntax

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,11 @@

package alleycats.laws.discipline

import cats._
import cats.*
import cats.laws.FlatMapLaws
import cats.laws.discipline._
import cats.laws.discipline.*
import org.scalacheck.Arbitrary
import org.scalacheck.Prop._
import org.scalacheck.Prop.*
import org.typelevel.discipline.Laws

trait FlatMapRecTests[F[_]] extends Laws {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ package alleycats.laws.discipline

import cats.kernel.Eq
import cats.kernel.laws.EqLaws
import cats.kernel.laws.discipline._
import cats.kernel.laws.discipline.*
import org.scalacheck.Arbitrary
import org.scalacheck.Prop.forAll
import org.typelevel.discipline.Laws
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ package alleycats.laws.discipline

import cats.kernel.{Eq, Hash}
import cats.kernel.laws.HashLaws
import cats.kernel.laws.discipline._
import cats.kernel.laws.discipline.*
import org.scalacheck.Arbitrary
import org.scalacheck.Prop.forAll

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@
package alleycats.tests

import alleycats.std.MapInstances
import cats._
import cats.instances.all._
import cats.*
import cats.instances.all.*
import org.scalacheck.{Arbitrary, Gen}
import org.scalacheck.Test.Parameters

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,9 @@

package alleycats.tests

import alleycats.std.all._
import alleycats.std.all.*
import cats.{Eval, Foldable}
import cats.instances.all._
import cats.instances.all.*
import cats.laws.discipline.{TraverseFilterTests, TraverseTests}

class IterableTests extends AlleycatsSuite {
Expand Down
Loading