diff --git a/apps/spiral/builder/spiral_builder.fsx b/apps/spiral/builder/spiral_builder.fsx index 7addd1b8..8dc932ad 100644 --- a/apps/spiral/builder/spiral_builder.fsx +++ b/apps/spiral/builder/spiral_builder.fsx @@ -4332,67 +4332,34 @@ and method47 (v0 : std_sync_MutexGuard) : std_sync_Mutex v0 and method48 (v0 : std_thread_JoinHandle) : std_thread_JoinHandle = v0 -and closure27 () (v0 : std_thread_JoinHandle) : unit = - let v1 : string = "std::thread::JoinHandle::join($0)" - let v2 : Result>>>>>>> = Fable.Core.RustInterop.emitRustExpr v0 v1 - let v3 : string = "$0.unwrap()" - let v4 : bool = Fable.Core.RustInterop.emitRustExpr v2 v3 - () -and closure28 () (v0 : std_process_Output) : US14 = +and closure27 () (v0 : std_process_Output) : US14 = US14_0(v0) -and closure29 () (v0 : std_string_String) : US14 = +and closure28 () (v0 : std_string_String) : US14 = US14_1(v0) -and closure30 () () : string = +and closure29 () () : string = let v0 : string = $"runtime.execute_with_options / output error" v0 -and closure31 (v0 : std_string_String) () : string = +and closure30 (v0 : std_string_String) () : string = let v1 : (unit -> string) = closure6() let v2 : string = $"error: {v0} / {v1 ()}" v2 -and closure32 () (v0 : std_sync_Arc>>>) : string = - let v1 : string = "$0.lock()" - let v2 : Result>>, std_sync_PoisonError>>>> = Fable.Core.RustInterop.emitRustExpr v0 v1 - let v3 : string = "$0.unwrap()" - let v4 : std_sync_MutexGuard>> = Fable.Core.RustInterop.emitRustExpr v2 v3 - let v5 : string = "v4.iter()" - let v6 : _ = Fable.Core.RustInterop.emitRustExpr () v5 - let v7 : string = "v6.collect::>()" - let v8 : Vec = Fable.Core.RustInterop.emitRustExpr () v7 - let v9 : string = "true; let _result = v8.into_iter().map(|x| { //" - let v10 : bool = Fable.Core.RustInterop.emitRustExpr () v9 - let v11 : string = "x" - let v12 : std_string_String = Fable.Core.RustInterop.emitRustExpr () v11 - let v13 : string = "fable_library_rust::String_::fromString($0)" - let v14 : string = Fable.Core.RustInterop.emitRustExpr v12 v13 - let v15 : string = "true; $0 }).collect::>()" - let v16 : bool = Fable.Core.RustInterop.emitRustExpr v14 v15 - let v17 : string = "_result" - let v18 : Vec = Fable.Core.RustInterop.emitRustExpr () v17 - let v19 : string = "fable_library_rust::NativeArray_::array_from($0)" - let v20 : (string []) = Fable.Core.RustInterop.emitRustExpr v18 v19 - let v21 : ((string []) -> string seq) = Seq.ofArray - let v22 : string seq = v21 v20 - let v23 : string = method33() - let v24 : (string -> (string seq -> string)) = String.concat - let v25 : (string seq -> string) = v24 v23 - v25 v22 -and closure33 () () : string = +and closure31 () () : string = let v0 : string = $"runtime.execute_with_options / result" v0 -and closure34 (v0 : int32, v1 : string) () : string = +and closure32 (v0 : int32, v1 : string) () : string = let v2 : (unit -> string) = closure6() let v3 : string = $"exit_code: {v0} / std_trace.Length: {v1.Length} / {v2 ()}" v3 and method49 (v0 : (int32 * string)) : (int32 * string) = v0 -and closure35 (v0 : System.Threading.CancellationToken option, v1 : string, v2 : (struct (string * string) []), v3 : (struct (bool * string * int32) -> Async) option, v4 : (std_sync_Arc> -> unit) option, v5 : bool, v6 : string option) () : string = +and closure33 (v0 : System.Threading.CancellationToken option, v1 : string, v2 : (struct (string * string) []), v3 : (struct (bool * string * int32) -> Async) option, v4 : (std_sync_Arc> -> unit) option, v5 : bool, v6 : string option) () : string = let v7 : string = $"execute_with_options_async / options: %A{struct (v0, v1, v2, v3, v4, v5, v6)}" v7 and method51 () : (unit -> string) = closure6() -and closure37 (v0 : string) () : string = +and closure35 (v0 : string) () : string = v0 -and closure36 (v0 : System.Threading.CancellationToken option, v1 : string, v2 : (struct (string * string) []), v3 : (struct (bool * string * int32) -> Async) option, v4 : (std_sync_Arc> -> unit) option, v5 : bool, v6 : string option, v7 : System.Diagnostics.Process, v8 : System.Collections.Concurrent.ConcurrentStack) (v9 : System.Diagnostics.DataReceivedEventArgs) : unit = +and closure34 (v0 : System.Threading.CancellationToken option, v1 : string, v2 : (struct (string * string) []), v3 : (struct (bool * string * int32) -> Async) option, v4 : (std_sync_Arc> -> unit) option, v5 : bool, v6 : string option, v7 : System.Diagnostics.Process, v8 : System.Collections.Concurrent.ConcurrentStack) (v9 : System.Diagnostics.DataReceivedEventArgs) : unit = let v10 : bool = true let mutable _v10 : Async option = None @@ -4454,7 +4421,7 @@ and closure36 (v0 : System.Threading.CancellationToken option, v1 : string, v2 : let v30 : string = $"> {v17}" if v5 then let v31 : US0 = US0_0 - let v32 : (unit -> string) = closure37(v30) + let v32 : (unit -> string) = closure35(v30) let v33 : (unit -> string) = closure6() method5(v31, v32, v33) else @@ -4504,7 +4471,7 @@ and closure36 (v0 : System.Threading.CancellationToken option, v1 : string, v2 : |> fun x -> _v39 <- Some x _v39.Value () -and closure38 (v0 : System.Threading.CancellationToken option, v1 : string, v2 : (struct (string * string) []), v3 : (struct (bool * string * int32) -> Async) option, v4 : (std_sync_Arc> -> unit) option, v5 : bool, v6 : string option, v7 : System.Diagnostics.Process, v8 : System.Collections.Concurrent.ConcurrentStack) (v9 : System.Diagnostics.DataReceivedEventArgs) : unit = +and closure36 (v0 : System.Threading.CancellationToken option, v1 : string, v2 : (struct (string * string) []), v3 : (struct (bool * string * int32) -> Async) option, v4 : (std_sync_Arc> -> unit) option, v5 : bool, v6 : string option, v7 : System.Diagnostics.Process, v8 : System.Collections.Concurrent.ConcurrentStack) (v9 : System.Diagnostics.DataReceivedEventArgs) : unit = let v10 : bool = true let mutable _v10 : Async option = None @@ -4566,7 +4533,7 @@ and closure38 (v0 : System.Threading.CancellationToken option, v1 : string, v2 : let v30 : string = $"! {v17}" if v5 then let v31 : US0 = US0_0 - let v32 : (unit -> string) = closure37(v30) + let v32 : (unit -> string) = closure35(v30) let v33 : (unit -> string) = closure6() method5(v31, v32, v33) else @@ -4617,7 +4584,7 @@ and closure38 (v0 : System.Threading.CancellationToken option, v1 : string, v2 : |> fun x -> _v40 <- Some x _v40.Value () -and closure39 (v0 : System.Diagnostics.Process) () : unit = +and closure37 (v0 : System.Diagnostics.Process) () : unit = let v1 : bool = true let mutable _v1 : bool option = None @@ -4684,10 +4651,10 @@ and closure39 (v0 : System.Diagnostics.Process) () : unit = |> fun x -> _v10 <- Some x _v10.Value () -and closure40 (v0 : System.Threading.Tasks.TaskCanceledException) () : string = +and closure38 (v0 : System.Threading.Tasks.TaskCanceledException) () : string = let v1 : string = $"execute_with_options_async / WaitForExitAsync / ex: %A{v0}" v1 -and closure41 (v0 : int32, v1 : string) () : string = +and closure39 (v0 : int32, v1 : string) () : string = let v2 : string = $"execute_with_options_async / exit_code: {v0} / output.Length: {v1.Length}" v2 and method50 (v0 : System.Threading.CancellationToken option, v1 : string, v2 : (struct (string * string) []), v3 : (struct (bool * string * int32) -> Async) option, v4 : (std_sync_Arc> -> unit) option, v5 : bool, v6 : string option) : Async = @@ -4791,7 +4758,7 @@ and method50 (v0 : System.Threading.CancellationToken option, v1 : string, v2 : | US3_0(v46) -> (* Some *) v46 let v50 : US0 = US0_1 - let v51 : (unit -> string) = closure35(v0, v1, v2, v3, v4, v5, v6) + let v51 : (unit -> string) = closure33(v0, v1, v2, v3, v4, v5, v6) let v52 : (unit -> string) = method51() method5(v50, v51, v52) let v53 : System.Text.Encoding = System.Text.Encoding.UTF8 @@ -4810,9 +4777,9 @@ and method50 (v0 : System.Threading.CancellationToken option, v1 : string, v2 : let v63 : System.Diagnostics.Process = v62 let v64 : (unit -> System.Collections.Concurrent.ConcurrentStack) = System.Collections.Concurrent.ConcurrentStack let v65 : System.Collections.Concurrent.ConcurrentStack = v64 () - let v66 : (System.Diagnostics.DataReceivedEventArgs -> unit) = closure36(v0, v1, v2, v3, v4, v5, v6, v63, v65) + let v66 : (System.Diagnostics.DataReceivedEventArgs -> unit) = closure34(v0, v1, v2, v3, v4, v5, v6, v63, v65) v63.OutputDataReceived.Add v66 - let v67 : (System.Diagnostics.DataReceivedEventArgs -> unit) = closure38(v0, v1, v2, v3, v4, v5, v6, v63, v65) + let v67 : (System.Diagnostics.DataReceivedEventArgs -> unit) = closure36(v0, v1, v2, v3, v4, v5, v6, v63, v65) v63.ErrorDataReceived.Add v67 let v68 : (unit -> bool) = v63.Start let v69 : bool = v68 () @@ -4925,7 +4892,7 @@ and method50 (v0 : System.Threading.CancellationToken option, v1 : string, v2 : let! v106 = v106 let v107 : System.Threading.CancellationToken = v106 let v108 : ((unit -> unit) -> System.Threading.CancellationTokenRegistration) = v107.Register - let v109 : (unit -> unit) = closure39(v63) + let v109 : (unit -> unit) = closure37(v63) let v110 : System.Threading.CancellationTokenRegistration = v108 v109 use v110 = v110 let v111 : System.Threading.CancellationTokenRegistration = v110 @@ -5032,7 +4999,7 @@ and method50 (v0 : System.Threading.CancellationToken option, v1 : string, v2 : v139 v138 let v140 : System.Threading.Tasks.TaskCanceledException = v130 |> unbox let v141 : US0 = US0_3 - let v142 : (unit -> string) = closure40(v140) + let v142 : (unit -> string) = closure38(v140) let v143 : (unit -> string) = method51() method5(v141, v142, v143) return -2147483648 @@ -5054,7 +5021,7 @@ and method50 (v0 : System.Threading.CancellationToken option, v1 : string, v2 : let v151 : (string seq -> string) = v150 v149 let v152 : string = v151 v148 let v153 : US0 = US0_1 - let v154 : (unit -> string) = closure41(v146, v152) + let v154 : (unit -> string) = closure39(v146, v152) let v155 : (unit -> string) = method51() method5(v153, v154, v155) return struct (v146, v152) @@ -5210,16 +5177,16 @@ and method40 (v0 : System.Threading.CancellationToken option, v1 : string, v2 : let v115 : (std_sync_Arc> -> US9) = closure16() let v116 : (std_string_String -> US9) = closure17() let v117 : US9 = Fable.Core.RustInterop.emitRustExpr struct (v115, v116) v114 - let struct (v305 : int32, v306 : US2, v307 : US10) = + let struct (v313 : int32, v314 : US2, v315 : US10) = match v117 with - | US9_1(v296) -> (* Error *) - let v297 : US0 = US0_4 - let v298 : (unit -> string) = closure18() - let v299 : (unit -> string) = closure19(v296) - method5(v297, v298, v299) - let v300 : US2 = US2_0(v296) - let v301 : US10 = US10_1 - struct (-1, v300, v301) + | US9_1(v304) -> (* Error *) + let v305 : US0 = US0_4 + let v306 : (unit -> string) = closure18() + let v307 : (unit -> string) = closure19(v304) + method5(v305, v306, v307) + let v308 : US2 = US2_0(v304) + let v309 : US10 = US10_1 + struct (-1, v308, v309) | US9_0(v118) -> (* Ok *) let v119 : string = "$0.lock().unwrap().as_mut().unwrap().stdout.take().unwrap()" let v120 : std_process_ChildStdout = Fable.Core.RustInterop.emitRustExpr v118 v119 @@ -5405,141 +5372,180 @@ and method40 (v0 : System.Threading.CancellationToken option, v1 : string, v2 : let v267 : string = v266 + v262 let v268 : string = "vec![" + v267 + "]" let v269 : Vec> = Fable.Core.RustInterop.emitRustExpr () v268 - let v270 : string = "$0.into_iter().for_each(|x| { $1(x); })" - let v271 : (std_thread_JoinHandle -> unit) = closure27() - Fable.Core.RustInterop.emitRustExpr struct (v269, v271) v270 - let v272 : (std_process_Output -> US14) = closure28() - let v273 : (std_string_String -> US14) = closure29() - let v274 : US14 = match v257 with Ok x -> v272 x | Error x -> v273 x - match v274 with - | US14_1(v284) -> (* Error *) - let v285 : US0 = US0_4 - let v286 : (unit -> string) = closure30() - let v287 : (unit -> string) = closure31(v284) - method5(v285, v286, v287) - let v288 : US2 = US2_0(v284) - let v289 : US10 = US10_1 - struct (-2, v288, v289) - | US14_0(v275) -> (* Ok *) - let v276 : string = "$0.status" - let v277 : std_process_ExitStatus = Fable.Core.RustInterop.emitRustExpr v275 v276 - let v278 : string = "$0.code()" - let v279 : int32 option = Fable.Core.RustInterop.emitRustExpr v277 v278 - let v280 : string = "$0.unwrap()" - let v281 : int32 = Fable.Core.RustInterop.emitRustExpr v279 v280 - let v282 : US2 = US2_1 - let v283 : US10 = US10_0(v157) - struct (v281, v282, v283) - let v312 : std_sync_Arc>>> option = - match v307 with + let v270 : string = "true; v269.into_iter().for_each(|x| { //" + let v271 : bool = Fable.Core.RustInterop.emitRustExpr () v270 + let v272 : string = "x" + let v273 : std_thread_JoinHandle = Fable.Core.RustInterop.emitRustExpr () v272 + let v274 : string = "std::thread::JoinHandle::join($0)" + let v275 : Result>>>>>>> = Fable.Core.RustInterop.emitRustExpr v273 v274 + let v276 : string = "$0.unwrap()" + let v277 : bool = Fable.Core.RustInterop.emitRustExpr v275 v276 + let v278 : string = "true; () })" + let v279 : bool = Fable.Core.RustInterop.emitRustExpr () v278 + let v280 : (std_process_Output -> US14) = closure27() + let v281 : (std_string_String -> US14) = closure28() + let v282 : US14 = match v257 with Ok x -> v280 x | Error x -> v281 x + match v282 with + | US14_1(v292) -> (* Error *) + let v293 : US0 = US0_4 + let v294 : (unit -> string) = closure29() + let v295 : (unit -> string) = closure30(v292) + method5(v293, v294, v295) + let v296 : US2 = US2_0(v292) + let v297 : US10 = US10_1 + struct (-2, v296, v297) + | US14_0(v283) -> (* Ok *) + let v284 : string = "$0.status" + let v285 : std_process_ExitStatus = Fable.Core.RustInterop.emitRustExpr v283 v284 + let v286 : string = "$0.code()" + let v287 : int32 option = Fable.Core.RustInterop.emitRustExpr v285 v286 + let v288 : string = "$0.unwrap()" + let v289 : int32 = Fable.Core.RustInterop.emitRustExpr v287 v288 + let v290 : US2 = US2_1 + let v291 : US10 = US10_0(v157) + struct (v289, v290, v291) + let v320 : std_sync_Arc>>> option = + match v315 with | US10_1 -> (* None *) - let v310 : std_sync_Arc>>> option = None - v310 - | US10_0(v308) -> (* Some *) - let v309 : std_sync_Arc>>> option = Some v308 - v309 - let v313 : (std_sync_Arc>>> -> string) = closure32() - let v314 : string option = v312 |> Option.map v313 - let v321 : US3 = - match v306 with + let v318 : std_sync_Arc>>> option = None + v318 + | US10_0(v316) -> (* Some *) + let v317 : std_sync_Arc>>> option = Some v316 + v317 + let v321 : string = "true; let _result = v320.map(|x| { //" + let v322 : bool = Fable.Core.RustInterop.emitRustExpr () v321 + let v323 : string = "x" + let v324 : std_sync_Arc>>> = Fable.Core.RustInterop.emitRustExpr () v323 + let v325 : string = "$0.lock()" + let v326 : Result>>, std_sync_PoisonError>>>> = Fable.Core.RustInterop.emitRustExpr v324 v325 + let v327 : string = "$0.unwrap()" + let v328 : std_sync_MutexGuard>> = Fable.Core.RustInterop.emitRustExpr v326 v327 + let v329 : string = "v328.iter()" + let v330 : _ = Fable.Core.RustInterop.emitRustExpr () v329 + let v331 : string = "v330.collect::>()" + let v332 : Vec = Fable.Core.RustInterop.emitRustExpr () v331 + let v333 : string = "true; let _result = v332.into_iter().map(|x| { //" + let v334 : bool = Fable.Core.RustInterop.emitRustExpr () v333 + let v335 : string = "x" + let v336 : std_string_String = Fable.Core.RustInterop.emitRustExpr () v335 + let v337 : string = "fable_library_rust::String_::fromString($0)" + let v338 : string = Fable.Core.RustInterop.emitRustExpr v336 v337 + let v339 : string = "true; $0 }).collect::>()" + let v340 : bool = Fable.Core.RustInterop.emitRustExpr v338 v339 + let v341 : string = "_result" + let v342 : Vec = Fable.Core.RustInterop.emitRustExpr () v341 + let v343 : string = "fable_library_rust::NativeArray_::array_from($0)" + let v344 : (string []) = Fable.Core.RustInterop.emitRustExpr v342 v343 + let v345 : ((string []) -> string seq) = Seq.ofArray + let v346 : string seq = v345 v344 + let v347 : string = method33() + let v348 : (string -> (string seq -> string)) = String.concat + let v349 : (string seq -> string) = v348 v347 + let v350 : string = v349 v346 + let v351 : string = "true; $0 })" + let v352 : bool = Fable.Core.RustInterop.emitRustExpr v350 v351 + let v353 : string = "_result" + let v354 : string option = Fable.Core.RustInterop.emitRustExpr () v353 + let v361 : US3 = + match v314 with | US2_1 -> (* None *) US3_1 - | US2_0(v315) -> (* Some *) - let v316 : string = "fable_library_rust::String_::fromString($0)" - let v317 : string = Fable.Core.RustInterop.emitRustExpr v315 v316 - US3_0(v317) - let v325 : string = - match v321 with + | US2_0(v355) -> (* Some *) + let v356 : string = "fable_library_rust::String_::fromString($0)" + let v357 : string = Fable.Core.RustInterop.emitRustExpr v355 v356 + US3_0(v357) + let v365 : string = + match v361 with | US3_1 -> (* None *) - let v323 : string = "" - v323 - | US3_0(v322) -> (* Some *) - v322 - let v326 : string = v314 |> Option.defaultValue v325 - let v327 : US0 = US0_0 - let v328 : (unit -> string) = closure33() - let v329 : (unit -> string) = closure34(v305, v326) - method5(v327, v328, v329) - let v330 : (int32 * string) = v305, v326 - v330 + let v363 : string = "" + v363 + | US3_0(v362) -> (* Some *) + v362 + let v366 : string = v354 |> Option.defaultValue v365 + let v367 : US0 = US0_0 + let v368 : (unit -> string) = closure31() + let v369 : (unit -> string) = closure32(v313, v366) + method5(v367, v368, v369) + let v370 : (int32 * string) = v313, v366 + v370 ) |> fun x -> x () ) () ) |> fun x -> _v48 <- Some x - let v331 : (int32 * string) = _v48.Value - let v332 : (int32 * string) = method49(v331) - let v333 : string = "v332 }}})" - Fable.Core.RustInterop.emitRustExpr () v333 - let v334 : string = "{{ //" - Fable.Core.RustInterop.emitRustExpr () v334 - let v335 : string = "__result" - let v336 : std_pin_Pin>>> = Fable.Core.RustInterop.emitRustExpr () v335 - let v337 : string = "futures_lite::future::block_on($0)" - let v338 : (int32 * string) = Fable.Core.RustInterop.emitRustExpr v336 v337 - let (a, b) = v338 - let v339 : int32 = a - let v340 : string = b - struct (v339, v340) + let v371 : (int32 * string) = _v48.Value + let v372 : (int32 * string) = method49(v371) + let v373 : string = "v372 }}})" + Fable.Core.RustInterop.emitRustExpr () v373 + let v374 : string = "{{ //" + Fable.Core.RustInterop.emitRustExpr () v374 + let v375 : string = "__result" + let v376 : std_pin_Pin>>> = Fable.Core.RustInterop.emitRustExpr () v375 + let v377 : string = "futures_lite::future::block_on($0)" + let v378 : (int32 * string) = Fable.Core.RustInterop.emitRustExpr v376 v377 + let (a, b) = v378 + let v379 : int32 = a + let v380 : string = b + struct (v379, v380) #endif #if FABLE_COMPILER_RUST && WASM - let struct (v341 : int32, v342 : string) = null |> unbox - struct (v341, v342) + let struct (v381 : int32, v382 : string) = null |> unbox + struct (v381, v382) #endif #if FABLE_COMPILER_RUST && CONTRACT - let struct (v343 : int32, v344 : string) = null |> unbox - struct (v343, v344) + let struct (v383 : int32, v384 : string) = null |> unbox + struct (v383, v384) #endif #if FABLE_COMPILER_TYPESCRIPT - let struct (v345 : int32, v346 : string) = null |> unbox - struct (v345, v346) + let struct (v385 : int32, v386 : string) = null |> unbox + struct (v385, v386) #endif #if FABLE_COMPILER_PYTHON - let struct (v347 : int32, v348 : string) = null |> unbox - struct (v347, v348) + let struct (v387 : int32, v388 : string) = null |> unbox + struct (v387, v388) #endif #else - let v349 : Async = method50(v0, v1, v2, v3, v4, v5, v6) - let v350 : bool = true - let mutable _v350 : struct (int32 * string) option = None + let v389 : Async = method50(v0, v1, v2, v3, v4, v5, v6) + let v390 : bool = true + let mutable _v390 : struct (int32 * string) option = None #if FABLE_COMPILER || WASM || CONTRACT #if FABLE_COMPILER_RUST && !WASM && !CONTRACT - let struct (v351 : int32, v352 : string) = null |> unbox - struct (v351, v352) + let struct (v391 : int32, v392 : string) = null |> unbox + struct (v391, v392) #endif #if FABLE_COMPILER_RUST && WASM - let struct (v353 : int32, v354 : string) = null |> unbox - struct (v353, v354) + let struct (v393 : int32, v394 : string) = null |> unbox + struct (v393, v394) #endif #if FABLE_COMPILER_RUST && CONTRACT - let struct (v355 : int32, v356 : string) = null |> unbox - struct (v355, v356) + let struct (v395 : int32, v396 : string) = null |> unbox + struct (v395, v396) #endif #if FABLE_COMPILER_TYPESCRIPT - let struct (v357 : int32, v358 : string) = null |> unbox - struct (v357, v358) + let struct (v397 : int32, v398 : string) = null |> unbox + struct (v397, v398) #endif #if FABLE_COMPILER_PYTHON - let struct (v359 : int32, v360 : string) = null |> unbox - struct (v359, v360) + let struct (v399 : int32, v400 : string) = null |> unbox + struct (v399, v400) #endif #else - let v361 : (Async -> struct (int32 * string)) = Async.RunSynchronously - let struct (v362 : int32, v363 : string) = v361 v349 - struct (v362, v363) + let v401 : (Async -> struct (int32 * string)) = Async.RunSynchronously + let struct (v402 : int32, v403 : string) = v401 v389 + struct (v402, v403) #endif - |> fun x -> _v350 <- Some x - let struct (v364 : int32, v365 : string) = _v350.Value - struct (v364, v365) + |> fun x -> _v390 <- Some x + let struct (v404 : int32, v405 : string) = _v390.Value + struct (v404, v405) #endif |> fun x -> _v7 <- Some x - let struct (v366 : int32, v367 : string) = _v7.Value - struct (v366, v367) -and closure42 () () : string = + let struct (v406 : int32, v407 : string) = _v7.Value + struct (v406, v407) +and closure40 () () : string = let v0 : string = "spiral_builder.run / repl error" v0 -and closure43 (v0 : uint8, v1 : uint8, v2 : string, v3 : int32) () : string = +and closure41 (v0 : uint8, v1 : uint8, v2 : string, v3 : int32) () : string = let v4 : (unit -> string) = closure6() let v5 : string = $"exit_code: {v3} / retry: {v1}/{v0} / repl_result: {v2} / {v4 ()}" v5 @@ -5566,42 +5572,42 @@ and method39 (v0 : string option, v1 : uint8, v2 : string, v3 : uint8) : struct struct (v14, v15) else let v19 : US0 = US0_1 - let v20 : (unit -> string) = closure42() - let v21 : (unit -> string) = closure43(v1, v3, v15, v14) + let v20 : (unit -> string) = closure40() + let v21 : (unit -> string) = closure41(v1, v3, v15, v14) method5(v19, v20, v21) let v22 : uint8 = v3 + 1uy method39(v0, v1, v2, v22) -and closure44 () () : string = +and closure42 () () : string = let v0 : string = "spiral_builder.run / dib / jupyter nbconvert" v0 -and closure45 (v0 : string, v1 : int32) () : string = +and closure43 (v0 : string, v1 : int32) () : string = let v2 : (unit -> string) = closure6() let v3 : string = $"exit_code: {v1} / jupyter_result.Length: {v0.Length} / {v2 ()}" v3 -and closure46 () () : string = +and closure44 () () : string = let v0 : string = "spiral_builder.run / dib / html cell ids" v0 -and closure47 (v0 : string, v1 : int32) () : string = +and closure45 (v0 : string, v1 : int32) () : string = let v2 : (unit -> string) = closure6() let v3 : string = $"exit_code: {v1} / pwsh_replace_html_result.Length: {v0.Length} / {v2 ()}" v3 and method52 (v0 : string) : string = v0 -and closure48 () () : string = +and closure46 () () : string = let v0 : string = "spiral_builder.run / dib" v0 -and closure49 (v0 : string, v1 : int32) () : string = +and closure47 (v0 : string, v1 : int32) () : string = let v2 : (unit -> string) = closure6() let v3 : string = $"exit_code: {v1} / result.Length: {v0.Length} / {v2 ()}" v3 -and closure50 () () : string = +and closure48 () () : string = let v0 : string = "spiral_builder.run" v0 -and closure51 (v0 : std_string_String) () : string = +and closure49 (v0 : std_string_String) () : string = let v1 : (unit -> string) = closure6() let v2 : string = $"subcommand: {v0} / {v1 ()}" v2 -and closure52 () struct (v0 : string, v1 : string) : (std_string_String * std_string_String) = +and closure50 () struct (v0 : string, v1 : string) : (std_string_String * std_string_String) = let v2 : string = "&*$0" let v3 : Ref = Fable.Core.RustInterop.emitRustExpr v0 v2 let v4 : string = "String::from($0)" @@ -5612,7 +5618,7 @@ and closure52 () struct (v0 : string, v1 : string) : (std_string_String * std_st let v9 : std_string_String = Fable.Core.RustInterop.emitRustExpr v7 v8 let v10 : (std_string_String * std_string_String) = v5, v9 v10 -and closure53 () (v0 : serde_json_Error) : string = +and closure51 () (v0 : serde_json_Error) : string = let v1 : bool = true let mutable _v1 : std_string_String option = None @@ -5651,7 +5657,7 @@ and closure53 () (v0 : serde_json_Error) : string = let v13 : string = Fable.Core.RustInterop.emitRustExpr v11 v12 v13 and method53 () : (serde_json_Error -> string) = - closure53() + closure51() and method54 (v0 : Result) : Result = v0 and method8 (v0 : clap_ArgMatches) : std_pin_Pin>>>> = @@ -6740,8 +6746,8 @@ inline_colorization = "~0.1" let v597 : bool = true let struct (v598 : int32, v599 : string) = method40(v591, v596, v592, v593, v594, v597, v595) let v600 : US0 = US0_1 - let v601 : (unit -> string) = closure44() - let v602 : (unit -> string) = closure45(v599, v598) + let v601 : (unit -> string) = closure42() + let v602 : (unit -> string) = closure43(v599, v598) method5(v600, v601, v602) let v603 : bool = v598 <> 0 if v603 then @@ -6762,8 +6768,8 @@ jupyter_result: {v599}" let v614 : bool = true let struct (v615 : int32, v616 : string) = method40(v608, v613, v609, v610, v611, v614, v612) let v617 : US0 = US0_1 - let v618 : (unit -> string) = closure46() - let v619 : (unit -> string) = closure47(v616, v615) + let v618 : (unit -> string) = closure44() + let v619 : (unit -> string) = closure45(v616, v615) method5(v617, v618, v619) let v620 : string = $"{v575}.html" let v621 : bool = true @@ -6988,8 +6994,8 @@ jupyter_result: {v599} pwsh_replace_html_result: {v616}" struct (v615, v684) let v689 : US0 = US0_1 - let v690 : (unit -> string) = closure48() - let v691 : (unit -> string) = closure49(v688, v687) + let v690 : (unit -> string) = closure46() + let v691 : (unit -> string) = closure47(v688, v687) method5(v689, v690, v691) let v692 : bool = v687 <> 0 if v692 then @@ -7000,8 +7006,8 @@ pwsh_replace_html_result: {v616}" [|struct (v695, v688)|] else let v697 : US0 = US0_1 - let v698 : (unit -> string) = closure50() - let v699 : (unit -> string) = closure51(v12) + let v698 : (unit -> string) = closure48() + let v699 : (unit -> string) = closure49(v12) method5(v697, v698, v699) [||] | _ -> @@ -7009,7 +7015,7 @@ pwsh_replace_html_result: {v616}" let v706 : string = "$0.to_vec()" let v707 : Vec = Fable.Core.RustInterop.emitRustExpr v705 v706 let v708 : string = "$0.into_iter().map(|x| $1(x.clone())).collect::>()" - let v709 : (struct (string * string) -> (std_string_String * std_string_String)) = closure52() + let v709 : (struct (string * string) -> (std_string_String * std_string_String)) = closure50() let v710 : Vec<(std_string_String * std_string_String)> = Fable.Core.RustInterop.emitRustExpr struct (v707, v709) v708 let v711 : string = "std::collections::BTreeMap::from_iter(v710.iter().map(|x| x.as_ref()).map(|&(ref k, ref v)| (k.clone(), v.clone())))" let v712 : std_collections_BTreeMap = Fable.Core.RustInterop.emitRustExpr () v711 diff --git a/apps/spiral/builder/spiral_builder.rs b/apps/spiral/builder/spiral_builder.rs index 20addfa6..b3ac51fd 100644 --- a/apps/spiral/builder/spiral_builder.rs +++ b/apps/spiral/builder/spiral_builder.rs @@ -6836,65 +6836,22 @@ mod module_7e2cd9e0 { pub fn method48(v0_1: std::thread::JoinHandle) -> std::thread::JoinHandle { v0_1 } - pub fn closure27(unitVar: (), v0_1: std::thread::JoinHandle) { - let v2: Result> = - std::thread::JoinHandle::join(v0_1); - let v4: bool = v2.unwrap(); - () - } - pub fn closure28(unitVar: (), v0_1: std::process::Output) -> Spiral_builder::US14 { + pub fn closure27(unitVar: (), v0_1: std::process::Output) -> Spiral_builder::US14 { Spiral_builder::US14::US14_0(v0_1) } - pub fn closure29(unitVar: (), v0_1: std::string::String) -> Spiral_builder::US14 { + pub fn closure28(unitVar: (), v0_1: std::string::String) -> Spiral_builder::US14 { Spiral_builder::US14::US14_1(v0_1) } - pub fn closure30(unitVar: (), unitVar_1: ()) -> string { + pub fn closure29(unitVar: (), unitVar_1: ()) -> string { string("runtime.execute_with_options / output error") } - pub fn closure31(v0_1: std::string::String, unitVar: ()) -> string { + pub fn closure30(v0_1: std::string::String, unitVar: ()) -> string { sprintf!("error: {} / {}", v0_1, Spiral_builder::closure6((), ())) } - pub fn closure32( - unitVar: (), - v0_1: std::sync::Arc< - std::sync::Mutex>>, - >, - ) -> string { - let v2: Result< - std::sync::MutexGuard< - std::sync::Arc>, - >, - std::sync::PoisonError< - std::sync::MutexGuard< - std::sync::Arc>, - >, - >, - > = v0_1.lock(); - let v4: std::sync::MutexGuard< - std::sync::Arc>, - > = v2.unwrap(); - let v6 = v4.iter(); - let v8: Vec = v6.collect::>(); - let v10: bool = true; - let _result = v8 - .into_iter() - .map(|x| { - //; - let v12: std::string::String = x; - let v14: string = fable_library_rust::String_::fromString(v12); - let v16: bool = true; - v14 - }) - .collect::>(); - let v18: Vec = _result; - let v22: LrcPtr> = - ofArray_1(fable_library_rust::NativeArray_::array_from(v18)); - join(Spiral_builder::method33(), toArray_1(v22)) - } - pub fn closure33(unitVar: (), unitVar_1: ()) -> string { + pub fn closure31(unitVar: (), unitVar_1: ()) -> string { string("runtime.execute_with_options / result") } - pub fn closure34(v0_1: i32, v1_1: string, unitVar: ()) -> string { + pub fn closure32(v0_1: i32, v1_1: string, unitVar: ()) -> string { sprintf!( "exit_code: {} / std_trace.Length: {} / {}", v0_1, @@ -6905,7 +6862,7 @@ mod module_7e2cd9e0 { pub fn method49(v0_: i32, v0__1: string) -> LrcPtr<(i32, string)> { LrcPtr::new((v0_, v0__1)) } - pub fn closure35( + pub fn closure33( v0_1: Option, v1_1: string, v2: Array<(string, string)>, @@ -6923,10 +6880,10 @@ mod module_7e2cd9e0 { pub fn method51() -> Func0 { Func0::new(move || Spiral_builder::closure6((), ())) } - pub fn closure37(v0_1: string, unitVar: ()) -> string { + pub fn closure35(v0_1: string, unitVar: ()) -> string { v0_1 } - pub fn closure36( + pub fn closure34( v0_1: Option, v1_1: string, v2: Array<(string, string)>, @@ -6952,7 +6909,7 @@ mod module_7e2cd9e0 { () } } - pub fn closure38( + pub fn closure36( v0_1: Option, v1_1: string, v2: Array<(string, string)>, @@ -6978,7 +6935,7 @@ mod module_7e2cd9e0 { () } } - pub fn closure39(v0_1: (), unitVar: ()) { + pub fn closure37(v0_1: (), unitVar: ()) { let _v1: MutCell> = MutCell::new(None::); { let x: bool = unbox::(&defaultOf()); @@ -6992,13 +6949,13 @@ mod module_7e2cd9e0 { () } } - pub fn closure40(v0_1: LrcPtr, unitVar: ()) -> string { + pub fn closure38(v0_1: LrcPtr, unitVar: ()) -> string { sprintf!( "execute_with_options_async / WaitForExitAsync / ex: {:?}", v0_1 ) } - pub fn closure41(v0_1: i32, v1_1: string, unitVar: ()) -> string { + pub fn closure39(v0_1: i32, v1_1: string, unitVar: ()) -> string { sprintf!( "execute_with_options_async / exit_code: {} / output.Length: {}", v0_1, @@ -7699,66 +7656,74 @@ mod module_7e2cd9e0 { bool, >, > = vec![v263, v258]; - v269.into_iter().for_each(|x| { Func1::new(move - |v_4: - std::thread::JoinHandle| - Spiral_builder::closure27((), - v_4))(x); }); - { - let v274: - Spiral_builder::US14 = - match &v257 - { - Err(v257_1_0) - => - Spiral_builder::closure29((), - v257_1_0.clone()), - Ok(v257_0_0) - => - Spiral_builder::closure28((), - v257_0_0.clone()), - }; - match &v274 + let v271: bool = true; + v269.into_iter().for_each(|x| { //; + let v273: + std::thread::JoinHandle = + x; + let v275: + Result> = + std::thread::JoinHandle::join(v273); + let v277: + bool = + v275.unwrap(); + let v279: + bool = + true; () }); + let v282: + Spiral_builder::US14 = + match &v257 { - Spiral_builder::US14::US14_0(v274_0_0) + Err(v257_1_0) => - { - let v277: - std::process::ExitStatus = - v274_0_0.clone().status; - let v279: - Option = - v277.code(); - (v279.unwrap(), - Spiral_builder::US2::US2_1, - Spiral_builder::US10::US10_0(v157)) - } - Spiral_builder::US14::US14_1(v274_1_0) + Spiral_builder::closure28((), + v257_1_0.clone()), + Ok(v257_0_0) => - { - let v284: - std::string::String = - v274_1_0.clone(); - Spiral_builder::method5(Spiral_builder::US0::US0_4, - Func0::new(move + Spiral_builder::closure27((), + v257_0_0.clone()), + }; + match &v282 + { + Spiral_builder::US14::US14_0(v282_0_0) + => + { + let v285: + std::process::ExitStatus = + v282_0_0.clone().status; + let v287: + Option = + v285.code(); + (v287.unwrap(), + Spiral_builder::US2::US2_1, + Spiral_builder::US10::US10_0(v157)) + } + Spiral_builder::US14::US14_1(v282_1_0) + => + { + let v292: + std::string::String = + v282_1_0.clone(); + Spiral_builder::method5(Spiral_builder::US0::US0_4, + Func0::new(move + || + Spiral_builder::closure29((), + ())), + Func0::new({ + let v292 + = + v292.clone(); + move || - Spiral_builder::closure30((), - ())), - Func0::new({ - let v284 - = - v284.clone(); - move - || - Spiral_builder::closure31(v284.clone(), - ()) - })); - (-2_i32, - Spiral_builder::US2::US2_0(v284.clone()), - Spiral_builder::US10::US10_1) - } + Spiral_builder::closure30(v292.clone(), + ()) + })); + (-2_i32, + Spiral_builder::US2::US2_0(v292.clone()), + Spiral_builder::US10::US10_1) } - } + } } } } @@ -7767,17 +7732,17 @@ mod module_7e2cd9e0 { } } Spiral_builder::US9::US9_1(v117_1_0) => { - let v296: std::string::String = v117_1_0.clone(); + let v304: std::string::String = v117_1_0.clone(); Spiral_builder::method5( Spiral_builder::US0::US0_4, Func0::new(move || { Spiral_builder::closure18((), ()) }), Func0::new({ - let v296 = v296.clone(); + let v304 = v304.clone(); move || { Spiral_builder::closure19( - v296.clone(), + v304.clone(), (), ) } @@ -7785,57 +7750,112 @@ mod module_7e2cd9e0 { ); ( -1_i32, - Spiral_builder::US2::US2_0(v296.clone()), + Spiral_builder::US2::US2_0(v304.clone()), Spiral_builder::US10::US10_1, ) } }; - let v307: Spiral_builder::US10 = patternInput_4.2.clone(); - let v306: Spiral_builder::US2 = patternInput_4.1.clone(); - let v305: i32 = patternInput_4.0.clone(); - let v314: Option = map_1( - Func1::new( - move |v_7: std::sync::Arc< - std::sync::Mutex< - std::sync::Arc< - std::sync::mpsc::Receiver< - std::string::String, + let v315: Spiral_builder::US10 = patternInput_4.2.clone(); + let v314: Spiral_builder::US2 = patternInput_4.1.clone(); + let v313: i32 = patternInput_4.0.clone(); + let v320: Option< + std::sync::Arc< + std::sync::Mutex< + std::sync::Arc< + std::sync::mpsc::Receiver< + std::string::String, + >, + >, + >, + >, + > = match &v315 { + Spiral_builder::US10::US10_0(v315_0_0) => { + Some(match &v315 { + Spiral_builder::US10::US10_0(x) => x.clone(), + _ => unreachable!(), + }) + } + _ => { + None::< + std::sync::Arc< + std::sync::Mutex< + std::sync::Arc< + std::sync::mpsc::Receiver< + std::string::String, + >, >, >, >, - >| { - Spiral_builder::closure32((), v_7) - }, - ), - match &v307 { - Spiral_builder::US10::US10_0(v307_0_0) => { - Some(match &v307 { - Spiral_builder::US10::US10_0(x) => { - x.clone() - } - _ => unreachable!(), - }) - } - _ => { - None::< + > + } + }; + let v322: bool = true; + let _result = v320.map(|x| { + //; + let v324: std::sync::Arc< + std::sync::Mutex< + std::sync::Arc< + std::sync::mpsc::Receiver< + std::string::String, + >, + >, + >, + > = x; + let v326: Result< + std::sync::MutexGuard< + std::sync::Arc< + std::sync::mpsc::Receiver< + std::string::String, + >, + >, + >, + std::sync::PoisonError< + std::sync::MutexGuard< std::sync::Arc< - std::sync::Mutex< - std::sync::Arc< - std::sync::mpsc::Receiver< - std::string::String, - >, - >, + std::sync::mpsc::Receiver< + std::string::String, >, >, - > - } - }, - ); - let v321: Spiral_builder::US3 = match &v306 { - Spiral_builder::US2::US2_0(v306_0_0) => { + >, + >, + > = v324.lock(); + let v328: std::sync::MutexGuard< + std::sync::Arc< + std::sync::mpsc::Receiver, + >, + > = v326.unwrap(); + let v330 = v328.iter(); + let v332: Vec = + v330.collect::>(); + let v334: bool = true; + let _result = v332 + .into_iter() + .map(|x| { + //; + let v336: std::string::String = x; + let v338: string = + fable_library_rust::String_::fromString( + v336, + ); + let v340: bool = true; + v338 + }) + .collect::>(); + let v342: Vec = _result; + let v346: LrcPtr> = ofArray_1( + fable_library_rust::NativeArray_::array_from(v342), + ); + let v350: string = + join(Spiral_builder::method33(), toArray_1(v346)); + let v352: bool = true; + v350 + }); + let v354: Option = _result; + let v361: Spiral_builder::US3 = match &v314 { + Spiral_builder::US2::US2_0(v314_0_0) => { Spiral_builder::US3::US3_0( fable_library_rust::String_::fromString( - match &v306 { + match &v314 { Spiral_builder::US2::US2_0(x) => { x.clone() } @@ -7846,43 +7866,43 @@ mod module_7e2cd9e0 { } _ => Spiral_builder::US3::US3_1, }; - let v326: string = defaultValue( - match &v321 { - Spiral_builder::US3::US3_0(v321_0_0) => match &v321 + let v366: string = defaultValue( + match &v361 { + Spiral_builder::US3::US3_0(v361_0_0) => match &v361 { Spiral_builder::US3::US3_0(x) => x.clone(), _ => unreachable!(), }, _ => string(""), }, - v314, + v354, ); Spiral_builder::method5( Spiral_builder::US0::US0_0, - Func0::new(move || Spiral_builder::closure33((), ())), + Func0::new(move || Spiral_builder::closure31((), ())), Func0::new({ - let v305 = v305.clone(); - let v326 = v326.clone(); + let v313 = v313.clone(); + let v366 = v366.clone(); move || { - Spiral_builder::closure34( - v305, - v326.clone(), + Spiral_builder::closure32( + v313, + v366.clone(), (), ) } }), ); - LrcPtr::new((v305, v326.clone())) + LrcPtr::new((v313, v366.clone())) } } }))(); _v48.set(Some(x_12)) } { - let v331: LrcPtr<(i32, string)> = getValue(_v48.get().clone()); - let v332: LrcPtr<(i32, string)> = - Spiral_builder::method49(v331.0.clone(), v331.1.clone()); - v332 + let v371: LrcPtr<(i32, string)> = getValue(_v48.get().clone()); + let v372: LrcPtr<(i32, string)> = + Spiral_builder::method49(v371.0.clone(), v371.1.clone()); + v372 } } }); @@ -7890,11 +7910,11 @@ mod module_7e2cd9e0 { { //; { - let v336: std::pin::Pin< + let v376: std::pin::Pin< Box>>, > = __result; - let v338: LrcPtr<(i32, string)> = futures_lite::future::block_on(v336); - _v7.set(Some((v338.0.clone(), v338.1.clone()))); + let v378: LrcPtr<(i32, string)> = futures_lite::future::block_on(v376); + _v7.set(Some((v378.0.clone(), v378.1.clone()))); { let patternInput_5: (i32, string) = getValue(_v7.get().clone()); (patternInput_5.0.clone(), patternInput_5.1.clone()) @@ -7904,10 +7924,10 @@ mod module_7e2cd9e0 { } } } - pub fn closure42(unitVar: (), unitVar_1: ()) -> string { + pub fn closure40(unitVar: (), unitVar_1: ()) -> string { string("spiral_builder.run / repl error") } - pub fn closure43(v0_1: u8, v1_1: u8, v2: string, v3: i32, unitVar: ()) -> string { + pub fn closure41(v0_1: u8, v1_1: u8, v2: string, v3: i32, unitVar: ()) -> string { sprintf!( "exit_code: {} / retry: {}/{} / repl_result: {} / {}", v3, @@ -7948,14 +7968,14 @@ mod module_7e2cd9e0 { } else { Spiral_builder::method5( Spiral_builder::US0::US0_1, - Func0::new(move || Spiral_builder::closure42((), ())), + Func0::new(move || Spiral_builder::closure40((), ())), Func0::new({ let v14 = v14.clone(); let v15 = v15.clone(); let v1_1 = v1_1.clone(); let v3 = v3.clone(); move || { - Spiral_builder::closure43( + Spiral_builder::closure41( v1_1.get().clone(), v3.get().clone(), v15.clone(), @@ -7980,10 +8000,10 @@ mod module_7e2cd9e0 { }); } } - pub fn closure44(unitVar: (), unitVar_1: ()) -> string { + pub fn closure42(unitVar: (), unitVar_1: ()) -> string { string("spiral_builder.run / dib / jupyter nbconvert") } - pub fn closure45(v0_1: string, v1_1: i32, unitVar: ()) -> string { + pub fn closure43(v0_1: string, v1_1: i32, unitVar: ()) -> string { sprintf!( "exit_code: {} / jupyter_result.Length: {} / {}", v1_1, @@ -7991,10 +8011,10 @@ mod module_7e2cd9e0 { Spiral_builder::closure6((), ()) ) } - pub fn closure46(unitVar: (), unitVar_1: ()) -> string { + pub fn closure44(unitVar: (), unitVar_1: ()) -> string { string("spiral_builder.run / dib / html cell ids") } - pub fn closure47(v0_1: string, v1_1: i32, unitVar: ()) -> string { + pub fn closure45(v0_1: string, v1_1: i32, unitVar: ()) -> string { sprintf!( "exit_code: {} / pwsh_replace_html_result.Length: {} / {}", v1_1, @@ -8005,10 +8025,10 @@ mod module_7e2cd9e0 { pub fn method52(v0_1: string) -> string { v0_1 } - pub fn closure48(unitVar: (), unitVar_1: ()) -> string { + pub fn closure46(unitVar: (), unitVar_1: ()) -> string { string("spiral_builder.run / dib") } - pub fn closure49(v0_1: string, v1_1: i32, unitVar: ()) -> string { + pub fn closure47(v0_1: string, v1_1: i32, unitVar: ()) -> string { sprintf!( "exit_code: {} / result.Length: {} / {}", v1_1, @@ -8016,17 +8036,17 @@ mod module_7e2cd9e0 { Spiral_builder::closure6((), ()) ) } - pub fn closure50(unitVar: (), unitVar_1: ()) -> string { + pub fn closure48(unitVar: (), unitVar_1: ()) -> string { string("spiral_builder.run") } - pub fn closure51(v0_1: std::string::String, unitVar: ()) -> string { + pub fn closure49(v0_1: std::string::String, unitVar: ()) -> string { sprintf!( "subcommand: {} / {}", v0_1, Spiral_builder::closure6((), ()) ) } - pub fn closure52( + pub fn closure50( unitVar: (), _arg: (string, string), ) -> LrcPtr<(std::string::String, std::string::String)> { @@ -8035,7 +8055,7 @@ mod module_7e2cd9e0 { let v7: &str = &*_arg.1.clone(); LrcPtr::new((v5, String::from(v7))) } - pub fn closure53(unitVar: (), v0_1: serde_json::Error) -> string { + pub fn closure51(unitVar: (), v0_1: serde_json::Error) -> string { let _v1: MutCell> = MutCell::new(None::); { @@ -8048,7 +8068,7 @@ mod module_7e2cd9e0 { } } pub fn method53() -> Func1 { - Func1::new(move |v: serde_json::Error| Spiral_builder::closure53((), v)) + Func1::new(move |v: serde_json::Error| Spiral_builder::closure51((), v)) } pub fn method54(v0_1: Result) -> Result { v0_1 @@ -9289,13 +9309,13 @@ mod module_7e2cd9e0 { Spiral_builder::method5( Spiral_builder::US0::US0_1, Func0::new(move || { - Spiral_builder::closure44((), ()) + Spiral_builder::closure42((), ()) }), Func0::new({ let v598 = v598.clone(); let v599 = v599.clone(); move || { - Spiral_builder::closure45( + Spiral_builder::closure43( v599.clone(), v598, (), @@ -9335,13 +9355,13 @@ mod module_7e2cd9e0 { Spiral_builder::method5( Spiral_builder::US0::US0_1, Func0::new(move || { - Spiral_builder::closure46((), ()) + Spiral_builder::closure44((), ()) }), Func0::new({ let v615 = v615.clone(); let v616 = v616.clone(); move || { - Spiral_builder::closure47( + Spiral_builder::closure45( v616.clone(), v615, (), @@ -9462,12 +9482,12 @@ mod module_7e2cd9e0 { let v687: i32 = patternInput_9.0.clone(); Spiral_builder::method5( Spiral_builder::US0::US0_1, - Func0::new(move || Spiral_builder::closure48((), ())), + Func0::new(move || Spiral_builder::closure46((), ())), Func0::new({ let v687 = v687.clone(); let v688 = v688.clone(); move || { - Spiral_builder::closure49( + Spiral_builder::closure47( v688.clone(), v687, (), @@ -9484,10 +9504,10 @@ mod module_7e2cd9e0 { } else { Spiral_builder::method5( Spiral_builder::US0::US0_1, - Func0::new(move || Spiral_builder::closure50((), ())), + Func0::new(move || Spiral_builder::closure48((), ())), Func0::new({ let v12 = v12.clone(); - move || Spiral_builder::closure51(v12.clone(), ()) + move || Spiral_builder::closure49(v12.clone(), ()) }), ); new_empty::<(string, string)>() @@ -9502,7 +9522,7 @@ mod module_7e2cd9e0 { .into_iter() .map(|x| { Func1::new(move |arg10_0040_9: (string, string)| { - Spiral_builder::closure52((), arg10_0040_9) + Spiral_builder::closure50((), arg10_0040_9) })(x.clone()) }) .collect::>(); diff --git a/lib/spiral/am'.dib b/lib/spiral/am'.dib index ebaabe44..2e4a0323 100644 --- a/lib/spiral/am'.dib +++ b/lib/spiral/am'.dib @@ -524,7 +524,9 @@ inl vec_for_each forall t. (fn : t -> ()) (ar : vec t) : () = #!spiral inl vec_for_each' forall t. (fn : t -> ()) (ar : vec t) : () = - !\\((ar, fn), $'"$0.into_iter().for_each(|x| { $1(x); })"') + (!\($'"true; !ar.into_iter().for_each(|x| { //"') : bool) |> ignore + inl x = fn !\($'"x"') + (!\($'"true; !x })"') : bool) |> ignore #!markdown diff --git a/lib/spiral/am'.spi b/lib/spiral/am'.spi index f6b0ef4c..2f223d12 100644 --- a/lib/spiral/am'.spi +++ b/lib/spiral/am'.spi @@ -233,7 +233,9 @@ inl vec_for_each forall t. (fn : t -> ()) (ar : vec t) : () = /// ## vec_for_each' inl vec_for_each' forall t. (fn : t -> ()) (ar : vec t) : () = - !\\((ar, fn), $'"$0.into_iter().for_each(|x| { $1(x); })"') + (!\($'"true; !ar.into_iter().for_each(|x| { //"') : bool) |> ignore + inl x = fn !\($'"x"') + (!\($'"true; !x })"') : bool) |> ignore /// ## vec_filter inl vec_filter forall t. (fn : t -> bool) (ar : vec t) : vec t = diff --git a/lib/spiral/runtime.dib b/lib/spiral/runtime.dib index 86d590fa..a0b6f120 100644 --- a/lib/spiral/runtime.dib +++ b/lib/spiral/runtime.dib @@ -1091,7 +1091,7 @@ let execute_with_options (options : execution_options) : i32 * string = inl std_trace = channel_receiver |> optionm'.box - |> optionm'.map'' fun channel_receiver => + |> optionm'.map' fun channel_receiver => channel_receiver |> threading.arc_mutex_lock |> resultm.unwrap' diff --git a/lib/spiral/runtime.spi b/lib/spiral/runtime.spi index 6a483922..1f3496e8 100644 --- a/lib/spiral/runtime.spi +++ b/lib/spiral/runtime.spi @@ -657,7 +657,7 @@ let execute_with_options (options : execution_options) : i32 * string = inl std_trace = channel_receiver |> optionm'.box - |> optionm'.map'' fun channel_receiver => + |> optionm'.map' fun channel_receiver => channel_receiver |> threading.arc_mutex_lock |> resultm.unwrap'