@@ -108,16 +108,22 @@ object ArityRaising extends Phase[CoreTransformed, CoreTransformed] {
108108 case BlockVar (id, annotatedTpe, annotatedCapt) =>
109109 annotatedTpe match {
110110 case BlockType .Function (tparams, cparams, vparams, bparams, result) =>
111- val params = vparams.map { tpe =>
112- // need to fix for propper implementation
113- val freshId = Id (" x_" + scala.util.Random .nextInt())
111+ val types = tparams.map {id =>
112+
113+ }
114+ val values = vparams.map { tpe =>
115+ val freshId = Id (" x" )
114116 (ValueParam (freshId, tpe), ValueVar (freshId, tpe))
115117 }
116- val call = Stmt .App (barg, List (), params.map(_._2), List ())
118+ val blocks = bparams.zip(cparams).map { case (tpe, capt)=>
119+ val freshId = Id (" f" )
120+ (BlockParam (freshId, tpe, Set (capt)), BlockVar (freshId, tpe, Set (capt)))
121+ }
122+
123+ val call = Stmt .App (barg, List (), values.map(_._2), List ())
117124 val transformedBody = transform(call)
118125
119- // empty List for Bargs should be fine, since myList.map {myFunc} the myFunc cant have any bargs??
120- BlockLit (tparams, cparams, params.map(_._1), List (), transformedBody)
126+ BlockLit (tparams, cparams, values.map(_._1), List (), transformedBody)
121127
122128 case _ => transform(barg)
123129 }
0 commit comments