-
Notifications
You must be signed in to change notification settings - Fork 24
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
Migration to Scala 3 #228
Conversation
cli/src/main/scala/aqua/AppOps.scala
Outdated
} | ||
|
||
def toLogLevel(logLevel: String): Either[NonEmptyList[String], LogLevel] = { | ||
logLevel.toLowerCase match { |
There was a problem hiding this comment.
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)) } |
There was a problem hiding this comment.
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) |
There was a problem hiding this comment.
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) |
There was a problem hiding this comment.
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] = |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
givenNum
fixes #117