diff --git a/model/inline/src/main/scala/aqua/model/inline/raw/ApplyFunctorRawInliner.scala b/model/inline/src/main/scala/aqua/model/inline/raw/ApplyFunctorRawInliner.scala index a2279c29..57b0cb0a 100644 --- a/model/inline/src/main/scala/aqua/model/inline/raw/ApplyFunctorRawInliner.scala +++ b/model/inline/src/main/scala/aqua/model/inline/raw/ApplyFunctorRawInliner.scala @@ -41,6 +41,12 @@ object ApplyFunctorRawInliner extends Logging { VarModel(apName, canonType, Chain.one(functorModel)), CanonicalizeModel(v, CallModel.Export(apName, canonType)).leaf ) + case CanonStreamType(el) => + val arrType = ArrayType(el) + ( + VarModel(apName, arrType, Chain.one(functorModel)), + FlattenModel(v, apName).leaf + ) case _ => (VarModel(apName, bt, Chain.one(functorModel)), FlattenModel(v, apName).leaf) } diff --git a/model/res/src/main/scala/aqua/res/MakeRes.scala b/model/res/src/main/scala/aqua/res/MakeRes.scala index 216b30d0..494b0008 100644 --- a/model/res/src/main/scala/aqua/res/MakeRes.scala +++ b/model/res/src/main/scala/aqua/res/MakeRes.scala @@ -80,7 +80,7 @@ object MakeRes { orInit(currentPeerId), exportTo ).leaf - case FlattenModel(operand@VarModel(_, CanonStreamType(el), _), assignTo) => + case FlattenModel(operand @ VarModel(_, CanonStreamType(el), _), assignTo) => ApRes(operand, CallModel.Export(assignTo, ArrayType(el))).leaf case FlattenModel(operand, assignTo) => ApRes(operand, CallModel.Export(assignTo, operand.`type`)).leaf