From d154e7465690e118bc8b0a612ea3a994fa6b7b35 Mon Sep 17 00:00:00 2001 From: DieMyst Date: Tue, 7 Mar 2023 09:57:53 +0400 Subject: [PATCH] don't flat iterable streams in for expression --- .../src/main/scala/aqua/model/inline/TagInliner.scala | 2 +- parser/src/main/scala/aqua/parser/expr/func/ForExpr.scala | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/model/inline/src/main/scala/aqua/model/inline/TagInliner.scala b/model/inline/src/main/scala/aqua/model/inline/TagInliner.scala index 99712d08..c2e83fa5 100644 --- a/model/inline/src/main/scala/aqua/model/inline/TagInliner.scala +++ b/model/inline/src/main/scala/aqua/model/inline/TagInliner.scala @@ -137,7 +137,7 @@ object TagInliner extends Logging { case ForTag(item, iterable, mode) => for { vp <- valueToModel(iterable) - flattened <- flat(vp._1, vp._2, true) + flattened <- flat(vp._1, vp._2, false) (v, p) = flattened n <- Mangler[S].findAndForbidName(item) elementType = iterable.`type` match { diff --git a/parser/src/main/scala/aqua/parser/expr/func/ForExpr.scala b/parser/src/main/scala/aqua/parser/expr/func/ForExpr.scala index 043e4150..7c5f8f16 100644 --- a/parser/src/main/scala/aqua/parser/expr/func/ForExpr.scala +++ b/parser/src/main/scala/aqua/parser/expr/func/ForExpr.scala @@ -13,9 +13,9 @@ import aqua.parser.lift.Span import aqua.parser.lift.Span.{P0ToSpan, PToSpan} case class ForExpr[F[_]]( - item: Name[F], - iterable: ValueToken[F], - mode: Option[(F[ForExpr.Mode], ForExpr.Mode)] + item: Name[F], + iterable: ValueToken[F], + mode: Option[(F[ForExpr.Mode], ForExpr.Mode)] ) extends Expr[F](ForExpr, item) { override def mapK[K[_]: Comonad](fk: F ~> K): ForExpr[K] =