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

Migration to Scala 3 #228

Merged
merged 10 commits into from
Aug 6, 2021
Merged

Migration to Scala 3 #228

merged 10 commits into from
Aug 6, 2021

Conversation

DieMyst
Copy link
Member

@DieMyst DieMyst commented Aug 6, 2021

fixes #117

@DieMyst DieMyst requested a review from alari August 6, 2021 09:52
}

def toLogLevel(logLevel: String): Either[NonEmptyList[String], LogLevel] = {
logLevel.toLowerCase match {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Use a Map?

@@ -106,9 +106,9 @@ object FuncOp {
cf.tail
.map(_.foldLeft[(A, Chain[Tree])]((headA, head.tailForced)) {
case ((aggrA, aggrTail), child) =>
traverseA(child, aggrA)(f).value.map(aggrTail.append)
traverseA(child, aggrA)(f).value match { case (a, tree) => (a, aggrTail.append(tree)) }
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why is it so?

extends TypeOp[F, Boolean]

case class ExpectNoExport[F[_]](token: Token[F]) extends TypeOp[F, Unit]

case class CheckArgumentsNum[F[_]](token: Token[F], expected: Int, given: Int)
case class CheckArgumentsNum[F[_]](token: Token[F], expected: Int, givenType: Int)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

givenNum

@@ -9,6 +9,8 @@ import cats.free.Free

class TypesAlgebra[F[_], Alg[_]](implicit T: InjectK[TypeOp[F, *], Alg]) {

val xs: List[?] = List(1, 2, 3)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What is it?


def expectNoExport(token: Token[F]): Free[Alg, Unit] =
Free.liftInject[Alg](ExpectNoExport[F](token))

def checkArgumentsNumber(token: Token[F], expected: Int, given: Int): Free[Alg, Boolean] =
Free.liftInject[Alg](CheckArgumentsNum(token, expected, given))
def checkArgumentsNumber(token: Token[F], expected: Int, givenType: Int): Free[Alg, Boolean] =
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

givenNum

@DieMyst DieMyst merged commit 4ccac9b into main Aug 6, 2021
@DieMyst DieMyst deleted the scala3 branch August 6, 2021 10:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Upgrade to scala 3.0.0
2 participants