From 6c7791ae62d8cb572ab0d0a124e0e78ba261cb7d Mon Sep 17 00:00:00 2001 From: Daniel Slapman Date: Sat, 2 Dec 2023 00:48:19 +0100 Subject: [PATCH] Apply quickfixes --- modules/core/src/main/scala/glass/Update.scala | 2 +- modules/core/src/main/scala/glass/Zipping.scala | 4 ++-- modules/core/src/main/scala/glass/optics.scala | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/modules/core/src/main/scala/glass/Update.scala b/modules/core/src/main/scala/glass/Update.scala index 8b108fc..e58b383 100644 --- a/modules/core/src/main/scala/glass/Update.scala +++ b/modules/core/src/main/scala/glass/Update.scala @@ -37,7 +37,7 @@ object PUpdate extends OpticCompanion[PUpdate] { } class Context extends PZipping.Context with PItems.Context { - def gfunctor = Applicative[Identity] + def gfunctor: Applicative[Identity] = Applicative[Identity] override type G[+x] = x } diff --git a/modules/core/src/main/scala/glass/Zipping.scala b/modules/core/src/main/scala/glass/Zipping.scala index e5cf61d..9ed2120 100644 --- a/modules/core/src/main/scala/glass/Zipping.scala +++ b/modules/core/src/main/scala/glass/Zipping.scala @@ -45,12 +45,12 @@ object PZipping extends OpticCompanion[PZipping] { def profunctor: Profunctor[P] = new CoKleisliProfunctor[G] } - override def toGeneric[S, T, A, B](o: PZipping[S, T, A, B]) = new Optic[Context, S, T, A, B] { + override def toGeneric[S, T, A, B](o: PZipping[S, T, A, B]): Optic[Context, S, T, A, B] = new Optic[Context, S, T, A, B] { def apply(c: Context)(p: c.G[A] => B): c.G[S] => T = o.combineWith(p)(_)(c.gfunctor) } - override def fromGeneric[S, T, A, B](o: Optic[Context, S, T, A, B]) = new PZipping[S, T, A, B] { + override def fromGeneric[S, T, A, B](o: Optic[Context, S, T, A, B]): glass.PZipping[S, T, A, B] = new PZipping[S, T, A, B] { def grate(sab: (S => A) => B): T = o(new Context { type G[+a] = S => a def gfunctor: Functor[G] = implicitly diff --git a/modules/core/src/main/scala/glass/optics.scala b/modules/core/src/main/scala/glass/optics.scala index 8cfb297..be10d21 100644 --- a/modules/core/src/main/scala/glass/optics.scala +++ b/modules/core/src/main/scala/glass/optics.scala @@ -19,7 +19,7 @@ trait OpticCompanion[O[-s, +t, +a, -b] >: PSame[s, t, a, b] @uv212] { def delayed[S, T, A, B](o: () => O[S, T, A, B]): O[S, T, A, B] final implicit val category: Category[Mono] = new Category[Mono] { - def id[A] = PSame.id[A, A] + def id[A] : PSame[A, A, A, A] = PSame.id[A, A] def compose[A, B, C](f: Mono[B, C], g: Mono[A, B]): Mono[A, C] = self.compose(f, g) }