Skip to content

Commit

Permalink
Remove braces in scala 3 instances
Browse files Browse the repository at this point in the history
  • Loading branch information
geny200 committed May 6, 2024
1 parent 1457365 commit 0da2c14
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import tofu.time.Clock
import java.util.concurrent.TimeUnit
import scala.compiletime.summonFrom

private[tofu] trait ClockInstance {
private[tofu] trait ClockInstance:
inline given [F[_]]: Clock[F] = summonFrom {
case carrier: ClockCE3Carrier[F] => carrier
case carrier: ClockCE2Carrier[F] => carrier
Expand All @@ -23,4 +23,3 @@ private[tofu] trait ClockInstance {
def nanos: F[Long] = hom(RepK[Clock](_.nanos))
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import tofu.internal.carriers.{DelayCarrier2, DelayCarrier3}

import scala.compiletime.summonFrom

private[tofu] trait DelayInstance {
private[tofu] trait DelayInstance:
inline given [F[_]]: Delay[F] = summonFrom {
case carrier: DelayCarrier3[F] => carrier
case carrier: DelayCarrier2[F] => carrier
Expand All @@ -20,4 +20,3 @@ private[tofu] trait DelayInstance {
def delay[A](a: => A): F[A] = hom(RepK[Delay](_.delay(a)))
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import tofu.time.Sleep
import scala.compiletime.summonFrom
import scala.concurrent.duration.FiniteDuration

private[tofu] trait SleepInstance {
private[tofu] trait SleepInstance:
inline given [F[_]]: Sleep[F] =
summonFrom {
case carrier: SleepCE3Carrier[F] => carrier
Expand All @@ -22,4 +22,3 @@ private[tofu] trait SleepInstance {
def sleep(duration: FiniteDuration): F[Unit] = hom(RepK[Sleep](_.sleep(duration)))
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import tofu.time.TimeZone

import java.time.{ZoneId, ZoneOffset}

trait TimeZoneInstance {
trait TimeZoneInstance:
// TODO: use higherKind.derived macro when it is ready for scala 3
given timeZoneRepresentableK: RepresentableK[TimeZone] = new RepresentableK[TimeZone] {
def tabulate[F[_]](hom: RepK[TimeZone, _] ~> F): TimeZone[F] = new TimeZone[F] {
Expand All @@ -17,5 +17,3 @@ trait TimeZoneInstance {
hom(RepK[TimeZone](_.ofOffset(prefix, offset)))
}
}

}

0 comments on commit 0da2c14

Please sign in to comment.