mirror of
https://github.com/fluencelabs/aqua.git
synced 2024-12-04 06:30:17 +00:00
printlns
This commit is contained in:
parent
5f00b1ea8d
commit
95bbe8ed73
@ -1,10 +1,7 @@
|
||||
func returnCall() -> string -> string:
|
||||
closure = (s: string) -> string:
|
||||
<- s
|
||||
closure("123asdf")
|
||||
<- closure
|
||||
service Op("op"):
|
||||
noop()
|
||||
|
||||
func test() -> string:
|
||||
a = returnCall()
|
||||
b = a("arg")
|
||||
<- b
|
||||
func test():
|
||||
a:*string
|
||||
on a[0] via a[1]:
|
||||
Op.noop()
|
@ -50,11 +50,16 @@ object ArrowInliner extends Logging {
|
||||
// Now, substitute the arrows that were received as function arguments
|
||||
// Use the new op tree (args are replaced with values, names are unique & safe)
|
||||
callableFuncBodyNoTopology <- TagInliner.handleTree(tree, fn.funcName)
|
||||
|
||||
_ = println("func no topology: " + callableFuncBodyNoTopology.show)
|
||||
|
||||
callableFuncBody =
|
||||
fn.capturedTopology
|
||||
.fold[OpModel](SeqModel)(ApplyTopologyModel.apply)
|
||||
.wrap(callableFuncBodyNoTopology)
|
||||
|
||||
_ = println("func topology: " + callableFuncBody.show)
|
||||
|
||||
// Fix return values with exports collected in the body
|
||||
resolvedResult <- RawValueInliner.valueListToModel(result)
|
||||
// Fix the return values
|
||||
@ -196,6 +201,7 @@ object ArrowInliner extends Logging {
|
||||
for {
|
||||
_ <- Arrows[S].resolved(passArrows)
|
||||
av <- ArrowInliner.inline(arrow, call)
|
||||
_ = println("after inlining: " + av._1.show)
|
||||
// find and get resolved arrows if we return them from the function
|
||||
returnedArrows = av._2.collect { case VarModel(name, ArrowType(_, _), _) =>
|
||||
name
|
||||
|
@ -68,6 +68,8 @@ object Transform extends Logging {
|
||||
// Resolve the topology, clear the resulting tree
|
||||
val resultingTree = preparedFunc.flatMap(tree => Topology.resolve(tree).map(clear(_)))
|
||||
|
||||
println("resultingTree: " + resultingTree.value.show)
|
||||
|
||||
resultingTree.map(res =>
|
||||
FuncRes(
|
||||
func.funcName,
|
||||
|
Loading…
Reference in New Issue
Block a user