eliscript 0.1.3 → 0.1.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/COPYING.RUNTIME +93 -0
- package/README.md +15 -3
- package/bin/eliscript-test +29 -0
- package/bootstrap/backends/README.md +5 -4
- package/bootstrap/backends/binary.eli +89 -22
- package/bootstrap/backends/capabilities.eli +9 -4
- package/bootstrap/backends/managed-layout.eli +93 -81
- package/bootstrap/backends/managed.eli +651 -125
- package/bootstrap/backends/native.eli +1791 -324
- package/bootstrap/backends/numeric.eli +71 -7
- package/bootstrap/backends/sha256.eli +165 -68
- package/bootstrap/backends/wasm.eli +461 -52
- package/bootstrap/compiler/analyzer.eli +692 -2
- package/bootstrap/compiler/compiler.eli +16 -3
- package/bootstrap/compiler/emitter.eli +80 -35
- package/bootstrap/compiler/project.eli +175 -1
- package/bootstrap/compiler/transient-analysis.eli +2 -2
- package/bootstrap/host/build.eli +1 -0
- package/bootstrap/host/build.mjs +1 -1
- package/bootstrap/host/build.mjs.map +1 -1
- package/bootstrap/host/bun.mjs +7 -9
- package/bootstrap/host/bun.mjs.map +1 -1
- package/bootstrap/host/check-cli-ground.eli +47 -5
- package/bootstrap/host/check-cli-ground.mjs +60 -19
- package/bootstrap/host/check-cli-ground.mjs.map +1 -1
- package/bootstrap/host/check-cli.mjs +41 -1
- package/bootstrap/host/check-cli.mjs.map +1 -1
- package/bootstrap/host/compiler-session.eli +136 -22
- package/bootstrap/host/eliscript-cli.mjs +1 -1
- package/bootstrap/host/eliscript-cli.mjs.map +1 -1
- package/bootstrap/host/evaluation-cli.eli +33 -1
- package/bootstrap/host/evaluation-cli.mjs +65 -28
- package/bootstrap/host/evaluation-cli.mjs.map +1 -1
- package/bootstrap/host/evaluation.eli +651 -42
- package/bootstrap/host/evaluation.mjs +884 -72
- package/bootstrap/host/evaluation.mjs.map +1 -1
- package/bootstrap/host/project-cli-ground.eli +6 -1
- package/bootstrap/host/project-cli-ground.mjs +33 -32
- package/bootstrap/host/project-cli-ground.mjs.map +1 -1
- package/bootstrap/host/project-cli.mjs +1 -1
- package/bootstrap/host/project-cli.mjs.map +1 -1
- package/bootstrap/host/project-ground.eli +266 -45
- package/bootstrap/host/project-ground.mjs +429 -159
- package/bootstrap/host/project-ground.mjs.map +1 -1
- package/bootstrap/host/project.mjs +30 -40
- package/bootstrap/host/project.mjs.map +1 -1
- package/bootstrap/host/test-cli.eli +379 -0
- package/bootstrap/host/test-cli.mjs +494 -0
- package/bootstrap/host/test-cli.mjs.map +1 -0
- package/browser/README.md +7 -0
- package/browser/host.mjs +21 -29
- package/browser/host.mjs.map +1 -1
- package/browser/worker.mjs +7 -9
- package/browser/worker.mjs.map +1 -1
- package/compiler/eliscript-analyzer.el +694 -0
- package/compiler/eliscript-cli.el +66 -22
- package/compiler/eliscript-emitter.el +67 -43
- package/compiler/eliscript-ir-emitter.el +71 -36
- package/compiler/eliscript-project.el +360 -80
- package/compiler/eliscript-transient-analysis.el +5 -5
- package/compiler/eliscript.el +6 -0
- package/dist/backends/binary.mjs +148 -26
- package/dist/backends/binary.mjs.map +1 -1
- package/dist/backends/capabilities.mjs +11 -4
- package/dist/backends/capabilities.mjs.map +1 -1
- package/dist/backends/elf.mjs +4 -4
- package/dist/backends/elf.mjs.map +1 -1
- package/dist/backends/managed-layout.mjs +53 -56
- package/dist/backends/managed-layout.mjs.map +1 -1
- package/dist/backends/managed.mjs +1116 -375
- package/dist/backends/managed.mjs.map +1 -1
- package/dist/backends/memory.mjs +24 -26
- package/dist/backends/memory.mjs.map +1 -1
- package/dist/backends/native.mjs +2529 -434
- package/dist/backends/native.mjs.map +1 -1
- package/dist/backends/numeric.mjs +140 -33
- package/dist/backends/numeric.mjs.map +1 -1
- package/dist/backends/optimize.mjs +2 -2
- package/dist/backends/optimize.mjs.map +1 -1
- package/dist/backends/regexp.mjs +33 -35
- package/dist/backends/regexp.mjs.map +1 -1
- package/dist/backends/sha256.mjs +159 -59
- package/dist/backends/sha256.mjs.map +1 -1
- package/dist/backends/wasm.mjs +609 -73
- package/dist/backends/wasm.mjs.map +1 -1
- package/dist/bootstrap/analyzer.mjs +1018 -2
- package/dist/bootstrap/analyzer.mjs.map +1 -1
- package/dist/bootstrap/compiler.mjs +30 -23
- package/dist/bootstrap/compiler.mjs.map +1 -1
- package/dist/bootstrap/emitter.mjs +206 -161
- package/dist/bootstrap/emitter.mjs.macro-origins.json +16 -16
- package/dist/bootstrap/emitter.mjs.map +1 -1
- package/dist/bootstrap/expander.mjs +27 -31
- package/dist/bootstrap/expander.mjs.map +1 -1
- package/dist/bootstrap/ir.mjs +22 -24
- package/dist/bootstrap/ir.mjs.map +1 -1
- package/dist/bootstrap/project.mjs +246 -1
- package/dist/bootstrap/project.mjs.map +1 -1
- package/dist/bootstrap/reader.mjs +2 -2
- package/dist/bootstrap/reader.mjs.map +1 -1
- package/dist/bootstrap/source-map.mjs +34 -48
- package/dist/bootstrap/source-map.mjs.map +1 -1
- package/dist/bootstrap/transient-analysis.mjs +2 -2
- package/dist/bootstrap/transient-analysis.mjs.map +1 -1
- package/dist/browser/compiler.js +106 -106
- package/dist/browser/host.mjs +21 -29
- package/dist/browser/loader.js +1 -1
- package/dist/browser/worker.mjs +95 -95
- package/dist/compiler-artifact.json +1 -1
- package/dist/host/compiler-session.mjs +405 -228
- package/dist/host/compiler-session.mjs.map +1 -1
- package/dist/host/compiler-tools.mjs +44 -46
- package/dist/host/compiler-tools.mjs.map +1 -1
- package/dist/literal-sources/runtime/core/array-map.eli +45 -0
- package/dist/literal-sources/runtime/core/collection-internals.eli +22 -2
- package/dist/literal-sources/runtime/core/collection.eli +282 -23
- package/dist/literal-sources/runtime/core/data-text.eli +196 -13
- package/dist/literal-sources/runtime/core/data.eli +1 -1
- package/dist/literal-sources/runtime/core/identifier.eli +1 -1
- package/dist/literal-sources/runtime/core/lazy-sequence.eli +822 -44
- package/dist/literal-sources/runtime/core/list.eli +1 -1
- package/dist/literal-sources/runtime/core/map.eli +1 -1
- package/dist/literal-sources/runtime/core/metadata-internals.eli +2 -2
- package/dist/literal-sources/runtime/core/metadata.eli +2 -2
- package/dist/literal-sources/{stdlib/core/object.eli → runtime/core/object-impl.eli} +6 -6
- package/dist/literal-sources/runtime/core/object.eli +1 -1
- package/dist/literal-sources/runtime/core/order.eli +3 -3
- package/dist/literal-sources/runtime/core/persistent-kind.eli +1 -1
- package/dist/literal-sources/{stdlib/core/protocol.eli → runtime/core/protocol-impl.eli} +2 -2
- package/dist/literal-sources/runtime/core/protocol.eli +5 -3
- package/dist/literal-sources/runtime/core/queue.eli +1 -1
- package/dist/literal-sources/runtime/core/record.eli +3 -3
- package/dist/literal-sources/runtime/core/regex.eli +2 -2
- package/dist/literal-sources/runtime/core/sequence.eli +1 -1
- package/dist/literal-sources/runtime/core/set-algebra.eli +1 -1
- package/dist/literal-sources/runtime/core/set.eli +1 -1
- package/dist/literal-sources/runtime/core/sorted.eli +4 -4
- package/dist/literal-sources/{stdlib/core/text.eli → runtime/core/text-impl.eli} +2 -2
- package/dist/literal-sources/runtime/core/text.eli +1 -1
- package/dist/literal-sources/runtime/core/transducer.eli +24 -2
- package/dist/literal-sources/runtime/core/transient.eli +7 -5
- package/dist/literal-sources/runtime/core/type.eli +1 -1
- package/dist/literal-sources/runtime/core/value-internals.eli +3 -3
- package/dist/literal-sources/runtime/core/value.eli +2 -2
- package/dist/literal-sources/runtime/core/vector.eli +5 -2
- package/dist/literal-sources/{stdlib → runtime/managed}/managed-literal-protocols.eli +100 -34
- package/dist/literal-sources/{stdlib → runtime/managed}/managed-literals.eli +406 -81
- package/{stdlib → dist/literal-sources/runtime/managed}/managed-queue-state.eli +1 -1
- package/{stdlib → dist/literal-sources/runtime/managed}/managed-sorted-state.eli +1 -1
- package/dist/literal-sources/runtime/managed/managed-transient-state.eli +1206 -0
- package/{stdlib → dist/literal-sources/runtime/managed}/managed-value-state.eli +30 -6
- package/dist/literal-sources/{stdlib → runtime/managed}/managed-vector-view-state.eli +1 -1
- package/dist/literal-sources/runtime/wire/http-rpc.eli +1 -1
- package/dist/literal-sources/runtime/wire/markdown.eli +1 -1
- package/dist/literal-sources/runtime/wire/schema.eli +1 -1
- package/dist/literal-sources/stdlib/bit.eli +89 -1
- package/dist/literal-sources/stdlib/data.eli +522 -0
- package/dist/literal-sources/stdlib/interop/object.eli +39 -0
- package/dist/literal-sources/stdlib/persistent-list.eli +60 -21
- package/dist/literal-sources/stdlib/persistent-map.eli +335 -324
- package/dist/literal-sources/stdlib/persistent-set.eli +8 -6
- package/dist/literal-sources/stdlib/persistent-vector.eli +18 -18
- package/dist/literal-sources/stdlib/protocol.eli +63 -0
- package/{stdlib/core → dist/literal-sources/stdlib}/set.eli +8 -8
- package/dist/literal-sources/stdlib/string.eli +362 -0
- package/dist/runtime/lisp/async-runtime.mjs +55 -59
- package/dist/runtime/lisp/async-runtime.mjs.map +1 -1
- package/dist/runtime/lisp/builtins.mjs +232 -280
- package/dist/runtime/lisp/builtins.mjs.map +1 -1
- package/dist/runtime/lisp/cli.mjs +159 -167
- package/dist/runtime/lisp/cli.mjs.map +1 -1
- package/dist/runtime/lisp/compiler.mjs +359 -419
- package/dist/runtime/lisp/compiler.mjs.map +1 -1
- package/dist/runtime/lisp/core.mjs +24 -24
- package/dist/runtime/lisp/core.mjs.map +1 -1
- package/dist/runtime/lisp/evaluator.mjs +315 -385
- package/dist/runtime/lisp/evaluator.mjs.map +1 -1
- package/dist/runtime/lisp/extensions.mjs +85 -103
- package/dist/runtime/lisp/extensions.mjs.map +1 -1
- package/dist/runtime/lisp/host-io.mjs +106 -122
- package/dist/runtime/lisp/host-io.mjs.map +1 -1
- package/dist/runtime/lisp/io-worker.mjs +117 -135
- package/dist/runtime/lisp/io-worker.mjs.map +1 -1
- package/dist/runtime/lisp/keymap.mjs +5 -5
- package/dist/runtime/lisp/keymap.mjs.map +1 -1
- package/dist/runtime/lisp/macros-forms.mjs +49 -51
- package/dist/runtime/lisp/macros-forms.mjs.map +1 -1
- package/dist/runtime/lisp/reader-format.mjs +31 -31
- package/dist/runtime/lisp/reader-format.mjs.map +1 -1
- package/dist/runtime/lisp/regexp-buffer.mjs +9 -9
- package/dist/runtime/lisp/regexp-buffer.mjs.map +1 -1
- package/dist/runtime/math.mjs +32 -38
- package/dist/runtime/math.mjs.map +1 -1
- package/dist/runtime/number-radix.mjs +5 -7
- package/dist/runtime/number-radix.mjs.map +1 -1
- package/dist/runtime/primitives.mjs +81 -46
- package/dist/runtime/primitives.mjs.macro-origins.json +294 -44
- package/dist/runtime/primitives.mjs.map +1 -1
- package/dist/runtime/unicode-case.mjs +6 -6
- package/dist/runtime/unicode-case.mjs.map +1 -1
- package/dist/runtime.eli +3068 -1882
- package/dist/stage3-release.json +1 -1
- package/dist/stdlib/async.mjs +1838 -0
- package/dist/stdlib/bit.mjs +116 -0
- package/dist/stdlib/collection.mjs +193 -0
- package/dist/stdlib/core.mjs +28 -0
- package/dist/stdlib/data-text.mjs +54 -0
- package/dist/stdlib/data.mjs +601 -0
- package/dist/stdlib/devtools.mjs +565 -0
- package/dist/stdlib/diff.mjs +180 -0
- package/dist/stdlib/fn.mjs +164 -0
- package/dist/stdlib/hierarchy.mjs +189 -0
- package/dist/stdlib/identifier.mjs +33 -0
- package/dist/stdlib/interop/js.mjs +706 -0
- package/dist/stdlib/interop/object.mjs +40 -0
- package/dist/stdlib/json.mjs +843 -0
- package/dist/stdlib/lazy-sequence.mjs +117 -0
- package/dist/stdlib/math.mjs +386 -0
- package/dist/stdlib/meta.mjs +21 -0
- package/dist/stdlib/multimethod.mjs +345 -0
- package/dist/stdlib/numeric.mjs +327 -0
- package/dist/stdlib/order.mjs +194 -0
- package/dist/stdlib/persistent-list.mjs +171 -0
- package/dist/stdlib/persistent-map.mjs +781 -0
- package/dist/stdlib/persistent-queue.mjs +44 -0
- package/dist/stdlib/persistent-set.mjs +225 -0
- package/dist/stdlib/persistent-vector.mjs +316 -0
- package/dist/stdlib/portable/data-text.mjs +1094 -0
- package/dist/stdlib/portable/data.mjs +62 -0
- package/dist/stdlib/portable/identifier.mjs +179 -0
- package/dist/stdlib/portable/metadata.mjs +63 -0
- package/dist/stdlib/portable/object.mjs +140 -0
- package/dist/stdlib/portable/sequence.mjs +142 -0
- package/dist/stdlib/portable/text.mjs +111 -0
- package/dist/stdlib/pprint.mjs +807 -0
- package/dist/stdlib/protocol.mjs +61 -0
- package/dist/stdlib/record.mjs +25 -0
- package/dist/stdlib/regex.mjs +115 -0
- package/dist/stdlib/result.mjs +198 -0
- package/dist/stdlib/schema.mjs +2828 -0
- package/dist/stdlib/seq.mjs +913 -0
- package/dist/stdlib/set.mjs +317 -0
- package/dist/stdlib/sorted.mjs +56 -0
- package/dist/stdlib/state.mjs +451 -0
- package/dist/stdlib/string.mjs +494 -0
- package/dist/stdlib/tap.mjs +187 -0
- package/dist/stdlib/test.mjs +669 -0
- package/dist/stdlib/time.mjs +522 -0
- package/dist/stdlib/transducer.mjs +85 -0
- package/dist/stdlib/transient.mjs +32 -0
- package/dist/stdlib/type.mjs +28 -0
- package/dist/stdlib/uuid.mjs +377 -0
- package/dist/stdlib/value.mjs +334 -0
- package/dist/stdlib/walk.mjs +243 -0
- package/dist/stdlib/wire/gepo.mjs +28 -0
- package/dist/stdlib/wire/mdp.mjs +13 -0
- package/dist/stdlib/wire/mds.mjs +10 -0
- package/dist/stdlib/zipper.mjs +1025 -0
- package/editor/README.md +15 -0
- package/editor/eliscript-data.el +221 -8
- package/editor/eliscript-mode.el +207 -48
- package/editor/eliscript-runtime.el +6 -3
- package/package.json +49 -15
- package/platform/README.md +6 -0
- package/platform/browser.mjs +10 -12
- package/platform/browser.mjs.map +1 -1
- package/runtime/README.md +12 -5
- package/runtime/core/array-map.eli +538 -0
- package/runtime/core/array-map.mjs +651 -0
- package/runtime/core/array-map.mjs.map +1 -0
- package/runtime/core/collection-internals.eli +85 -33
- package/runtime/core/collection-internals.mjs +245 -193
- package/runtime/core/collection-internals.mjs.map +1 -1
- package/runtime/core/collection.eli +105 -3
- package/runtime/core/collection.mjs +190 -53
- package/runtime/core/collection.mjs.map +1 -1
- package/runtime/core/data-text.eli +224 -16
- package/runtime/core/data-text.mjs +345 -83
- package/runtime/core/data-text.mjs.map +1 -1
- package/runtime/core/data.eli +50 -33
- package/runtime/core/data.mjs +72 -36
- package/runtime/core/data.mjs.map +1 -1
- package/runtime/core/identifier.mjs +15 -19
- package/runtime/core/identifier.mjs.map +1 -1
- package/runtime/core/lazy-sequence.eli +885 -15
- package/runtime/core/lazy-sequence.mjs +1265 -38
- package/runtime/core/lazy-sequence.mjs.map +1 -1
- package/runtime/core/map-internals.eli +209 -1
- package/runtime/core/map-internals.mjs +359 -71
- package/runtime/core/map-internals.mjs.map +1 -1
- package/runtime/core/map.eli +75 -7
- package/runtime/core/map.mjs +122 -47
- package/runtime/core/map.mjs.map +1 -1
- package/{stdlib/core/object.eli → runtime/core/object-impl.eli} +6 -6
- package/runtime/core/object-impl.mjs +5 -5
- package/runtime/core/object-impl.mjs.map +1 -1
- package/runtime/core/order.eli +15 -3
- package/runtime/core/order.mjs +23 -8
- package/runtime/core/order.mjs.map +1 -1
- package/runtime/core/persistent-kind.mjs +9 -13
- package/runtime/core/persistent-kind.mjs.map +1 -1
- package/runtime/core/protocol-error.mjs +9 -11
- package/runtime/core/protocol-error.mjs.map +1 -1
- package/{stdlib/core/protocol.eli → runtime/core/protocol-impl.eli} +2 -2
- package/runtime/core/protocol-impl.mjs +10 -10
- package/runtime/core/protocol-impl.mjs.map +1 -1
- package/runtime/core/queue.mjs +14 -16
- package/runtime/core/queue.mjs.map +1 -1
- package/runtime/core/record.eli +2 -2
- package/runtime/core/record.mjs +13 -17
- package/runtime/core/record.mjs.map +1 -1
- package/runtime/core/regex.mjs +18 -22
- package/runtime/core/regex.mjs.map +1 -1
- package/runtime/core/sequence.eli +33 -31
- package/runtime/core/sequence.mjs +60 -93
- package/runtime/core/sequence.mjs.map +1 -1
- package/runtime/core/set.eli +53 -27
- package/runtime/core/set.mjs +113 -82
- package/runtime/core/set.mjs.map +1 -1
- package/runtime/core/sorted.mjs +91 -108
- package/runtime/core/sorted.mjs.map +1 -1
- package/{stdlib/core/text.eli → runtime/core/text-impl.eli} +2 -2
- package/runtime/core/text-impl.mjs +1 -1
- package/runtime/core/text-impl.mjs.map +1 -1
- package/runtime/core/transducer.eli +24 -0
- package/runtime/core/transducer.mjs +27 -1
- package/runtime/core/transducer.mjs.map +1 -1
- package/runtime/core/transient-internals.eli +12 -4
- package/runtime/core/transient-internals.mjs +19 -6
- package/runtime/core/transient-internals.mjs.map +1 -1
- package/runtime/core/transient.eli +31 -0
- package/runtime/core/transient.mjs +33 -2
- package/runtime/core/transient.mjs.map +1 -1
- package/runtime/core/value-internals.mjs +29 -35
- package/runtime/core/value-internals.mjs.map +1 -1
- package/runtime/core/vector.eli +73 -20
- package/runtime/core/vector.mjs +159 -156
- package/runtime/core/vector.mjs.map +1 -1
- package/runtime/literals.eli +16 -9
- package/runtime/literals.mjs +25 -9
- package/runtime/literals.mjs.map +1 -1
- package/{stdlib → runtime/managed}/managed-literal-protocols.eli +100 -34
- package/{stdlib → runtime/managed}/managed-literals.eli +406 -81
- package/{dist/literal-sources/stdlib → runtime/managed}/managed-queue-state.eli +1 -1
- package/runtime/managed/managed-runtime-array-map.eli +45 -0
- package/{stdlib → runtime/managed}/managed-runtime-collection-internals.eli +22 -2
- package/{stdlib → runtime/managed}/managed-runtime-collection.eli +282 -23
- package/{stdlib → runtime/managed}/managed-runtime-data-text.eli +196 -13
- package/{stdlib → runtime/managed}/managed-runtime-data.eli +1 -1
- package/{stdlib → runtime/managed}/managed-runtime-identifier.eli +1 -1
- package/runtime/managed/managed-runtime-lazy-sequence.eli +935 -0
- package/{stdlib → runtime/managed}/managed-runtime-list.eli +1 -1
- package/{stdlib → runtime/managed}/managed-runtime-map.eli +1 -1
- package/{stdlib → runtime/managed}/managed-runtime-metadata-internals.eli +2 -2
- package/{stdlib → runtime/managed}/managed-runtime-metadata.eli +2 -2
- package/{stdlib → runtime/managed}/managed-runtime-object.eli +1 -1
- package/{stdlib → runtime/managed}/managed-runtime-order.eli +3 -3
- package/{stdlib → runtime/managed}/managed-runtime-persistent-kind.eli +1 -1
- package/{stdlib → runtime/managed}/managed-runtime-protocol.eli +5 -3
- package/{stdlib → runtime/managed}/managed-runtime-queue.eli +1 -1
- package/{stdlib → runtime/managed}/managed-runtime-record.eli +3 -3
- package/{stdlib → runtime/managed}/managed-runtime-regex.eli +2 -2
- package/{stdlib → runtime/managed}/managed-runtime-sequence.eli +1 -1
- package/{stdlib → runtime/managed}/managed-runtime-set-algebra.eli +1 -1
- package/{stdlib → runtime/managed}/managed-runtime-set.eli +1 -1
- package/{stdlib → runtime/managed}/managed-runtime-sorted.eli +4 -4
- package/{stdlib → runtime/managed}/managed-runtime-text.eli +1 -1
- package/{stdlib → runtime/managed}/managed-runtime-transducer.eli +24 -2
- package/{stdlib → runtime/managed}/managed-runtime-transient.eli +7 -5
- package/{stdlib → runtime/managed}/managed-runtime-type.eli +1 -1
- package/{stdlib → runtime/managed}/managed-runtime-value-internals.eli +3 -3
- package/{stdlib → runtime/managed}/managed-runtime-value.eli +2 -2
- package/{stdlib → runtime/managed}/managed-runtime-vector.eli +5 -2
- package/{dist/literal-sources/stdlib → runtime/managed}/managed-sorted-state.eli +1 -1
- package/runtime/managed/managed-transient-state.eli +1206 -0
- package/{dist/literal-sources/stdlib → runtime/managed}/managed-value-state.eli +30 -6
- package/{stdlib → runtime/managed}/managed-vector-view-state.eli +1 -1
- package/{stdlib → runtime/managed}/managed-wire-http-rpc.eli +1 -1
- package/{stdlib → runtime/managed}/managed-wire-markdown.eli +1 -1
- package/{stdlib → runtime/managed}/managed-wire-schema.eli +1 -1
- package/runtime/math.mjs +32 -38
- package/runtime/math.mjs.map +1 -1
- package/runtime/number-radix.mjs +5 -7
- package/runtime/number-radix.mjs.map +1 -1
- package/runtime/primitives.eli +19 -6
- package/runtime/primitives.mjs +81 -46
- package/runtime/primitives.mjs.map +1 -1
- package/runtime/source-mapping.mjs +17 -23
- package/runtime/source-mapping.mjs.map +1 -1
- package/runtime/testing/map.eli +70 -41
- package/runtime/testing/map.mjs +57 -34
- package/runtime/testing/map.mjs.map +1 -1
- package/runtime/unicode-case.mjs +6 -6
- package/runtime/unicode-case.mjs.map +1 -1
- package/runtime/wire/http-rpc.mjs +12 -18
- package/runtime/wire/http-rpc.mjs.map +1 -1
- package/runtime/wire/markdown.mjs +42 -42
- package/runtime/wire/markdown.mjs.map +1 -1
- package/runtime/wire/schema.mjs +13 -13
- package/runtime/wire/schema.mjs.map +1 -1
- package/runtime/worker-value-codec.mjs +5 -7
- package/runtime/worker-value-codec.mjs.map +1 -1
- package/runtime/worker-value-stream.mjs +128 -135
- package/runtime/worker-value-stream.mjs.map +1 -1
- package/runtime/worker.mjs +75 -89
- package/runtime/worker.mjs.map +1 -1
- package/stdlib/README.md +25 -18
- package/stdlib/async.eli +1245 -0
- package/stdlib/bit.eli +89 -1
- package/stdlib/bit.mjs +89 -2
- package/stdlib/bit.mjs.map +1 -1
- package/stdlib/{core/collection.eli → collection.eli} +39 -4
- package/stdlib/core.eli +956 -0
- package/stdlib/data-text.eli +62 -1091
- package/stdlib/data.eli +517 -37
- package/stdlib/devtools.eli +399 -0
- package/stdlib/diff.eli +134 -0
- package/stdlib/{function.eli → fn.eli} +1 -1
- package/stdlib/identifier.eli +21 -136
- package/stdlib/interop/object.eli +39 -0
- package/stdlib/{core/lazy-sequence.eli → lazy-sequence.eli} +28 -2
- package/stdlib/math.eli +267 -0
- package/stdlib/{core/metadata.eli → meta.eli} +2 -2
- package/stdlib/{core/order.eli → order.eli} +6 -6
- package/stdlib/persistent-list.eli +60 -21
- package/stdlib/persistent-map.eli +335 -324
- package/stdlib/persistent-set.eli +8 -6
- package/stdlib/persistent-vector.eli +18 -18
- package/stdlib/portable/data-text.eli +1092 -0
- package/stdlib/portable/data.eli +42 -0
- package/stdlib/portable/identifier.eli +147 -0
- package/stdlib/{metadata.eli → portable/metadata.eli} +5 -5
- package/stdlib/{object.eli → portable/object.eli} +1 -1
- package/stdlib/{sequence.eli → portable/sequence.eli} +1 -1
- package/stdlib/{text.eli → portable/text.eli} +1 -1
- package/stdlib/pprint.eli +588 -0
- package/stdlib/protocol.eli +63 -0
- package/stdlib/{core/record.eli → record.eli} +2 -2
- package/stdlib/regex.eli +70 -0
- package/stdlib/result.eli +53 -44
- package/stdlib/schema.eli +1886 -0
- package/stdlib/{core/seq.eli → seq.eli} +97 -90
- package/{dist/literal-sources/stdlib/core → stdlib}/set.eli +8 -8
- package/stdlib/{core/sorted.eli → sorted.eli} +2 -2
- package/stdlib/{state/atom.eli → state.eli} +137 -7
- package/stdlib/string.eli +362 -0
- package/stdlib/tap.eli +135 -0
- package/stdlib/test.eli +566 -0
- package/stdlib/time.eli +419 -0
- package/stdlib/{core/transducer.eli → transducer.eli} +4 -2
- package/stdlib/{core/transient.eli → transient.eli} +11 -5
- package/stdlib/{core/type.eli → type.eli} +2 -2
- package/stdlib/uuid.eli +288 -0
- package/stdlib/{core/walk.eli → walk.eli} +6 -6
- package/stdlib/{gepo.eli → wire/gepo.eli} +2 -2
- package/stdlib/{mdp.eli → wire/mdp.eli} +2 -2
- package/stdlib/{mds.eli → wire/mds.eli} +2 -2
- package/stdlib/{core/zipper.eli → zipper.eli} +179 -138
- package/tests/helpers/wasm-managed-math-node.mjs +495 -582
- package/tools/acceptance/check-ground.mjs +106 -132
- package/tools/acceptance/check.mjs +16 -16
- package/tools/acceptance/retained-performance-snapshot.mjs +265 -149
- package/tools/acceptance/retained-soak.mjs +5 -7
- package/tools/acceptance/retained-transient.mjs +5 -7
- package/tools/backends/build.mjs +373 -95
- package/tools/backends/compiler-bootstrap.mjs +271 -317
- package/tools/backends/compiler-browser.mjs +7 -9
- package/tools/backends/compiler-build.mjs +77 -97
- package/tools/backends/compiler-cli-ground.mjs +47 -47
- package/tools/backends/compiler-data-transport.mjs +27 -31
- package/tools/backends/compiler-host-iteration.mjs +13 -21
- package/tools/backends/compiler-host-record.mjs +28 -34
- package/tools/backends/compiler-metadata.mjs +145 -53
- package/tools/backends/compiler-package-ground.mjs +39 -47
- package/tools/backends/compiler-package-loader.mjs +164 -206
- package/tools/backends/compiler-session.mjs +432 -324
- package/tools/backends/compiler-worker.mjs +79 -89
- package/tools/backends/dist/bootstrap-js-stages.mjs +17 -19
- package/tools/backends/dist/bootstrap-js-stages.mjs.map +1 -1
- package/tools/backends/dist/managed-ir-inventory.mjs +1 -1
- package/tools/backends/dist/managed-ir-inventory.mjs.map +1 -1
- package/tools/backends/dist/release-cli.mjs +151 -22
- package/tools/backends/dist/release-cli.mjs.map +1 -1
- package/tools/backends/dist/run-artifact.mjs +54 -76
- package/tools/backends/dist/run-artifact.mjs.map +1 -1
- package/tools/backends/managed-foreign-binding.mjs +370 -114
- package/tools/backends/managed-host-ground.mjs +14 -17
- package/tools/backends/managed-host-lifecycle.mjs +42 -53
- package/tools/backends/managed-host-object-realm.mjs +121 -111
- package/tools/backends/managed-host-proxy.mjs +5 -7
- package/tools/backends/managed-host-runtime.mjs +6295 -4350
- package/tools/backends/managed-host.mjs +234 -188
- package/tools/backends/managed-layout.mjs +53 -56
- package/tools/backends/managed-module-graph-ground.mjs +488 -568
- package/tools/backends/managed-module-graph.mjs +62 -76
- package/tools/backends/managed-runtime-host-ground.mjs +352 -400
- package/tools/backends/managed-runtime.mjs +227 -266
- package/tools/backends/managed-source-view-ground.mjs +165 -161
- package/tools/backends/managed-source-view.mjs +415 -154
- package/tools/backends/native-managed-runtime.mjs +96 -138
- package/tools/backends/native-memory.mjs +1122 -742
- package/tools/backends/native-node-ffi.mjs +2439 -0
- package/tools/backends/native-node-memory.mjs +793 -383
- package/tools/backends/native-node-runner.mjs +1458 -579
- package/tools/backends/native-node-watchdog.mjs +12 -14
- package/tools/backends/native-node-worker.mjs +46 -50
- package/tools/backends/stage3-targets.mjs +2 -2
- package/tools/bootstrap-runtime.el +4 -4
- package/tools/collections/transient-builder-benchmark.mjs +17 -17
- package/tools/project/check-cli.eli +27 -3
- package/tools/project/project-cli.eli +1 -1
- package/tools/testing/maintained-suite-source.mjs +5 -7
- package/tools/testing/maintained-suite-source.mjs.map +1 -1
- package/dist/literal-sources/stdlib/core/data.eli +0 -306
- package/dist/literal-sources/stdlib/managed-transient-state.eli +0 -353
- package/stdlib/core/data-text.eli +0 -16
- package/stdlib/core/data.eli +0 -306
- package/stdlib/core/identifier.eli +0 -32
- package/stdlib/core/regex.eli +0 -17
- package/stdlib/deferred.eli +0 -70
- package/stdlib/managed-runtime-lazy-sequence.eli +0 -157
- package/stdlib/managed-transient-state.eli +0 -353
- /package/{stdlib → runtime/managed}/managed-protocol-error.eli +0 -0
- /package/{stdlib → runtime/managed}/managed-runtime-literals.eli +0 -0
- /package/{stdlib → runtime/managed}/managed-runtime-truth.eli +0 -0
- /package/{stdlib → runtime/managed}/managed-testing-value.eli +0 -0
|
@@ -0,0 +1,522 @@
|
|
|
1
|
+
// Generated by Eliscript. Do not edit.
|
|
2
|
+
import { tdz as __eliscript_tdz_error, immutable as __eliscript_const_error } from "eliscript/runtime/errors.mjs";
|
|
3
|
+
var __eliscript_tdz_ready_0;
|
|
4
|
+
var __eliscript_tdz_ready_1;
|
|
5
|
+
var __eliscript_tdz_ready_4;
|
|
6
|
+
var __eliscript_tdz_ready_5;
|
|
7
|
+
var __eliscript_tdz_ready_6;
|
|
8
|
+
var __eliscript_tdz_ready_9;
|
|
9
|
+
function __eliscript_tdz_write_9(__eliscript_tdz_value_9) { if (__eliscript_tdz_ready_9 !== true) __eliscript_tdz_error("fallback_now_ms"); return (fallback_now_ms = __eliscript_tdz_value_9); }
|
|
10
|
+
var __eliscript_tdz_ready_10;
|
|
11
|
+
function __eliscript_tdz_write_10(__eliscript_tdz_value_10) { if (__eliscript_tdz_ready_10 !== true) __eliscript_tdz_error("cached_host_now"); return (cached_host_now = __eliscript_tdz_value_10); }
|
|
12
|
+
var __eliscript_tdz_ready_11;
|
|
13
|
+
var __eliscript_tdz_ready_12;
|
|
14
|
+
import "eliscript/runtime/unicode-case.mjs";
|
|
15
|
+
import "eliscript/runtime/math.mjs";
|
|
16
|
+
import { __eliscript_at, __eliscript_at_direct, __eliscript_to_number, __eliscript_numeric_decrement, __eliscript_numeric_relation, __eliscript_numeric_sub, __eliscript_numeric_mul, __eliscript_numeric_div, __eliscript_numeric_rem, __eliscript_numeric_and, __eliscript_numeric_or, __eliscript_numeric_xor, __eliscript_numeric_shl, __eliscript_numeric_shr, __eliscript_numeric_ushr, __eliscript_numeric_neg, __eliscript_numeric_int32, __eliscript_numeric_uint32, __eliscript_numeric_not } from "eliscript/runtime/prelude.mjs";
|
|
17
|
+
import { valueType as __eliscript_value_type } from "eliscript/runtime/primitives.mjs";
|
|
18
|
+
const __eliscript_truthy = (value) => value !== false && value != null;
|
|
19
|
+
|
|
20
|
+
import {IPrint} from "../../runtime/core/data-text.mjs";
|
|
21
|
+
import {IComparable} from "../../runtime/core/order.mjs";
|
|
22
|
+
import {extendProtocolType} from "../../runtime/core/protocol.mjs";
|
|
23
|
+
import {extendValueType} from "../../runtime/core/value.mjs";
|
|
24
|
+
import {finishHash, hashNumber, mixHash} from "../../runtime/core/value-internals.mjs";
|
|
25
|
+
const INSTANT_TOKEN = Object.freeze(({}));
|
|
26
|
+
__eliscript_tdz_ready_0 = true;
|
|
27
|
+
const DURATION_TOKEN = Object.freeze(({}));
|
|
28
|
+
__eliscript_tdz_ready_1 = true;
|
|
29
|
+
const INSTANT_HASH_TAG = 1639812457;
|
|
30
|
+
const DURATION_HASH_TAG = 1941273619;
|
|
31
|
+
const MAX_INSTANT_MS = 8640000000000000;
|
|
32
|
+
__eliscript_tdz_ready_4 = true;
|
|
33
|
+
const instant_state = new (globalThis.WeakMap)();
|
|
34
|
+
__eliscript_tdz_ready_5 = true;
|
|
35
|
+
const duration_state = new (globalThis.WeakMap)();
|
|
36
|
+
__eliscript_tdz_ready_6 = true;
|
|
37
|
+
const make_named_class = (implementation, name) => { if (typeof name !== "string") throw new TypeError("class name must be a string"); return ({ [name]: class { constructor(...args) { return implementation(this, ...args); } } })[name]; };
|
|
38
|
+
const make_receiver_method = (fn, name) => { if (typeof name !== "string") throw new TypeError("method name must be a string"); return ({ [name](...args) { return Reflect.apply(fn, undefined, [this, ...args]); } })[name]; };
|
|
39
|
+
let fallback_now_ms = 1700000000000;
|
|
40
|
+
__eliscript_tdz_ready_9 = true;
|
|
41
|
+
let cached_host_now = undefined;
|
|
42
|
+
__eliscript_tdz_ready_10 = true;
|
|
43
|
+
function fail(message) {
|
|
44
|
+
return ((__eliscript_value_1) => { throw __eliscript_value_1; })(new (globalThis.TypeError)(message));
|
|
45
|
+
}
|
|
46
|
+
function range_fail(message) {
|
|
47
|
+
return ((__eliscript_value_2) => { throw __eliscript_value_2; })(new (globalThis.RangeError)(message));
|
|
48
|
+
}
|
|
49
|
+
function normalize_zero(n) {
|
|
50
|
+
if (__eliscript_truthy(Object.is(n, -0.0))) {
|
|
51
|
+
return 0;
|
|
52
|
+
} else {
|
|
53
|
+
return n;
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
function get_host_now_fn() {
|
|
57
|
+
if (((__eliscript_tdz_ready_10 === true ? cached_host_now : __eliscript_tdz_error("cached_host_now")) === undefined)) {
|
|
58
|
+
(__eliscript_tdz_write_10((() => {
|
|
59
|
+
try {
|
|
60
|
+
{
|
|
61
|
+
let probe = new (globalThis.Function)("return typeof Date === 'function' && typeof Date.now === 'function' ? () => Date.now() : null;");
|
|
62
|
+
return ((__eliscript_value_3) => (__eliscript_truthy(__eliscript_value_3) ? __eliscript_value_3 : null))(probe());
|
|
63
|
+
}
|
|
64
|
+
} catch (_ignored) {
|
|
65
|
+
return null;
|
|
66
|
+
}
|
|
67
|
+
})()));
|
|
68
|
+
}
|
|
69
|
+
return (__eliscript_tdz_ready_10 === true ? cached_host_now : __eliscript_tdz_error("cached_host_now"));
|
|
70
|
+
}
|
|
71
|
+
function current_epoch_ms() {
|
|
72
|
+
{
|
|
73
|
+
let fn = get_host_now_fn();
|
|
74
|
+
if (!((fn === null))) {
|
|
75
|
+
return fn();
|
|
76
|
+
} else {
|
|
77
|
+
(__eliscript_tdz_write_9(((__eliscript_tdz_ready_9 === true ? fallback_now_ms : __eliscript_tdz_error("fallback_now_ms")) + 1)));
|
|
78
|
+
return (__eliscript_tdz_ready_9 === true ? fallback_now_ms : __eliscript_tdz_error("fallback_now_ms"));
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
function is_leap_year_QMARK_(year) {
|
|
83
|
+
return ((__eliscript_numeric_rem(year, 4) === 0) && ((__eliscript_numeric_rem(year, 100) !== 0) || (__eliscript_numeric_rem(year, 400) === 0)));
|
|
84
|
+
}
|
|
85
|
+
function days_in_month(year, month) {
|
|
86
|
+
if ((month === 2)) {
|
|
87
|
+
if (__eliscript_truthy(is_leap_year_QMARK_(year))) {
|
|
88
|
+
return 29;
|
|
89
|
+
} else {
|
|
90
|
+
return 28;
|
|
91
|
+
}
|
|
92
|
+
} else {
|
|
93
|
+
if (((month === 4) || (month === 6) || (month === 9) || (month === 11))) {
|
|
94
|
+
return 30;
|
|
95
|
+
} else {
|
|
96
|
+
return 31;
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
|
+
}
|
|
100
|
+
function days_from_civil(year, month, day) {
|
|
101
|
+
{
|
|
102
|
+
let yy = (__eliscript_numeric_relation("<=", month, 2) ? __eliscript_numeric_decrement(year) : year);
|
|
103
|
+
let era = Math.floor(__eliscript_numeric_div(yy, 400));
|
|
104
|
+
let yoe = __eliscript_numeric_sub(yy, __eliscript_numeric_mul(era, 400));
|
|
105
|
+
let doy = (Math.floor(__eliscript_numeric_div((__eliscript_numeric_mul(153, (month + (__eliscript_numeric_relation(">", month, 2) ? -3 : 9))) + 2), 5)) + __eliscript_numeric_decrement(day));
|
|
106
|
+
let doe = (__eliscript_numeric_mul(yoe, 365) + Math.floor(__eliscript_numeric_div(yoe, 4)) + __eliscript_numeric_neg(Math.floor(__eliscript_numeric_div(yoe, 100))) + doy);
|
|
107
|
+
return __eliscript_numeric_sub((__eliscript_numeric_mul(era, 146097) + doe), 719468);
|
|
108
|
+
}
|
|
109
|
+
}
|
|
110
|
+
function pad2(n) {
|
|
111
|
+
if (__eliscript_numeric_relation("<", n, 10)) {
|
|
112
|
+
return (String("0") + String(n));
|
|
113
|
+
} else {
|
|
114
|
+
return (String(n));
|
|
115
|
+
}
|
|
116
|
+
}
|
|
117
|
+
function pad3(n) {
|
|
118
|
+
if (__eliscript_numeric_relation("<", n, 10)) {
|
|
119
|
+
return (String("00") + String(n));
|
|
120
|
+
} else {
|
|
121
|
+
if (__eliscript_numeric_relation("<", n, 100)) {
|
|
122
|
+
return (String("0") + String(n));
|
|
123
|
+
} else {
|
|
124
|
+
return (String(n));
|
|
125
|
+
}
|
|
126
|
+
}
|
|
127
|
+
}
|
|
128
|
+
function pad4(n) {
|
|
129
|
+
if (__eliscript_numeric_relation("<", n, 10)) {
|
|
130
|
+
return (String("000") + String(n));
|
|
131
|
+
} else {
|
|
132
|
+
if (__eliscript_numeric_relation("<", n, 100)) {
|
|
133
|
+
return (String("00") + String(n));
|
|
134
|
+
} else {
|
|
135
|
+
if (__eliscript_numeric_relation("<", n, 1000)) {
|
|
136
|
+
return (String("0") + String(n));
|
|
137
|
+
} else {
|
|
138
|
+
return (String(n));
|
|
139
|
+
}
|
|
140
|
+
}
|
|
141
|
+
}
|
|
142
|
+
}
|
|
143
|
+
function pad6(n) {
|
|
144
|
+
{
|
|
145
|
+
let s = (String(n));
|
|
146
|
+
while (__eliscript_numeric_relation("<", ((s) ?? []).length, 6)) {
|
|
147
|
+
((s = (String("0") + String(s))));
|
|
148
|
+
}
|
|
149
|
+
return s;
|
|
150
|
+
}
|
|
151
|
+
}
|
|
152
|
+
function format_iso_utc(ms) {
|
|
153
|
+
{
|
|
154
|
+
let days = Math.floor(__eliscript_numeric_div(ms, 86400000));
|
|
155
|
+
let rem = __eliscript_numeric_sub(ms, __eliscript_numeric_mul(days, 86400000));
|
|
156
|
+
let zz = (days + 719468);
|
|
157
|
+
let era = Math.floor(__eliscript_numeric_div(zz, 146097));
|
|
158
|
+
let doe = __eliscript_numeric_sub(zz, __eliscript_numeric_mul(era, 146097));
|
|
159
|
+
let yoe = Math.floor(__eliscript_numeric_div(__eliscript_numeric_sub((__eliscript_numeric_sub(doe, Math.floor(__eliscript_numeric_div(doe, 1460))) + Math.floor(__eliscript_numeric_div(doe, 36524))), Math.floor(__eliscript_numeric_div(doe, 146096))), 365));
|
|
160
|
+
let y = (yoe + __eliscript_numeric_mul(era, 400));
|
|
161
|
+
let doy = __eliscript_numeric_sub(doe, (__eliscript_numeric_mul(365, yoe) + Math.floor(__eliscript_numeric_div(yoe, 4)) + __eliscript_numeric_neg(Math.floor(__eliscript_numeric_div(yoe, 100)))));
|
|
162
|
+
let mp = Math.floor(__eliscript_numeric_div((__eliscript_numeric_mul(5, doy) + 2), 153));
|
|
163
|
+
let day = (__eliscript_numeric_sub(doy, Math.floor(__eliscript_numeric_div((__eliscript_numeric_mul(153, mp) + 2), 5))) + 1);
|
|
164
|
+
let month = (mp + (__eliscript_numeric_relation("<", mp, 10) ? 3 : -9));
|
|
165
|
+
let year = (__eliscript_numeric_relation("<=", month, 2) ? (y + 1) : y);
|
|
166
|
+
let hour = Math.floor(__eliscript_numeric_div(rem, 3600000));
|
|
167
|
+
let rem1 = __eliscript_numeric_sub(rem, __eliscript_numeric_mul(hour, 3600000));
|
|
168
|
+
let minute = Math.floor(__eliscript_numeric_div(rem1, 60000));
|
|
169
|
+
let rem2 = __eliscript_numeric_sub(rem1, __eliscript_numeric_mul(minute, 60000));
|
|
170
|
+
let second = Math.floor(__eliscript_numeric_div(rem2, 1000));
|
|
171
|
+
let millis = __eliscript_numeric_sub(rem2, __eliscript_numeric_mul(second, 1000));
|
|
172
|
+
let year_str = (__eliscript_numeric_relation("<", year, 0) ? (String("-") + String(pad6(__eliscript_numeric_neg(year)))) : (__eliscript_numeric_relation(">", year, 9999) ? (String("+") + String(pad6(year))) : pad4(year)));
|
|
173
|
+
return (String(year_str) + String("-") + String(pad2(month)) + String("-") + String(pad2(day)) + String("T") + String(pad2(hour)) + String(":") + String(pad2(minute)) + String(":") + String(pad2(second)) + String(".") + String(pad3(millis)) + String("Z"));
|
|
174
|
+
}
|
|
175
|
+
}
|
|
176
|
+
function parse_digits(text, start, count) {
|
|
177
|
+
if (__eliscript_numeric_relation(">", (start + count), ((text) ?? []).length)) {
|
|
178
|
+
return -1;
|
|
179
|
+
} else {
|
|
180
|
+
{
|
|
181
|
+
let acc = 0;
|
|
182
|
+
let idx = 0;
|
|
183
|
+
let ok = true;
|
|
184
|
+
while ((__eliscript_truthy(ok) && __eliscript_numeric_relation("<", idx, count))) {
|
|
185
|
+
{
|
|
186
|
+
let code = (text)["charCodeAt"]((start + idx));
|
|
187
|
+
if ((__eliscript_numeric_relation(">=", code, 48) && __eliscript_numeric_relation("<=", code, 57))) {
|
|
188
|
+
((acc = (__eliscript_numeric_mul(acc, 10) + __eliscript_numeric_sub(code, 48))), (idx = (idx + 1)));
|
|
189
|
+
} else {
|
|
190
|
+
((ok = false));
|
|
191
|
+
}
|
|
192
|
+
}
|
|
193
|
+
}
|
|
194
|
+
if (__eliscript_truthy(ok)) {
|
|
195
|
+
return acc;
|
|
196
|
+
} else {
|
|
197
|
+
return -1;
|
|
198
|
+
}
|
|
199
|
+
}
|
|
200
|
+
}
|
|
201
|
+
}
|
|
202
|
+
function parse_instant_ms(text) {
|
|
203
|
+
{
|
|
204
|
+
let len = ((text) ?? []).length;
|
|
205
|
+
if (__eliscript_numeric_relation("<", len, 17)) {
|
|
206
|
+
return null;
|
|
207
|
+
} else {
|
|
208
|
+
{
|
|
209
|
+
let year = parse_digits(text, 0, 4);
|
|
210
|
+
let dash1 = (text)["charCodeAt"](4);
|
|
211
|
+
let month = parse_digits(text, 5, 2);
|
|
212
|
+
let dash2 = (text)["charCodeAt"](7);
|
|
213
|
+
let day = parse_digits(text, 8, 2);
|
|
214
|
+
let sep = (text)["charCodeAt"](10);
|
|
215
|
+
let hour = parse_digits(text, 11, 2);
|
|
216
|
+
let colon1 = (text)["charCodeAt"](13);
|
|
217
|
+
let minute = parse_digits(text, 14, 2);
|
|
218
|
+
if ((__eliscript_numeric_relation("<", year, 0) || !((dash1 === 45)) || __eliscript_numeric_relation("<", month, 1) || __eliscript_numeric_relation(">", month, 12) || !((dash2 === 45)) || __eliscript_numeric_relation("<", day, 1) || __eliscript_numeric_relation(">", day, 31) || (!((sep === 84)) && !((sep === 116))) || __eliscript_numeric_relation("<", hour, 0) || __eliscript_numeric_relation(">", hour, 23) || !((colon1 === 58)) || __eliscript_numeric_relation("<", minute, 0) || __eliscript_numeric_relation(">", minute, 59))) {
|
|
219
|
+
return null;
|
|
220
|
+
} else {
|
|
221
|
+
{
|
|
222
|
+
let pos = 16;
|
|
223
|
+
let second = 0;
|
|
224
|
+
let millis = 0;
|
|
225
|
+
let valid = true;
|
|
226
|
+
if ((__eliscript_numeric_relation("<", pos, len) && ((text)["charCodeAt"](pos) === 58))) {
|
|
227
|
+
((second = parse_digits(text, (pos + 1), 2)));
|
|
228
|
+
if ((__eliscript_numeric_relation("<", second, 0) || __eliscript_numeric_relation(">", second, 59))) {
|
|
229
|
+
((valid = false));
|
|
230
|
+
} else {
|
|
231
|
+
((pos = (pos + 3)));
|
|
232
|
+
if ((__eliscript_numeric_relation("<", pos, len) && ((text)["charCodeAt"](pos) === 46))) {
|
|
233
|
+
((pos = (pos + 1)));
|
|
234
|
+
{
|
|
235
|
+
let fstart = pos;
|
|
236
|
+
let fdigits = 0;
|
|
237
|
+
while ((__eliscript_numeric_relation("<", pos, len) && __eliscript_truthy(((c) => {
|
|
238
|
+
return (__eliscript_numeric_relation(">=", c, 48) && __eliscript_numeric_relation("<=", c, 57));
|
|
239
|
+
})((text)["charCodeAt"](pos))))) {
|
|
240
|
+
((fdigits = (fdigits + 1)), (pos = (pos + 1)));
|
|
241
|
+
}
|
|
242
|
+
if (((fdigits === 0) || __eliscript_numeric_relation(">", fdigits, 9))) {
|
|
243
|
+
((valid = false));
|
|
244
|
+
} else {
|
|
245
|
+
{
|
|
246
|
+
let d0 = parse_digits(text, fstart, 1);
|
|
247
|
+
let d1 = (__eliscript_numeric_relation(">=", fdigits, 2) ? parse_digits(text, (fstart + 1), 1) : 0);
|
|
248
|
+
let d2 = (__eliscript_numeric_relation(">=", fdigits, 3) ? parse_digits(text, (fstart + 2), 1) : 0);
|
|
249
|
+
((millis = (__eliscript_numeric_mul(d0, 100) + __eliscript_numeric_mul(d1, 10) + d2)));
|
|
250
|
+
}
|
|
251
|
+
}
|
|
252
|
+
}
|
|
253
|
+
}
|
|
254
|
+
}
|
|
255
|
+
}
|
|
256
|
+
if (!(__eliscript_truthy(valid))) {
|
|
257
|
+
return null;
|
|
258
|
+
} else {
|
|
259
|
+
{
|
|
260
|
+
let tz_offset_ms = null;
|
|
261
|
+
if (__eliscript_numeric_relation("<", pos, len)) {
|
|
262
|
+
{
|
|
263
|
+
let tzc = (text)["charCodeAt"](pos);
|
|
264
|
+
if ((((tzc === 90) || (tzc === 122)) && ((pos + 1) === len))) {
|
|
265
|
+
((tz_offset_ms = 0));
|
|
266
|
+
} else {
|
|
267
|
+
if ((((tzc === 43) || (tzc === 45)) && ((pos + 6) === len) && ((text)["charCodeAt"]((pos + 3)) === 58))) {
|
|
268
|
+
{
|
|
269
|
+
let tzh = parse_digits(text, (pos + 1), 2);
|
|
270
|
+
let tzm = parse_digits(text, (pos + 4), 2);
|
|
271
|
+
let sign = ((tzc === 43) ? 1 : -1);
|
|
272
|
+
if ((__eliscript_numeric_relation(">=", tzh, 0) && __eliscript_numeric_relation("<=", tzh, 23) && __eliscript_numeric_relation(">=", tzm, 0) && __eliscript_numeric_relation("<=", tzm, 59))) {
|
|
273
|
+
((tz_offset_ms = __eliscript_numeric_mul(__eliscript_numeric_mul(sign, (__eliscript_numeric_mul(tzh, 60) + tzm)), 60000)));
|
|
274
|
+
}
|
|
275
|
+
}
|
|
276
|
+
} else {
|
|
277
|
+
|
|
278
|
+
}
|
|
279
|
+
}
|
|
280
|
+
}
|
|
281
|
+
}
|
|
282
|
+
if (((tz_offset_ms === null) || __eliscript_numeric_relation(">", day, days_in_month(year, month)))) {
|
|
283
|
+
return null;
|
|
284
|
+
} else {
|
|
285
|
+
{
|
|
286
|
+
let epoch_ms = normalize_zero(__eliscript_numeric_sub((__eliscript_numeric_mul(days_from_civil(year, month, day), 86400000) + __eliscript_numeric_mul(hour, 3600000) + __eliscript_numeric_mul(minute, 60000) + __eliscript_numeric_mul(second, 1000) + millis), tz_offset_ms));
|
|
287
|
+
if ((__eliscript_truthy(Number.isSafeInteger(epoch_ms)) && __eliscript_numeric_relation("<=", Math.abs(epoch_ms), (__eliscript_tdz_ready_4 === true ? MAX_INSTANT_MS : __eliscript_tdz_error("MAX_INSTANT_MS"))))) {
|
|
288
|
+
return epoch_ms;
|
|
289
|
+
} else {
|
|
290
|
+
return null;
|
|
291
|
+
}
|
|
292
|
+
}
|
|
293
|
+
}
|
|
294
|
+
}
|
|
295
|
+
}
|
|
296
|
+
}
|
|
297
|
+
}
|
|
298
|
+
}
|
|
299
|
+
}
|
|
300
|
+
}
|
|
301
|
+
}
|
|
302
|
+
const Instant = ((ctor) => {
|
|
303
|
+
{
|
|
304
|
+
let proto = (ctor)["prototype"];
|
|
305
|
+
Object.defineProperty(proto, "toString", ({"value": make_receiver_method(((self) => {
|
|
306
|
+
return ((instant_state)["get"](self))["iso"];
|
|
307
|
+
}), "toString"), "writable": true, "enumerable": false, "configurable": true}));
|
|
308
|
+
Object.defineProperty(proto, "toJSON", ({"value": make_receiver_method(((self) => {
|
|
309
|
+
return ((instant_state)["get"](self))["iso"];
|
|
310
|
+
}), "toJSON"), "writable": true, "enumerable": false, "configurable": true}));
|
|
311
|
+
Object.defineProperty(proto, (globalThis.Symbol)["toStringTag"], ({"get": make_receiver_method(((_self) => {
|
|
312
|
+
return "Instant";
|
|
313
|
+
}), "get [Symbol.toStringTag]"), "enumerable": false, "configurable": true}));
|
|
314
|
+
}
|
|
315
|
+
return ctor;
|
|
316
|
+
})(make_named_class(((self, token, ms, iso) => {
|
|
317
|
+
if ((!(token === INSTANT_TOKEN))) {
|
|
318
|
+
fail("Instant instances must be created via instant(), parse-instant(), or now()");
|
|
319
|
+
}
|
|
320
|
+
(instant_state)["set"](self, Object.freeze(({"ms": ms, "iso": iso})));
|
|
321
|
+
return Object.freeze(self);
|
|
322
|
+
}), "Instant"));
|
|
323
|
+
__eliscript_tdz_ready_11 = true;
|
|
324
|
+
const Duration = ((ctor) => {
|
|
325
|
+
{
|
|
326
|
+
let proto = (ctor)["prototype"];
|
|
327
|
+
Object.defineProperty(proto, "toString", ({"value": make_receiver_method(((self) => {
|
|
328
|
+
return (String(((duration_state)["get"](self))["ms"]) + String("ms"));
|
|
329
|
+
}), "toString"), "writable": true, "enumerable": false, "configurable": true}));
|
|
330
|
+
Object.defineProperty(proto, "toJSON", ({"value": make_receiver_method(((self) => {
|
|
331
|
+
return ((duration_state)["get"](self))["ms"];
|
|
332
|
+
}), "toJSON"), "writable": true, "enumerable": false, "configurable": true}));
|
|
333
|
+
Object.defineProperty(proto, (globalThis.Symbol)["toStringTag"], ({"get": make_receiver_method(((_self) => {
|
|
334
|
+
return "Duration";
|
|
335
|
+
}), "get [Symbol.toStringTag]"), "enumerable": false, "configurable": true}));
|
|
336
|
+
}
|
|
337
|
+
return ctor;
|
|
338
|
+
})(make_named_class(((self, token, ms) => {
|
|
339
|
+
if ((!(token === DURATION_TOKEN))) {
|
|
340
|
+
fail("Duration instances must be created via duration() or instant-diff()");
|
|
341
|
+
}
|
|
342
|
+
(duration_state)["set"](self, Object.freeze(({"ms": ms})));
|
|
343
|
+
return Object.freeze(self);
|
|
344
|
+
}), "Duration"));
|
|
345
|
+
__eliscript_tdz_ready_12 = true;
|
|
346
|
+
function instant_QMARK_(value) {
|
|
347
|
+
return ((__eliscript_value_4) => (__eliscript_truthy(__eliscript_value_4) ? ((__eliscript_value_5) => (__eliscript_truthy(__eliscript_value_5) ? ((__eliscript_tdz_ready_5 === true ? instant_state : __eliscript_tdz_error("instant_state")))["has"](value) : __eliscript_value_5))(((__eliscript_value_type(value) === "object") || (__eliscript_value_type(value) === "function"))) : __eliscript_value_4))((!(value == null)));
|
|
348
|
+
}
|
|
349
|
+
function duration_QMARK_(value) {
|
|
350
|
+
return ((__eliscript_value_6) => (__eliscript_truthy(__eliscript_value_6) ? ((__eliscript_value_7) => (__eliscript_truthy(__eliscript_value_7) ? ((__eliscript_tdz_ready_6 === true ? duration_state : __eliscript_tdz_error("duration_state")))["has"](value) : __eliscript_value_7))(((__eliscript_value_type(value) === "object") || (__eliscript_value_type(value) === "function"))) : __eliscript_value_6))((!(value == null)));
|
|
351
|
+
}
|
|
352
|
+
function require_instant(value, label) {
|
|
353
|
+
if ((!__eliscript_truthy(instant_QMARK_(value)))) {
|
|
354
|
+
fail((String(label) + String(" must be an Instant")));
|
|
355
|
+
}
|
|
356
|
+
return value;
|
|
357
|
+
}
|
|
358
|
+
function require_duration(value, label) {
|
|
359
|
+
if ((!__eliscript_truthy(duration_QMARK_(value)))) {
|
|
360
|
+
fail((String(label) + String(" must be a Duration")));
|
|
361
|
+
}
|
|
362
|
+
return value;
|
|
363
|
+
}
|
|
364
|
+
function make_instant_from_ms(ms) {
|
|
365
|
+
if ((!__eliscript_truthy(Number.isSafeInteger(ms)))) {
|
|
366
|
+
fail("instant epoch milliseconds must be a safe integer");
|
|
367
|
+
}
|
|
368
|
+
if (__eliscript_numeric_relation(">", Math.abs(ms), (__eliscript_tdz_ready_4 === true ? MAX_INSTANT_MS : __eliscript_tdz_error("MAX_INSTANT_MS")))) {
|
|
369
|
+
range_fail((String("instant epoch milliseconds out of supported range: ") + String(ms)));
|
|
370
|
+
}
|
|
371
|
+
{
|
|
372
|
+
let clean_ms = normalize_zero(ms);
|
|
373
|
+
let iso = format_iso_utc(clean_ms);
|
|
374
|
+
return new ((__eliscript_tdz_ready_11 === true ? Instant : __eliscript_tdz_error("Instant")))((__eliscript_tdz_ready_0 === true ? INSTANT_TOKEN : __eliscript_tdz_error("INSTANT_TOKEN")), clean_ms, iso);
|
|
375
|
+
}
|
|
376
|
+
}
|
|
377
|
+
function parse_instant(text) {
|
|
378
|
+
if ((!(__eliscript_value_type(text) === "string"))) {
|
|
379
|
+
fail("parse-instant expects a string");
|
|
380
|
+
}
|
|
381
|
+
{
|
|
382
|
+
let epoch_ms = parse_instant_ms(text);
|
|
383
|
+
if ((epoch_ms === null)) {
|
|
384
|
+
return null;
|
|
385
|
+
} else {
|
|
386
|
+
return make_instant_from_ms(epoch_ms);
|
|
387
|
+
}
|
|
388
|
+
}
|
|
389
|
+
}
|
|
390
|
+
function instant(input) {
|
|
391
|
+
if (__eliscript_truthy(instant_QMARK_(input))) {
|
|
392
|
+
return input;
|
|
393
|
+
} else {
|
|
394
|
+
if ((__eliscript_value_type(input) === "number")) {
|
|
395
|
+
return make_instant_from_ms(input);
|
|
396
|
+
} else {
|
|
397
|
+
if ((__eliscript_at(((globalThis.Object)["prototype"])["toString"], "call")(input) === "[object Date]")) {
|
|
398
|
+
{
|
|
399
|
+
let ms = (input)["getTime"]();
|
|
400
|
+
if (__eliscript_truthy(Number.isNaN(ms))) {
|
|
401
|
+
fail("cannot construct Instant from invalid Date");
|
|
402
|
+
}
|
|
403
|
+
return make_instant_from_ms(ms);
|
|
404
|
+
}
|
|
405
|
+
} else {
|
|
406
|
+
if ((__eliscript_value_type(input) === "string")) {
|
|
407
|
+
{
|
|
408
|
+
let parsed = parse_instant(input);
|
|
409
|
+
if ((parsed === null)) {
|
|
410
|
+
fail((String("invalid instant string: ") + String(input)));
|
|
411
|
+
}
|
|
412
|
+
return parsed;
|
|
413
|
+
}
|
|
414
|
+
} else {
|
|
415
|
+
return fail("instant expects an Instant, epoch ms integer, Date, or ISO-8601 string");
|
|
416
|
+
}
|
|
417
|
+
}
|
|
418
|
+
}
|
|
419
|
+
}
|
|
420
|
+
}
|
|
421
|
+
function now() {
|
|
422
|
+
return make_instant_from_ms(current_epoch_ms());
|
|
423
|
+
}
|
|
424
|
+
function instant_ms(value) {
|
|
425
|
+
require_instant(value, "instant-ms");
|
|
426
|
+
return (((__eliscript_tdz_ready_5 === true ? instant_state : __eliscript_tdz_error("instant_state")))["get"](value))["ms"];
|
|
427
|
+
}
|
|
428
|
+
function instant_iso(value) {
|
|
429
|
+
require_instant(value, "instant-iso");
|
|
430
|
+
return (((__eliscript_tdz_ready_5 === true ? instant_state : __eliscript_tdz_error("instant_state")))["get"](value))["iso"];
|
|
431
|
+
}
|
|
432
|
+
function duration(ms_or_duration) {
|
|
433
|
+
if (__eliscript_truthy(duration_QMARK_(ms_or_duration))) {
|
|
434
|
+
return ms_or_duration;
|
|
435
|
+
} else {
|
|
436
|
+
if (__eliscript_truthy(Number.isSafeInteger(ms_or_duration))) {
|
|
437
|
+
return new ((__eliscript_tdz_ready_12 === true ? Duration : __eliscript_tdz_error("Duration")))((__eliscript_tdz_ready_1 === true ? DURATION_TOKEN : __eliscript_tdz_error("DURATION_TOKEN")), normalize_zero(ms_or_duration));
|
|
438
|
+
} else {
|
|
439
|
+
return fail("duration expects a Duration or safe integer milliseconds");
|
|
440
|
+
}
|
|
441
|
+
}
|
|
442
|
+
}
|
|
443
|
+
function duration_ms(value) {
|
|
444
|
+
require_duration(value, "duration-ms");
|
|
445
|
+
return (((__eliscript_tdz_ready_6 === true ? duration_state : __eliscript_tdz_error("duration_state")))["get"](value))["ms"];
|
|
446
|
+
}
|
|
447
|
+
function duration_seconds(value) {
|
|
448
|
+
return __eliscript_numeric_div(duration_ms(value), 1000);
|
|
449
|
+
}
|
|
450
|
+
function instant_add(inst, delta) {
|
|
451
|
+
{
|
|
452
|
+
let base = instant_ms(inst);
|
|
453
|
+
let delta_ms = (__eliscript_truthy(duration_QMARK_(delta)) ? duration_ms(delta) : (__eliscript_truthy(Number.isSafeInteger(delta)) ? delta : fail("instant-add delta must be a Duration or safe integer milliseconds")));
|
|
454
|
+
return make_instant_from_ms((base + delta_ms));
|
|
455
|
+
}
|
|
456
|
+
}
|
|
457
|
+
function instant_diff(end_inst, start_inst) {
|
|
458
|
+
{
|
|
459
|
+
let diff = __eliscript_numeric_sub(instant_ms(end_inst), instant_ms(start_inst));
|
|
460
|
+
return duration(diff);
|
|
461
|
+
}
|
|
462
|
+
}
|
|
463
|
+
function instant_before_QMARK_(left, right) {
|
|
464
|
+
return __eliscript_numeric_relation("<", instant_ms(left), instant_ms(right));
|
|
465
|
+
}
|
|
466
|
+
function instant_after_QMARK_(left, right) {
|
|
467
|
+
return __eliscript_numeric_relation(">", instant_ms(left), instant_ms(right));
|
|
468
|
+
}
|
|
469
|
+
extendValueType(Instant, ({"equal": ((left, right, _eq) => {
|
|
470
|
+
return ((__eliscript_value_8) => (__eliscript_truthy(__eliscript_value_8) ? (instant_ms(left) === instant_ms(right)) : __eliscript_value_8))(instant_QMARK_(right));
|
|
471
|
+
}), "hash": ((self, _hash) => {
|
|
472
|
+
return finishHash(mixHash(INSTANT_HASH_TAG, hashNumber(instant_ms(self))), 1);
|
|
473
|
+
})}));
|
|
474
|
+
extendProtocolType(IComparable, Instant, ({"compare": ((left, right) => {
|
|
475
|
+
if ((!__eliscript_truthy(instant_QMARK_(right)))) {
|
|
476
|
+
fail("cannot compare Instant to non-Instant");
|
|
477
|
+
}
|
|
478
|
+
{
|
|
479
|
+
let lm = instant_ms(left);
|
|
480
|
+
let rm = instant_ms(right);
|
|
481
|
+
if (__eliscript_numeric_relation("<", lm, rm)) {
|
|
482
|
+
return -1;
|
|
483
|
+
} else {
|
|
484
|
+
if (__eliscript_numeric_relation(">", lm, rm)) {
|
|
485
|
+
return 1;
|
|
486
|
+
} else {
|
|
487
|
+
return 0;
|
|
488
|
+
}
|
|
489
|
+
}
|
|
490
|
+
}
|
|
491
|
+
})}));
|
|
492
|
+
extendProtocolType(IPrint, Instant, ({"print": ((self, _ctx) => {
|
|
493
|
+
return (String("#inst \"") + String(instant_iso(self)) + String("\""));
|
|
494
|
+
})}));
|
|
495
|
+
extendValueType(Duration, ({"equal": ((left, right, _eq) => {
|
|
496
|
+
return ((__eliscript_value_9) => (__eliscript_truthy(__eliscript_value_9) ? (duration_ms(left) === duration_ms(right)) : __eliscript_value_9))(duration_QMARK_(right));
|
|
497
|
+
}), "hash": ((self, _hash) => {
|
|
498
|
+
return finishHash(mixHash(DURATION_HASH_TAG, hashNumber(duration_ms(self))), 1);
|
|
499
|
+
})}));
|
|
500
|
+
extendProtocolType(IComparable, Duration, ({"compare": ((left, right) => {
|
|
501
|
+
if ((!__eliscript_truthy(duration_QMARK_(right)))) {
|
|
502
|
+
fail("cannot compare Duration to non-Duration");
|
|
503
|
+
}
|
|
504
|
+
{
|
|
505
|
+
let lm = duration_ms(left);
|
|
506
|
+
let rm = duration_ms(right);
|
|
507
|
+
if (__eliscript_numeric_relation("<", lm, rm)) {
|
|
508
|
+
return -1;
|
|
509
|
+
} else {
|
|
510
|
+
if (__eliscript_numeric_relation(">", lm, rm)) {
|
|
511
|
+
return 1;
|
|
512
|
+
} else {
|
|
513
|
+
return 0;
|
|
514
|
+
}
|
|
515
|
+
}
|
|
516
|
+
}
|
|
517
|
+
})}));
|
|
518
|
+
extendProtocolType(IPrint, Duration, ({"print": ((self, _ctx) => {
|
|
519
|
+
return (String("#eliscript/duration ") + String(duration_ms(self)));
|
|
520
|
+
})}));
|
|
521
|
+
export {Duration, Instant, duration, duration_ms, duration_seconds, duration_QMARK_, instant, instant_add, instant_after_QMARK_, instant_before_QMARK_, instant_diff, instant_iso, instant_ms, instant_QMARK_, now, parse_instant};
|
|
522
|
+
//# sourceMappingURL=time.mjs.map
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
// Generated by Eliscript. Do not edit.
|
|
2
|
+
import "eliscript/runtime/unicode-case.mjs";
|
|
3
|
+
const __eliscript_truthy = (value) => value !== false && value != null;
|
|
4
|
+
|
|
5
|
+
import * as Runtime from "../../runtime/core/transducer.mjs";
|
|
6
|
+
function completing(step, ...completion) {
|
|
7
|
+
return Runtime.completing(...([step, ...((completion) ?? [])] ?? []));
|
|
8
|
+
}
|
|
9
|
+
function compose_transducers(...transducers) {
|
|
10
|
+
return Runtime.composeTransducers(...(transducers ?? []));
|
|
11
|
+
}
|
|
12
|
+
function mapping(transform) {
|
|
13
|
+
return Runtime.mapping(transform);
|
|
14
|
+
}
|
|
15
|
+
function mapping_indexed(transform) {
|
|
16
|
+
return Runtime.mappingIndexed(transform);
|
|
17
|
+
}
|
|
18
|
+
function keeping(transform) {
|
|
19
|
+
return Runtime.keeping(transform);
|
|
20
|
+
}
|
|
21
|
+
function keeping_indexed(transform) {
|
|
22
|
+
return Runtime.keepingIndexed(transform);
|
|
23
|
+
}
|
|
24
|
+
function catting() {
|
|
25
|
+
return Runtime.catting();
|
|
26
|
+
}
|
|
27
|
+
function mapcatting(transform) {
|
|
28
|
+
return Runtime.mapcatting(transform);
|
|
29
|
+
}
|
|
30
|
+
function filtering(predicate) {
|
|
31
|
+
return Runtime.filtering(predicate);
|
|
32
|
+
}
|
|
33
|
+
function removing(predicate) {
|
|
34
|
+
return Runtime.removing(predicate);
|
|
35
|
+
}
|
|
36
|
+
function taking(limit) {
|
|
37
|
+
return Runtime.taking(limit);
|
|
38
|
+
}
|
|
39
|
+
function dropping(limit) {
|
|
40
|
+
return Runtime.dropping(limit);
|
|
41
|
+
}
|
|
42
|
+
function taking_while(predicate) {
|
|
43
|
+
return Runtime.takingWhile(predicate);
|
|
44
|
+
}
|
|
45
|
+
function dropping_while(predicate) {
|
|
46
|
+
return Runtime.droppingWhile(predicate);
|
|
47
|
+
}
|
|
48
|
+
function taking_nth(interval) {
|
|
49
|
+
return Runtime.takingNth(interval);
|
|
50
|
+
}
|
|
51
|
+
function interposing(separator) {
|
|
52
|
+
return Runtime.interposing(separator);
|
|
53
|
+
}
|
|
54
|
+
function partitioning_all(size) {
|
|
55
|
+
return Runtime.partitioningAll(size);
|
|
56
|
+
}
|
|
57
|
+
function partitioning_by(classifier) {
|
|
58
|
+
return Runtime.partitioningBy(classifier);
|
|
59
|
+
}
|
|
60
|
+
function deduping() {
|
|
61
|
+
return Runtime.deduping();
|
|
62
|
+
}
|
|
63
|
+
function distincting() {
|
|
64
|
+
return Runtime.distincting();
|
|
65
|
+
}
|
|
66
|
+
function halt_when(predicate, return_fn = null) {
|
|
67
|
+
return Runtime.haltWhen(predicate, return_fn);
|
|
68
|
+
}
|
|
69
|
+
function transduce(transducer, reducer, initial, collection) {
|
|
70
|
+
return Runtime.transduce(transducer, reducer, initial, collection);
|
|
71
|
+
}
|
|
72
|
+
function eduction(...arguments$) {
|
|
73
|
+
return Runtime.eduction(...(arguments$ ?? []));
|
|
74
|
+
}
|
|
75
|
+
function sequence(transducer, collection) {
|
|
76
|
+
return Runtime.sequence(transducer, collection);
|
|
77
|
+
}
|
|
78
|
+
function run_BANG_(procedure, collection) {
|
|
79
|
+
return Runtime.runBang(procedure, collection);
|
|
80
|
+
}
|
|
81
|
+
function into(target, ...arguments$) {
|
|
82
|
+
return Runtime.into(...([target, ...((arguments$) ?? [])] ?? []));
|
|
83
|
+
}
|
|
84
|
+
export {catting, completing, compose_transducers, deduping, distincting, dropping, eduction, dropping_while, filtering, halt_when, interposing, into, keeping, keeping_indexed, mapcatting, mapping, mapping_indexed, partitioning_all, partitioning_by, removing, run_BANG_, sequence, taking, taking_nth, taking_while, transduce};
|
|
85
|
+
//# sourceMappingURL=transducer.mjs.map
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
// Generated by Eliscript. Do not edit.
|
|
2
|
+
import "eliscript/runtime/unicode-case.mjs";
|
|
3
|
+
const __eliscript_truthy = (value) => value !== false && value != null;
|
|
4
|
+
|
|
5
|
+
import * as Runtime from "../../runtime/core/transient.mjs";
|
|
6
|
+
const IEditable = Runtime.IEditable;
|
|
7
|
+
const ITransientCollection = Runtime.ITransientCollection;
|
|
8
|
+
const ITransientSet = Runtime.ITransientSet;
|
|
9
|
+
function transient(collection) {
|
|
10
|
+
return Runtime.transient(collection);
|
|
11
|
+
}
|
|
12
|
+
function conj_BANG_(collection, ...values) {
|
|
13
|
+
return Runtime.conjBang(...([collection, ...((values) ?? [])] ?? []));
|
|
14
|
+
}
|
|
15
|
+
function assoc_BANG_(collection, key, value, ...key_values) {
|
|
16
|
+
if ((((key_values) ?? []).length === 0)) {
|
|
17
|
+
return Runtime.assocBang(collection, key, value);
|
|
18
|
+
} else {
|
|
19
|
+
return Runtime.assocBang(...([collection, ...(([key, ...(([value, ...((key_values) ?? [])]) ?? [])]) ?? [])] ?? []));
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
function dissoc_BANG_(collection, ...keys) {
|
|
23
|
+
return Runtime.dissocBang(...([collection, ...((keys) ?? [])] ?? []));
|
|
24
|
+
}
|
|
25
|
+
function disj_BANG_(collection, ...values) {
|
|
26
|
+
return Runtime.disjBang(...([collection, ...((values) ?? [])] ?? []));
|
|
27
|
+
}
|
|
28
|
+
function persistent_BANG_(collection) {
|
|
29
|
+
return Runtime.persistentBang(collection);
|
|
30
|
+
}
|
|
31
|
+
export {IEditable, ITransientCollection, ITransientSet, assoc_BANG_, conj_BANG_, disj_BANG_, dissoc_BANG_, persistent_BANG_, transient};
|
|
32
|
+
//# sourceMappingURL=transient.mjs.map
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
// Generated by Eliscript. Do not edit.
|
|
2
|
+
import "eliscript/runtime/unicode-case.mjs";
|
|
3
|
+
const __eliscript_truthy = (value) => value !== false && value != null;
|
|
4
|
+
|
|
5
|
+
import * as Runtime from "../../runtime/core/type.mjs";
|
|
6
|
+
function define_type(name, fields, protocol_plans) {
|
|
7
|
+
return Runtime.defineType(name, fields, protocol_plans);
|
|
8
|
+
}
|
|
9
|
+
function reify_protocols(protocol_plans) {
|
|
10
|
+
return Runtime.reifyProtocols(protocol_plans);
|
|
11
|
+
}
|
|
12
|
+
function type_definition_QMARK_(value) {
|
|
13
|
+
return Runtime.isType(value);
|
|
14
|
+
}
|
|
15
|
+
function type_value_QMARK_(value) {
|
|
16
|
+
return Runtime.isTypeValue(value);
|
|
17
|
+
}
|
|
18
|
+
function type_of(value) {
|
|
19
|
+
return Runtime.typeOf(value);
|
|
20
|
+
}
|
|
21
|
+
function defined_type_name(value) {
|
|
22
|
+
return Runtime.typeName(value);
|
|
23
|
+
}
|
|
24
|
+
function defined_type_fields(value) {
|
|
25
|
+
return Runtime.typeFieldNames(value);
|
|
26
|
+
}
|
|
27
|
+
export {define_type, reify_protocols, type_definition_QMARK_, type_value_QMARK_, type_of, defined_type_name, defined_type_fields};
|
|
28
|
+
//# sourceMappingURL=type.mjs.map
|