diff --git a/.scalafmt.conf b/.scalafmt.conf index a974b5f..1931150 100644 --- a/.scalafmt.conf +++ b/.scalafmt.conf @@ -1,4 +1,4 @@ -version = 2.7.5 +version = 3.0.3 align.preset = most align.multiline = false diff --git a/build.sbt b/build.sbt index 57321d6..90883dd 100644 --- a/build.sbt +++ b/build.sbt @@ -18,10 +18,10 @@ lazy val scalaz: Project = (project in file("scalaz")) .settings( schemez(Compile, "main"), schemez(Test, "test"), - name := "schemez-scalaz", - skip in publish := false, + name := "schemez-scalaz", + skip in publish := false, publishArtifact in makePom := true, - publishArtifact := true, + publishArtifact := true, libraryDependencies ++= Seq( Scalaz.core ) @@ -38,7 +38,7 @@ lazy val eg: Project = (project in file("example")) .enablePlugins(ProjectPlugin) .dependsOn(scalaz) .settings( - name := "example", + name := "example", skip in publish := true ) @@ -46,7 +46,7 @@ lazy val testz: Project = (project in file("testz")) .enablePlugins(ProjectPlugin) .dependsOn(eg, scalaz) .settings( - name := "testz", + name := "testz", skip in publish := true, libraryDependencies ++= Seq( Scalaz.Testz.testz, diff --git a/project/ProjectPlugin.scala b/project/ProjectPlugin.scala index 80a8478..e046bca 100644 --- a/project/ProjectPlugin.scala +++ b/project/ProjectPlugin.scala @@ -25,8 +25,8 @@ object ProjectPlugin extends AutoPlugin { override val projectSettings: Seq[Def.Setting[_]] = headerSettings ++ Seq( - conflictManager := ConflictManager.strict, - dependencyOverrides := DependencyOverrides.settings, + conflictManager := ConflictManager.strict, + dependencyOverrides := DependencyOverrides.settings, autoAPIMappings in Global := true, addCompilerPlugin(Dependencies.CompilerPlugin.kindProjector), addCompilerPlugin(Dependencies.CompilerPlugin.monadicFor), @@ -36,7 +36,7 @@ object ProjectPlugin extends AutoPlugin { private lazy val headerSettings: Seq[Def.Setting[_]] = Seq( startYear := Some(2018), - licenses := Nil, + licenses := Nil, headerLicense := Some( HeaderLicense.Custom( """Copyright (c) 2019 Yui Pham. diff --git a/schemez/src/main/scala/enzief/recursionz/Birecursive.scala b/schemez/src/main/scala/enzief/recursionz/Birecursive.scala index 370d314..2a98e65 100644 --- a/schemez/src/main/scala/enzief/recursionz/Birecursive.scala +++ b/schemez/src/main/scala/enzief/recursionz/Birecursive.scala @@ -38,8 +38,8 @@ object Birecursive { } /** Special `Birecursive` for any HKT `T` that has - * - an algebra `T[F] => F[T[F]]`, eg: `Fix.unfix` - * - and an coalgebra `F[T[F]] => T[F]`, eg. `Fix.apply` + * - an algebra `T[F] => F[T[F]]`, eg: `Fix.unfix` + * - and an coalgebra `F[T[F]] => T[F]`, eg. `Fix.apply` */ abstract class BirecursiveT[T[_[_]], F[_]](implicit F: Functor[F]) extends Recursionz[F] with RecursiveT[T, F] with CorecursiveT[T, F] diff --git a/schemez/src/main/scala/enzief/recursionz/Corecursive.scala b/schemez/src/main/scala/enzief/recursionz/Corecursive.scala index c4d39a5..d825a2f 100644 --- a/schemez/src/main/scala/enzief/recursionz/Corecursive.scala +++ b/schemez/src/main/scala/enzief/recursionz/Corecursive.scala @@ -44,8 +44,7 @@ object Corecursive { } } -/** Special `Corecursive` for any HKT `T` that has an coalgebra `F[T[F]] => T[F]`. - * Eg. `Fix.apply` +/** Special `Corecursive` for any HKT `T` that has an coalgebra `F[T[F]] => T[F]`. Eg. `Fix.apply` */ trait CorecursiveT[T[_[_]], F[_]] extends Recursionz[F] { _: Recursionz[F] => diff --git a/schemez/src/main/scala/enzief/recursionz/Recursionz.scala b/schemez/src/main/scala/enzief/recursionz/Recursionz.scala index ccbd234..55a6039 100644 --- a/schemez/src/main/scala/enzief/recursionz/Recursionz.scala +++ b/schemez/src/main/scala/enzief/recursionz/Recursionz.scala @@ -20,11 +20,9 @@ import typeclass.syntax._ class Recursionz[F[_]](implicit val F: Functor[F]) { - /** Hylomorphism - fundamental operation of recursion schemes. It recursively - * applies `cof` to unfold `a` into layers of `F[A]`, then recursively folds - * then into a `B` using `f`. - * It can also be seen as the (fused) composition of an anamorphism and a - * catamorphism that avoids building the intermediate recursive data structure. + /** Hylomorphism - fundamental operation of recursion schemes. It recursively applies `cof` to unfold `a` into layers of `F[A]`, then recursively folds then + * into a `B` using `f`. It can also be seen as the (fused) composition of an anamorphism and a catamorphism that avoids building the intermediate recursive + * data structure. */ def hylo[A, B](a: A)(f: Algebra[F, B], cof: Coalgebra[F, A]): B = f(cof(a).map(hylo(_)(f, cof))) diff --git a/schemez/src/main/scala/enzief/recursionz/Recursive.scala b/schemez/src/main/scala/enzief/recursionz/Recursive.scala index 57f72ed..3662f8f 100644 --- a/schemez/src/main/scala/enzief/recursionz/Recursive.scala +++ b/schemez/src/main/scala/enzief/recursionz/Recursive.scala @@ -48,8 +48,7 @@ object Recursive { } } -/** Special `Recursive` for any HKT `T` that has an algebra `T[F] => F[T[F]]` - * Eg: `Fix.unfix`. +/** Special `Recursive` for any HKT `T` that has an algebra `T[F] => F[T[F]]` Eg: `Fix.unfix`. */ trait RecursiveT[T[_[_]], F[_]] { _: Recursionz[F] => def projectT(t: T[F]): F[T[F]]