|
290 | 290 | (list $input (` (..read (, $input))))))
|
291 | 291 | list#conjoint))
|
292 | 292 |
|
293 |
| - (the (apply/* to_host self parameters abstraction) |
| 293 | + (the (of/* to_host self parameters abstraction) |
294 | 294 | (-> (-> Any java/lang/Object) net/sandius/rembulan/runtime/LuaFunction (List java/lang/Object) Any Any)
|
295 | 295 | (<| try.trusted
|
296 | 296 | (do [! try.monad]
|
|
344 | 344 | void
|
345 | 345 | "throws" [net/sandius/rembulan/runtime/ResolvedControlThrowable]
|
346 | 346 | (<| (..return %)
|
347 |
| - (apply/* to_host |
348 |
| - (ffi.is net/sandius/rembulan/runtime/LuaFunction self) |
349 |
| - (list (,, (static.literals function.identity (..input/* <arity>)))) |
350 |
| - lux_function)))] |
| 347 | + (of/* to_host |
| 348 | + (ffi.is net/sandius/rembulan/runtime/LuaFunction self) |
| 349 | + (list (,, (static.literals function.identity (..input/* <arity>)))) |
| 350 | + lux_function)))] |
351 | 351 |
|
352 | 352 | [1]
|
353 | 353 | [2]
|
|
362 | 362 | void
|
363 | 363 | "throws" [net/sandius/rembulan/runtime/ResolvedControlThrowable]
|
364 | 364 | (<| (..return %)
|
365 |
| - (apply/* to_host |
366 |
| - (ffi.is net/sandius/rembulan/runtime/LuaFunction self) |
367 |
| - (list.of_array {.#None} input/*) |
368 |
| - lux_function))) |
| 365 | + (of/* to_host |
| 366 | + (ffi.is net/sandius/rembulan/runtime/LuaFunction self) |
| 367 | + (list.of_array {.#None} input/*) |
| 368 | + lux_function))) |
369 | 369 | )))))
|
370 | 370 |
|
371 | 371 | (ffi.import library/lux/Function
|
|
519 | 519 | $b3 (_.var "b3")
|
520 | 520 | $b4 (_.var "b4")
|
521 | 521 | table/insert (function (_ in/0 in/1)
|
522 |
| - (_.apply (list in/0 in/1) |
523 |
| - (_.var "table.insert")))] |
| 522 | + (_.of (list in/0 in/1) |
| 523 | + (_.var "table.insert")))] |
524 | 524 | (_.function (_.var "utf8.char") (list $var_args)
|
525 | 525 | (all _.then
|
526 | 526 | (_.local/1 $buffer (_.array (list)))
|
|
535 | 535 | (<| (_.if (_.< (!integer "80") $v)
|
536 | 536 | ... Single-byte sequence
|
537 | 537 | (_.; (|> (_.var "string.char")
|
538 |
| - (_.apply (list $v)) |
| 538 | + (_.of (list $v)) |
539 | 539 | (table/insert $buffer))))
|
540 | 540 | (_.if (_.< (!integer "800") $v)
|
541 | 541 | ... Two-byte sequence
|
542 | 542 | (_.; (|> (_.var "string.char")
|
543 |
| - (_.apply (list (!&|< "C0" "1F" +6 $v) |
544 |
| - (!&| "80" "3F" $v))) |
| 543 | + (_.of (list (!&|< "C0" "1F" +6 $v) |
| 544 | + (!&| "80" "3F" $v))) |
545 | 545 | (table/insert $buffer))))
|
546 | 546 | (_.if (_.< (!integer "10000") $v)
|
547 | 547 | ... Three-byte sequence
|
548 | 548 | (_.; (|> (_.var "string.char")
|
549 |
| - (_.apply (list (!&|< "E0" "0F" +12 $v) |
550 |
| - (!&|< "80" "3F" +6 $v) |
551 |
| - (!&| "80" "3F" $v))) |
| 549 | + (_.of (list (!&|< "E0" "0F" +12 $v) |
| 550 | + (!&|< "80" "3F" +6 $v) |
| 551 | + (!&| "80" "3F" $v))) |
552 | 552 | (table/insert $buffer))))
|
553 | 553 | ... Four-byte sequence
|
554 | 554 | (_.; (|> (_.var "string.char")
|
555 |
| - (_.apply (list (!&|< "F0" "07" +18 $v) |
556 |
| - (!&|< "80" "3F" +12 $v) |
557 |
| - (!&|< "80" "3F" +6 $v) |
558 |
| - (!&| "80" "3F" $v))) |
| 555 | + (_.of (list (!&|< "F0" "07" +18 $v) |
| 556 | + (!&|< "80" "3F" +12 $v) |
| 557 | + (!&|< "80" "3F" +6 $v) |
| 558 | + (!&| "80" "3F" $v))) |
559 | 559 | (table/insert $buffer))))
|
560 | 560 | ))
|
561 |
| - (_.return (_.apply (list $buffer (_.string "")) (_.var "table.concat"))) |
| 561 | + (_.return (_.of (list $buffer (_.string "")) (_.var "table.concat"))) |
562 | 562 | ))))
|
563 | 563 |
|
564 | 564 | ... (the rembulan//str_rel_to_abs
|
|
578 | 578 | ... (_.> (_.length $string) $v))
|
579 | 579 | ... (_.; (_.error/2 (_.string "bad index to string (out of range)") (_.int +3))))
|
580 | 580 | ... (_.set (list (_.nth $k $args)) $v)))
|
581 |
| - ... (_.return (_.apply (list $args) (_.var "table.unpack"))) |
| 581 | + ... (_.return (_.of (list $args) (_.var "table.unpack"))) |
582 | 582 | ... ))))
|
583 | 583 |
|
584 | 584 | ... (the rembulan//decode
|
|
590 | 590 | ... $end (_.var "_end")]
|
591 | 591 | ... (<| (_.local_function $decode (list $string $start))
|
592 | 592 | ... (all _.then
|
593 |
| - ... (_.set (list $start) (_.apply (list $string (_.or (_.int +1) $start)) $str_rel_to_abs)) |
| 593 | + ... (_.set (list $start) (_.of (list $string (_.or (_.int +1) $start)) $str_rel_to_abs)) |
594 | 594 | ... (_.local/1 $b1 (_.do "byte" (list $start $start) $string))
|
595 | 595 | ... (<| (_.if (_.< (!integer "80") $b1)
|
596 | 596 | ... ... Single-byte sequence
|
|
630 | 630 | ... (_.if (_.> (_.length $string) $i)
|
631 | 631 | ... (_.return _.nil)
|
632 | 632 | ... (all _.then
|
633 |
| - ... (_.let (list $start $end) (_.apply (list $string $i) $decode)) |
| 633 | + ... (_.let (list $start $end) (_.of (list $string $i) $decode)) |
634 | 634 | ... (_.if (_.not $start)
|
635 | 635 | ... (_.; (_.error/2 (_.string "invalid UTF-8 code") (_.int +2)))
|
636 | 636 | ... (all _.then
|
|
649 | 649 | ... $size (_.var "size")]
|
650 | 650 | ... (_.function (_.var "utf8.len") (list $string $start $end)
|
651 | 651 | ... (all _.then
|
652 |
| - ... (_.set (list $start $end) (_.apply (list $string (_.or (_.int +1) $start) (_.or (_.int -1) $end)) $str_rel_to_abs)) |
| 652 | + ... (_.set (list $start $end) (_.of (list $string (_.or (_.int +1) $start) (_.or (_.int -1) $end)) $str_rel_to_abs)) |
653 | 653 | ... (_.local/1 $size (_.int +0))
|
654 | 654 | ... (_.repeat (_.>= $end $seq_end)
|
655 | 655 | ... (all _.then
|
656 |
| - ... (_.let (list $seq_start $seq_end) (_.apply (list $string $start) $decode)) |
| 656 | + ... (_.let (list $seq_start $seq_end) (_.of (list $string $start) $decode)) |
657 | 657 | ... (_.if (_.not $seq_start)
|
658 | 658 | ... ... Hit an invalid sequence!
|
659 | 659 | ... (_.return (_.multi (list (_.boolean false) $start)))
|
|
745 | 745 | (function (_ code)
|
746 | 746 | (do try.monad
|
747 | 747 | [lua_function (..load (_.code code))]
|
748 |
| - (let [output ("lua apply" lua_function)] |
| 748 | + (let [output ("lua of" lua_function)] |
749 | 749 | {try.#Success (if ("lua object nil?" output)
|
750 | 750 | []
|
751 | 751 | output)}))))]
|
|
858 | 858 | (the (lux_program context program)
|
859 | 859 | (Program _.Expression _.Statement)
|
860 | 860 | (let [$program (_.var (reference.artifact context))]
|
861 |
| - (_.; (_.apply (list (runtime.lux//program_args (_.var "arg")) |
862 |
| - runtime.unit) |
863 |
| - program)))) |
| 861 | + (_.; (_.of (list (runtime.lux//program_args (_.var "arg")) |
| 862 | + runtime.unit) |
| 863 | + program)))) |
864 | 864 |
|
865 | 865 | (the (declare_success! _)
|
866 | 866 | (-> Any (Future Any))
|
|
0 commit comments