mirror of
https://github.com/fluencelabs/aqua.git
synced 2024-12-03 14:10:17 +00:00
add scalafmt, use only one nil
This commit is contained in:
parent
bd0ca60fdc
commit
6da87e3478
@ -62,9 +62,9 @@ runner {
|
||||
}
|
||||
}
|
||||
|
||||
rewrite {
|
||||
rules = [
|
||||
SortImports
|
||||
]
|
||||
}
|
||||
rewrite.rules = [Imports]
|
||||
rewrite.imports.sort = ascii
|
||||
rewrite.imports.groups = [
|
||||
["aqua\\..*"]
|
||||
]
|
||||
#runner.dialect = scala3
|
||||
|
@ -34,7 +34,6 @@ object ValueRaw {
|
||||
val ParticleTimestamp: LiteralRaw = LiteralRaw("%timestamp%", ScalarType.u64)
|
||||
|
||||
val Nil: LiteralRaw = LiteralRaw("[]", StreamType(BottomType))
|
||||
val VarNil: VarRaw = VarRaw("nil", StreamType(BottomType))
|
||||
|
||||
/**
|
||||
* Type of error value
|
||||
|
@ -78,6 +78,9 @@ class ValuesAlgebra[S[_], Alg[_]: Monad](using
|
||||
case l @ LiteralToken(_, t) =>
|
||||
LiteralRaw(l.value, t).some.pure[Alg]
|
||||
|
||||
case VarToken(name) if name.value == ValueRaw.Nil.value =>
|
||||
ValueRaw.Nil.some.pure[Alg]
|
||||
|
||||
case VarToken(name) =>
|
||||
N.read(name, mustBeDefined = false).flatMap {
|
||||
case Some(t) =>
|
||||
|
@ -134,7 +134,7 @@ class NamesInterpreter[S[_], X](using
|
||||
|
||||
override def assign(name: Name[S], value: ValueRaw): SX[Boolean] =
|
||||
value match {
|
||||
case ValueRaw.Nil | ValueRaw.VarNil =>
|
||||
case ValueRaw.Nil =>
|
||||
report
|
||||
.error(
|
||||
name,
|
||||
|
@ -15,7 +15,7 @@ import org.scalatest.matchers.should.Matchers
|
||||
|
||||
class AssignmentSemSpec extends AnyFlatSpec with Matchers with Inside {
|
||||
|
||||
import Utils.{*, given}
|
||||
import Utils.{given, *}
|
||||
|
||||
val program: Prog[State[CompilerState[cats.Id], *], Raw] = {
|
||||
val expr = ClosureExpr(Name[Id]("closure"), None)
|
||||
|
Loading…
Reference in New Issue
Block a user