@eagleoutice/flowr 2.17.5 → 2.17.6
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/README.md +13 -51
- package/abstract-interpretation/absint-inference.d.ts +4 -4
- package/abstract-interpretation/absint-inference.js +11 -11
- package/abstract-interpretation/abstract-semantics.d.ts +2 -1
- package/abstract-interpretation/branch-paths-interpreter.d.ts +1 -0
- package/abstract-interpretation/branch-paths-interpreter.js +60 -0
- package/abstract-interpretation/branch-paths.d.ts +60 -0
- package/abstract-interpretation/branch-paths.js +120 -0
- package/abstract-interpretation/data-frame/dataframe-semantics.d.ts +6 -1
- package/abstract-interpretation/data-frame/dataframe-semantics.js +60 -1
- package/abstract-interpretation/data-frame/semantics.js +4 -10
- package/abstract-interpretation/domains/bounded-set-domain.d.ts +1 -1
- package/cli/repl/core.js +51 -0
- package/control-flow/cfg-dead-code.js +12 -7
- package/data/packed.d.ts +10 -0
- package/data/packed.js +33 -0
- package/data/r-base-guards.generated.d.ts +7 -0
- package/data/r-base-guards.generated.js +12 -0
- package/data/r-datasets.generated.d.ts +4 -0
- package/data/r-datasets.generated.js +10 -0
- package/data/r-formals.generated.d.ts +4 -0
- package/data/r-formals.generated.js +10 -0
- package/data/r-group-method-guards.generated.d.ts +3 -0
- package/data/r-group-method-guards.generated.js +8 -0
- package/dataflow/environments/ambient-effect.d.ts +1000 -0
- package/dataflow/environments/ambient-effect.js +234 -0
- package/dataflow/environments/ambient-state-name.d.ts +45 -2
- package/dataflow/environments/ambient-state-name.js +61 -3
- package/dataflow/environments/apply-kill.js +11 -4
- package/dataflow/environments/built-in-kinds.d.ts +4 -46
- package/dataflow/environments/built-in-kinds.js +6 -2
- package/dataflow/environments/built-in-props.d.ts +16 -4
- package/dataflow/environments/built-in-props.js +11 -3
- package/dataflow/environments/built-in.d.ts +6 -1
- package/dataflow/environments/built-in.js +13 -36
- package/dataflow/environments/default-builtin-config/base-functions.d.ts +1 -1
- package/dataflow/environments/default-builtin-config/base-functions.js +110 -52
- package/dataflow/environments/default-builtin-config/base-language.d.ts +1 -1
- package/dataflow/environments/default-builtin-config/base-language.js +11 -8
- package/dataflow/environments/default-builtin-config/dev-tooling.js +1 -1
- package/dataflow/environments/default-builtin-config/file-io.js +6 -4
- package/dataflow/environments/default-builtin-config/graphics-devices.d.ts +1 -1
- package/dataflow/environments/default-builtin-config/graphics-devices.js +24 -14
- package/dataflow/environments/default-builtin-config/guard-builders.d.ts +16 -0
- package/dataflow/environments/default-builtin-config/guard-builders.js +29 -0
- package/dataflow/environments/default-builtin-config/guards-primitive-lang.d.ts +15 -0
- package/dataflow/environments/default-builtin-config/guards-primitive-lang.js +228 -0
- package/dataflow/environments/default-builtin-config/guards-primitive-ops.d.ts +11 -0
- package/dataflow/environments/default-builtin-config/guards-primitive-ops.js +154 -0
- package/dataflow/environments/default-builtin-config/guards.d.ts +9 -0
- package/dataflow/environments/default-builtin-config/guards.js +211 -0
- package/dataflow/environments/default-builtin-config/index.d.ts +3 -3
- package/dataflow/environments/default-builtin-config/index.js +22 -7
- package/dataflow/environments/default-builtin-config/media-formats.js +4 -4
- package/dataflow/environments/default-builtin-config/package-spatial.js +2 -1
- package/dataflow/environments/default-builtin-config/package-tidyverse.js +3 -2
- package/dataflow/environments/default-builtin-config/package-utils.d.ts +1 -1
- package/dataflow/environments/default-builtin-config/package-utils.js +5 -2
- package/dataflow/environments/default-builtin-config/parallel-execution.d.ts +1 -1
- package/dataflow/environments/default-builtin-config/parallel-execution.js +3 -1
- package/dataflow/environments/default-builtin-config/r-formals.d.ts +13 -0
- package/dataflow/environments/default-builtin-config/r-formals.js +110 -0
- package/dataflow/environments/default-builtin-config/shared-configs.d.ts +138 -77
- package/dataflow/environments/default-builtin-config/shared-configs.js +52 -88
- package/dataflow/environments/default-builtin-config/statistics.d.ts +1 -1
- package/dataflow/environments/default-builtin-config/statistics.js +4 -1
- package/dataflow/environments/diff.js +5 -2
- package/dataflow/environments/environment.d.ts +20 -0
- package/dataflow/environments/environment.js +39 -4
- package/dataflow/environments/group-generics.d.ts +5 -1
- package/dataflow/environments/group-generics.js +13 -3
- package/dataflow/environments/guard-facts.d.ts +169 -0
- package/dataflow/environments/guard-facts.js +26 -0
- package/dataflow/environments/identifier.d.ts +9 -1
- package/dataflow/environments/identifier.js +5 -0
- package/dataflow/environments/pkg-name.d.ts +1 -0
- package/dataflow/environments/query-fn-props.d.ts +3 -5
- package/dataflow/environments/query-fn-props.js +44 -21
- package/dataflow/environments/removal-marker.d.ts +2 -0
- package/dataflow/environments/removal-marker.js +5 -0
- package/dataflow/eval/resolve/resolve-strings.d.ts +2 -5
- package/dataflow/eval/resolve/resolve-strings.js +2 -2
- package/dataflow/extractor.js +24 -15
- package/dataflow/fn/condition-handlers.d.ts +2 -0
- package/dataflow/fn/condition-handlers.js +3 -1
- package/dataflow/fn/frame-reflection.d.ts +4 -2
- package/dataflow/fn/frame-reflection.js +16 -0
- package/dataflow/fn/function-props.js +15 -22
- package/dataflow/fn/function-semantics.d.ts +31 -1
- package/dataflow/fn/function-semantics.js +15 -0
- package/dataflow/fn/guards/built-in-guards.d.ts +112 -0
- package/dataflow/fn/guards/built-in-guards.js +199 -0
- package/dataflow/fn/guards/call-contracts.d.ts +97 -0
- package/dataflow/fn/guards/call-contracts.js +331 -0
- package/dataflow/fn/guards/condition-grouping.d.ts +20 -0
- package/dataflow/fn/guards/condition-grouping.js +135 -0
- package/dataflow/fn/guards/function-guards.d.ts +112 -0
- package/dataflow/fn/guards/function-guards.js +1549 -0
- package/dataflow/fn/guards/group-method-guards.d.ts +28 -0
- package/dataflow/fn/guards/group-method-guards.js +56 -0
- package/dataflow/fn/guards/guard-claims.d.ts +125 -0
- package/dataflow/fn/guards/guard-claims.js +678 -0
- package/dataflow/fn/guards/guard-knowledge.d.ts +41 -0
- package/dataflow/fn/guards/guard-knowledge.js +180 -0
- package/dataflow/fn/guards/guard-term-syntax.d.ts +9 -0
- package/dataflow/fn/guards/guard-term-syntax.js +210 -0
- package/dataflow/fn/guards/guard-term.d.ts +136 -0
- package/dataflow/fn/guards/guard-term.js +550 -0
- package/dataflow/fn/guards/stated-guards.d.ts +13 -0
- package/dataflow/fn/guards/stated-guards.js +35 -0
- package/dataflow/fn/higher-order-function.d.ts +2 -0
- package/dataflow/fn/higher-order-function.js +1 -0
- package/dataflow/fn/strict-function.d.ts +4 -0
- package/dataflow/fn/strict-function.js +66 -17
- package/dataflow/graph/ambient-access.d.ts +4 -1
- package/dataflow/graph/ambient-access.js +8 -2
- package/dataflow/graph/closure-frames.js +1 -1
- package/dataflow/graph/dataflowgraph-builder.d.ts +1 -1
- package/dataflow/graph/dataflowgraph-builder.js +2 -2
- package/dataflow/graph/df-helper.d.ts +6 -0
- package/dataflow/graph/df-helper.js +15 -0
- package/dataflow/graph/graph.d.ts +12 -6
- package/dataflow/graph/graph.js +21 -28
- package/dataflow/info.d.ts +2 -1
- package/dataflow/info.js +3 -1
- package/dataflow/internal/dispatch-linking.d.ts +3 -1
- package/dataflow/internal/dispatch-linking.js +1 -0
- package/dataflow/internal/linker.d.ts +2 -0
- package/dataflow/internal/linker.js +115 -6
- package/dataflow/internal/process/functions/call/built-in/built-in-access.js +2 -1
- package/dataflow/internal/process/functions/call/built-in/built-in-ambient-keys.d.ts +5 -2
- package/dataflow/internal/process/functions/call/built-in/built-in-ambient-keys.js +2 -1
- package/dataflow/internal/process/functions/call/built-in/built-in-ambient-state.d.ts +19 -57
- package/dataflow/internal/process/functions/call/built-in/built-in-ambient-state.js +471 -295
- package/dataflow/internal/process/functions/call/built-in/built-in-apply.js +13 -1
- package/dataflow/internal/process/functions/call/built-in/built-in-assignment.d.ts +2 -0
- package/dataflow/internal/process/functions/call/built-in/built-in-assignment.js +106 -19
- package/dataflow/internal/process/functions/call/built-in/built-in-attach.d.ts +1 -1
- package/dataflow/internal/process/functions/call/built-in/built-in-attach.js +24 -3
- package/dataflow/internal/process/functions/call/built-in/built-in-deferred-env-ops.d.ts +1 -1
- package/dataflow/internal/process/functions/call/built-in/built-in-deferred-env-ops.js +33 -11
- package/dataflow/internal/process/functions/call/built-in/built-in-env-contents.js +4 -0
- package/dataflow/internal/process/functions/call/built-in/built-in-envir-utils.d.ts +4 -4
- package/dataflow/internal/process/functions/call/built-in/built-in-envir-utils.js +23 -7
- package/dataflow/internal/process/functions/call/built-in/built-in-eval.js +14 -4
- package/dataflow/internal/process/functions/call/built-in/built-in-expression-list.d.ts +19 -2
- package/dataflow/internal/process/functions/call/built-in/built-in-expression-list.js +347 -46
- package/dataflow/internal/process/functions/call/built-in/built-in-for-loop.js +2 -1
- package/dataflow/internal/process/functions/call/built-in/built-in-function-definition.d.ts +5 -0
- package/dataflow/internal/process/functions/call/built-in/built-in-function-definition.js +110 -16
- package/dataflow/internal/process/functions/call/built-in/built-in-get.d.ts +2 -0
- package/dataflow/internal/process/functions/call/built-in/built-in-get.js +9 -2
- package/dataflow/internal/process/functions/call/built-in/built-in-if-then-else.d.ts +1 -1
- package/dataflow/internal/process/functions/call/built-in/built-in-if-then-else.js +4 -2
- package/dataflow/internal/process/functions/call/built-in/built-in-library.d.ts +5 -0
- package/dataflow/internal/process/functions/call/built-in/built-in-library.js +28 -0
- package/dataflow/internal/process/functions/call/built-in/built-in-load.js +16 -6
- package/dataflow/internal/process/functions/call/built-in/built-in-local.d.ts +6 -1
- package/dataflow/internal/process/functions/call/built-in/built-in-local.js +37 -2
- package/dataflow/internal/process/functions/call/built-in/built-in-recall.js +4 -0
- package/dataflow/internal/process/functions/call/built-in/built-in-replacement.js +19 -1
- package/dataflow/internal/process/functions/call/built-in/built-in-rm.d.ts +1 -1
- package/dataflow/internal/process/functions/call/built-in/built-in-rm.js +55 -11
- package/dataflow/internal/process/functions/call/built-in/built-in-source.d.ts +2 -2
- package/dataflow/internal/process/functions/call/built-in/built-in-source.js +11 -10
- package/dataflow/internal/process/functions/call/built-in/built-in-special-bin-op.js +3 -1
- package/dataflow/internal/process/functions/call/built-in/built-in-stack-env.d.ts +8 -0
- package/dataflow/internal/process/functions/call/built-in/built-in-stack-env.js +64 -7
- package/dataflow/internal/process/functions/call/built-in/built-in-try-catch.d.ts +1 -1
- package/dataflow/internal/process/functions/call/built-in/built-in-try-catch.js +160 -20
- package/dataflow/internal/process/functions/call/built-in/built-in-while-loop.js +5 -3
- package/dataflow/internal/process/functions/call/built-in/transitive-side-effects.d.ts +6 -0
- package/dataflow/internal/process/functions/call/built-in/transitive-side-effects.js +142 -4
- package/dataflow/internal/process/functions/call/quoted.d.ts +2 -0
- package/dataflow/internal/process/functions/call/quoted.js +23 -4
- package/dataflow/processor.d.ts +2 -0
- package/documentation/data/dfg/doc-ambient.d.ts +4 -0
- package/documentation/data/dfg/doc-ambient.js +74 -0
- package/documentation/wiki-dataflow-graph.js +10 -4
- package/documentation/wiki-linter.js +12 -0
- package/documentation/wiki-query.js +112 -1
- package/linter/linter-rules.d.ts +41 -1
- package/linter/linter-rules.js +5 -1
- package/linter/rules/call-contracts.d.ts +40 -0
- package/linter/rules/call-contracts.js +56 -0
- package/linter/rules/cmd-check/bogus-return.js +1 -1
- package/linter/rules/cmd-check/call-arguments.js +5 -6
- package/linter/rules/cmd-check/cmd-check-util.d.ts +0 -6
- package/linter/rules/cmd-check/cmd-check-util.js +0 -28
- package/linter/rules/cmd-check/package-hooks.js +2 -1
- package/linter/rules/cmd-check/s-three-method-consistency.js +1 -1
- package/linter/rules/interactive-functions.d.ts +30 -0
- package/linter/rules/interactive-functions.js +87 -0
- package/linter/rules/process-state-in-session.js +1 -1
- package/linter/rules/undefined-symbol-util.d.ts +1 -1
- package/linter/rules/undefined-symbol-util.js +8 -2
- package/linter/rules/undefined-symbol.js +18 -7
- package/linter/rules/useless-loop.d.ts +1 -1
- package/package.json +1 -1
- package/project/context/flowr-analyzer-dependencies-context.js +2 -1
- package/project/flowr-analyzer.d.ts +1 -0
- package/project/flowr-analyzer.js +5 -5
- package/project/sigdb/build.js +14 -4
- package/project/sigdb/decode.d.ts +3 -0
- package/project/sigdb/decode.js +10 -1
- package/project/sigdb/guarded-source.d.ts +6 -0
- package/project/sigdb/guarded-source.js +29 -0
- package/project/sigdb/reader.d.ts +5 -0
- package/project/sigdb/reader.js +27 -1
- package/project/sigdb/schema.d.ts +24 -2
- package/queries/catalog/absint-query/absint-query-format.d.ts +6 -3
- package/queries/catalog/absint-query/absint-query-format.js +57 -2
- package/queries/catalog/ambient-access-query/ambient-access-query-format.d.ts +6 -2
- package/queries/catalog/ambient-access-query/ambient-access-query-format.js +48 -3
- package/queries/catalog/cluster-query/cluster-query-format.d.ts +5 -2
- package/queries/catalog/cluster-query/cluster-query-format.js +19 -2
- package/queries/catalog/code-clones-query/code-clones-query-format.d.ts +5 -2
- package/queries/catalog/code-clones-query/code-clones-query-format.js +34 -2
- package/queries/catalog/config-query/config-query-format.d.ts +5 -2
- package/queries/catalog/config-query/config-query-format.js +41 -2
- package/queries/catalog/control-flow-query/control-flow-query-format.d.ts +5 -2
- package/queries/catalog/control-flow-query/control-flow-query-format.js +19 -2
- package/queries/catalog/data-columns-query/data-columns-query-format.d.ts +72 -0
- package/queries/catalog/data-columns-query/data-columns-query-format.js +215 -0
- package/queries/catalog/dataflow-lens-query/dataflow-lens-query-format.d.ts +5 -2
- package/queries/catalog/dataflow-lens-query/dataflow-lens-query-format.js +38 -2
- package/queries/catalog/dataflow-query/dataflow-query-format.d.ts +5 -2
- package/queries/catalog/dataflow-query/dataflow-query-format.js +18 -2
- package/queries/catalog/dependencies-query/dependencies-query-format.d.ts +1 -1
- package/queries/catalog/dependencies-query/dependencies-query-format.js +8 -3
- package/queries/catalog/dependencies-query/function-info/other-path-functions.js +1 -1
- package/queries/catalog/dependencies-query/function-info/tagged-functions.d.ts +11 -0
- package/queries/catalog/dependencies-query/function-info/tagged-functions.js +18 -0
- package/queries/catalog/dice-query/dice-query-format.d.ts +7 -2
- package/queries/catalog/dice-query/dice-query-format.js +34 -2
- package/queries/catalog/does-call-query/does-call-query-format.d.ts +7 -4
- package/queries/catalog/does-call-query/does-call-query-format.js +114 -2
- package/queries/catalog/files-query/files-query-format.d.ts +5 -2
- package/queries/catalog/files-query/files-query-format.js +45 -2
- package/queries/catalog/guess-dep-versions-query/guess-dep-versions-query-format.d.ts +6 -3
- package/queries/catalog/guess-dep-versions-query/guess-dep-versions-query-format.js +303 -2
- package/queries/catalog/happens-before-query/happens-before-query-format.d.ts +8 -4
- package/queries/catalog/happens-before-query/happens-before-query-format.js +37 -2
- package/queries/catalog/id-map-query/id-map-query-format.d.ts +5 -2
- package/queries/catalog/id-map-query/id-map-query-format.js +18 -2
- package/queries/catalog/inspect-exceptions-query/inspect-exception-query-format.d.ts +5 -2
- package/queries/catalog/inspect-exceptions-query/inspect-exception-query-format.js +29 -2
- package/queries/catalog/inspect-fn-guards-query/inspect-fn-guards-query-format.d.ts +37 -0
- package/queries/catalog/inspect-fn-guards-query/inspect-fn-guards-query-format.js +125 -0
- package/queries/catalog/inspect-fn-props-query/inspect-fn-props-query-format.d.ts +3 -2
- package/queries/catalog/inspect-fn-props-query/inspect-fn-props-query-format.js +54 -2
- package/queries/catalog/inspect-higher-order-query/inspect-higher-order-query-format.d.ts +6 -2
- package/queries/catalog/inspect-higher-order-query/inspect-higher-order-query-format.js +23 -2
- package/queries/catalog/inspect-recursion-query/inspect-recursion-query-format.d.ts +6 -2
- package/queries/catalog/inspect-recursion-query/inspect-recursion-query-format.js +15 -2
- package/queries/catalog/linter-query/linter-query-format.d.ts +8 -2
- package/queries/catalog/linter-query/linter-query-format.js +69 -4
- package/queries/catalog/location-map-query/location-map-query-format.d.ts +7 -3
- package/queries/catalog/location-map-query/location-map-query-format.js +70 -2
- package/queries/catalog/normalized-ast-query/normalized-ast-query-format.d.ts +5 -2
- package/queries/catalog/normalized-ast-query/normalized-ast-query-format.js +18 -2
- package/queries/catalog/origin-query/origin-query-format.d.ts +6 -3
- package/queries/catalog/origin-query/origin-query-format.js +29 -2
- package/queries/catalog/project-query/project-query-format.d.ts +6 -3
- package/queries/catalog/project-query/project-query-format.js +98 -2
- package/queries/catalog/provenance-query/provenance-query-format.d.ts +6 -3
- package/queries/catalog/provenance-query/provenance-query-format.js +30 -2
- package/queries/catalog/resolve-value-query/resolve-value-query-format.d.ts +9 -2
- package/queries/catalog/resolve-value-query/resolve-value-query-format.js +38 -2
- package/queries/catalog/search-query/search-query-format.d.ts +5 -2
- package/queries/catalog/search-query/search-query-format.js +23 -2
- package/queries/catalog/signature-query/signature-query-executor.js +3 -1
- package/queries/catalog/signature-query/signature-query-format.d.ts +3 -0
- package/queries/catalog/signature-query/signature-query-render.js +23 -0
- package/queries/catalog/static-slice-query/static-slice-query-format.d.ts +13 -2
- package/queries/catalog/static-slice-query/static-slice-query-format.js +55 -2
- package/queries/catalog/taint-query/taint-query-format.d.ts +6 -3
- package/queries/catalog/taint-query/taint-query-format.js +28 -2
- package/queries/query.d.ts +48 -27
- package/queries/query.js +6 -4
- package/r-bridge/lang-4.x/ast/model/processing/node-id.d.ts +2 -0
- package/r-bridge/lang-4.x/ast/model/processing/node-id.js +4 -0
- package/r-bridge/shell.js +7 -2
- package/reconstruct/reconstruct.js +18 -3
- package/slicing/static/removal-slice.js +4 -3
- package/slicing/static/slice-call.d.ts +11 -0
- package/slicing/static/slice-call.js +43 -2
- package/slicing/static/static-slicer.d.ts +2 -0
- package/slicing/static/static-slicer.js +137 -21
- package/slicing/static/visiting-queue.d.ts +2 -0
- package/slicing/static/visiting-queue.js +4 -0
- package/util/flowr-version.d.ts +1 -1
- package/util/flowr-version.js +2 -2
- package/util/objects.d.ts +2 -0
- package/util/objects.js +5 -0
- package/util/r-datasets.d.ts +27 -0
- package/util/r-datasets.js +45 -0
- package/util/text/playground-link.d.ts +2 -0
- package/util/text/playground-link.js +2 -0
- package/queries/catalog/absint-query/absint-query-executor.d.ts +0 -6
- package/queries/catalog/absint-query/absint-query-executor.js +0 -61
- package/queries/catalog/ambient-access-query/ambient-access-query-executor.d.ts +0 -6
- package/queries/catalog/ambient-access-query/ambient-access-query-executor.js +0 -50
- package/queries/catalog/cluster-query/cluster-query-executor.d.ts +0 -6
- package/queries/catalog/cluster-query/cluster-query-executor.js +0 -21
- package/queries/catalog/code-clones-query/code-clones-query-executor.d.ts +0 -6
- package/queries/catalog/code-clones-query/code-clones-query-executor.js +0 -38
- package/queries/catalog/config-query/config-query-executor.d.ts +0 -6
- package/queries/catalog/config-query/config-query-executor.js +0 -45
- package/queries/catalog/control-flow-query/control-flow-query-executor.d.ts +0 -6
- package/queries/catalog/control-flow-query/control-flow-query-executor.js +0 -21
- package/queries/catalog/dataflow-lens-query/dataflow-lens-query-executor.d.ts +0 -6
- package/queries/catalog/dataflow-lens-query/dataflow-lens-query-executor.js +0 -40
- package/queries/catalog/dataflow-query/dataflow-query-executor.d.ts +0 -6
- package/queries/catalog/dataflow-query/dataflow-query-executor.js +0 -20
- package/queries/catalog/dependencies-query/function-info/statistics-functions.d.ts +0 -9
- package/queries/catalog/dependencies-query/function-info/statistics-functions.js +0 -18
- package/queries/catalog/dice-query/dice-query-executor.d.ts +0 -8
- package/queries/catalog/dice-query/dice-query-executor.js +0 -37
- package/queries/catalog/does-call-query/does-call-query-executor.d.ts +0 -6
- package/queries/catalog/does-call-query/does-call-query-executor.js +0 -116
- package/queries/catalog/files-query/files-query-executor.d.ts +0 -6
- package/queries/catalog/files-query/files-query-executor.js +0 -47
- package/queries/catalog/guess-dep-versions-query/guess-dep-versions-query-executor.d.ts +0 -6
- package/queries/catalog/guess-dep-versions-query/guess-dep-versions-query-executor.js +0 -307
- package/queries/catalog/happens-before-query/happens-before-query-executor.d.ts +0 -7
- package/queries/catalog/happens-before-query/happens-before-query-executor.js +0 -40
- package/queries/catalog/id-map-query/id-map-query-executor.d.ts +0 -6
- package/queries/catalog/id-map-query/id-map-query-executor.js +0 -20
- package/queries/catalog/inspect-exceptions-query/inspect-exception-query-executor.d.ts +0 -6
- package/queries/catalog/inspect-exceptions-query/inspect-exception-query-executor.js +0 -31
- package/queries/catalog/inspect-fn-props-query/inspect-fn-props-query-executor.d.ts +0 -4
- package/queries/catalog/inspect-fn-props-query/inspect-fn-props-query-executor.js +0 -58
- package/queries/catalog/inspect-higher-order-query/inspect-higher-order-query-executor.d.ts +0 -7
- package/queries/catalog/inspect-higher-order-query/inspect-higher-order-query-executor.js +0 -25
- package/queries/catalog/inspect-recursion-query/inspect-recursion-query-executor.d.ts +0 -7
- package/queries/catalog/inspect-recursion-query/inspect-recursion-query-executor.js +0 -17
- package/queries/catalog/linter-query/linter-query-executor.d.ts +0 -9
- package/queries/catalog/linter-query/linter-query-executor.js +0 -62
- package/queries/catalog/location-map-query/location-map-query-executor.d.ts +0 -7
- package/queries/catalog/location-map-query/location-map-query-executor.js +0 -73
- package/queries/catalog/normalized-ast-query/normalized-ast-query-executor.d.ts +0 -6
- package/queries/catalog/normalized-ast-query/normalized-ast-query-executor.js +0 -20
- package/queries/catalog/origin-query/origin-query-executor.d.ts +0 -6
- package/queries/catalog/origin-query/origin-query-executor.js +0 -31
- package/queries/catalog/project-query/project-query-executor.d.ts +0 -6
- package/queries/catalog/project-query/project-query-executor.js +0 -103
- package/queries/catalog/provenance-query/provenance-query-executor.d.ts +0 -6
- package/queries/catalog/provenance-query/provenance-query-executor.js +0 -33
- package/queries/catalog/resolve-value-query/resolve-value-query-executor.d.ts +0 -10
- package/queries/catalog/resolve-value-query/resolve-value-query-executor.js +0 -40
- package/queries/catalog/search-query/search-query-executor.d.ts +0 -6
- package/queries/catalog/search-query/search-query-executor.js +0 -25
- package/queries/catalog/static-slice-query/static-slice-query-executor.d.ts +0 -14
- package/queries/catalog/static-slice-query/static-slice-query-executor.js +0 -59
- package/queries/catalog/taint-query/taint-query-executor.d.ts +0 -7
- package/queries/catalog/taint-query/taint-query-executor.js +0 -30
|
@@ -3,6 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.BaseDefinitions = void 0;
|
|
4
4
|
const define_helpers_1 = require("./define-helpers");
|
|
5
5
|
const built_in_kinds_1 = require("../built-in-kinds");
|
|
6
|
+
const ambient_effect_1 = require("../ambient-effect");
|
|
6
7
|
const identifier_1 = require("../identifier");
|
|
7
8
|
const built_in_proc_name_1 = require("../built-in-proc-name");
|
|
8
9
|
const built_in_eval_name_1 = require("../built-in-eval-name");
|
|
@@ -11,16 +12,33 @@ const built_in_props_1 = require("../built-in-props");
|
|
|
11
12
|
const ambient_state_name_1 = require("../ambient-state-name");
|
|
12
13
|
const shared_signatures_1 = require("./shared-signatures");
|
|
13
14
|
const shared_configs_1 = require("./shared-configs");
|
|
15
|
+
const SinkSig = (0, shared_signatures_1.sig)({ file: built_in_props_1.ArgProp.Resource });
|
|
16
|
+
/** `sink(file)` diverts the output of the `type`, `sink()` ends the diversion */
|
|
17
|
+
const SinkArg = (arg, is) => ({ arg, formals: ['file', 'append', 'type', 'split'], is });
|
|
18
|
+
const SinkStack = (family, types, others) => [{ ...family.opens, when: SinkArg('type', types), unless: SinkArg('file', [null]) }, { ...family.closes, when: SinkArg('file', [null]), unless: SinkArg('type', others) }];
|
|
19
|
+
/** a kind among the arguments (`set.seed(1, "Wichmann-Hill")`) reseeds the generator from its current state, which changes the stream as well */
|
|
20
|
+
const SetsRngKind = (formals) => [{ ...ambient_effect_1.Ambient.rng.adds, when: { besides: formals } }, { ...ambient_effect_1.Ambient.rngKind.writes, when: { besides: formals } }];
|
|
21
|
+
/* closing a connection flushes what was written through it, so the file it leaves holds those writes */
|
|
22
|
+
const ClosesConnection = [ambient_effect_1.Ambient.files.reads, ambient_effect_1.Ambient.files.writes];
|
|
23
|
+
/* removing a file tells whether it was there, and the path may name a directory */
|
|
24
|
+
const RemovesFiles = (removed) => ({ ambient: [ambient_effect_1.Ambient.directories.adds, { ...ambient_effect_1.Ambient.files.reads, sig: removed }], tags: [built_in_props_1.SemanticCallTag.File, built_in_props_1.SemanticCallTag.Writes], sig: removed });
|
|
25
|
+
/** what signaling or reporting a condition asks of it, any method of them may run */
|
|
26
|
+
const ConditionAccessors = ['conditionMessage', 'conditionCall', 'as.character', 'as.vector'];
|
|
14
27
|
/** what signals a message or a warning, handing on what it is given */
|
|
15
28
|
const Signals = {
|
|
16
29
|
keepArgumentOut: true,
|
|
17
|
-
hasUnknownSideEffects: { type: 'link-to-last-call', callName: /^sink$/ },
|
|
18
30
|
props: built_in_props_1.CallProp.Invisible,
|
|
19
31
|
tags: [built_in_props_1.SemanticCallTag.Prints],
|
|
20
|
-
|
|
32
|
+
ambient: ambient_effect_1.Ambient.messageSink.adds,
|
|
33
|
+
sig: (0, shared_signatures_1.sig)({ '...': built_in_props_1.ArgProp.Alias | built_in_props_1.ArgProp.Forced }),
|
|
34
|
+
dispatches: ConditionAccessors
|
|
21
35
|
};
|
|
36
|
+
/** what muffles the conditions its code signals */
|
|
37
|
+
const Suppresses = { keepArgumentOut: true, sig: (0, shared_signatures_1.sig)({ expr: built_in_props_1.ArgProp.Alias | built_in_props_1.ArgProp.Forced, classes: built_in_props_1.ArgProp.Value }) };
|
|
38
|
+
/** the restarts a signal establishes for its handlers, invoking them resumes the signaling call */
|
|
39
|
+
const MuffleRestarts = ['muffleWarning', 'muffleMessage'];
|
|
22
40
|
/** what signals an error */
|
|
23
|
-
const Throws = { useAsProcessor: built_in_proc_name_1.BuiltInProcName.Stop, cfg: 4 /* ExitPointType.Error */, props: built_in_props_1.CallProp.Throws, sig: (0, shared_signatures_1.sig)({ '...': built_in_props_1.ArgProp.Forced }) };
|
|
41
|
+
const Throws = { useAsProcessor: built_in_proc_name_1.BuiltInProcName.Stop, cfg: 4 /* ExitPointType.Error */, props: built_in_props_1.CallProp.Throws, sig: (0, shared_signatures_1.sig)({ '...': built_in_props_1.ArgProp.Forced }), dispatches: ConditionAccessors };
|
|
24
42
|
/** The built-in definitions of the base package. */
|
|
25
43
|
exports.BaseDefinitions = [
|
|
26
44
|
(0, define_helpers_1.constant)((0, define_helpers_1.base)('NULL'), null, define_helpers_1.Primitive),
|
|
@@ -41,7 +59,9 @@ exports.BaseDefinitions = [
|
|
|
41
59
|
(0, define_helpers_1.fn)((0, define_helpers_1.base)('t'), built_in_proc_name_1.BuiltInProcName.DefaultReadAllArgs, { props: built_in_props_1.CallProp.Pure, tags: [built_in_props_1.SemanticCallTag.Transforms], sig: shared_signatures_1.SigXDots }, define_helpers_1.Primitive),
|
|
42
60
|
/* an {@link BuiltInEvalName} marks what the value solver folds; a test checks the names against the handler tables */
|
|
43
61
|
/* the result follows from how large the argument is, not from what is in it, so it is bounded (`Narrows`) */
|
|
44
|
-
|
|
62
|
+
/* their bodies ask `dim(x)` and `length(x)`, which dispatch on the class of `x` */
|
|
63
|
+
(0, define_helpers_1.fn)((0, define_helpers_1.base)('nrow', 'ncol', 'NROW', 'NCOL'), built_in_proc_name_1.BuiltInProcName.DefaultReadAllArgs, { props: built_in_props_1.CallProp.Pure, tags: [built_in_props_1.SemanticCallTag.Narrows], sig: shared_signatures_1.SigShape, dispatches: ['dim', 'length'] }, define_helpers_1.Primitive),
|
|
64
|
+
(0, define_helpers_1.fn)((0, define_helpers_1.base)('length', 'lengths', 'dim', 'is.null', 'is.factor', 'is.vector', 'is.matrix', 'is.data.frame', 'is.numeric', 'is.character', 'is.logical', 'is.function', 'is.list', 'is.double', 'is.integer', 'is.complex', 'is.raw', 'is.single', 'is.ordered'), built_in_proc_name_1.BuiltInProcName.DefaultReadAllArgs, { props: built_in_props_1.CallProp.Pure, tags: [built_in_props_1.SemanticCallTag.Narrows], sig: shared_signatures_1.SigShape }, define_helpers_1.Primitive),
|
|
45
65
|
/* the names and the class are read off the argument, so whatever it carries can show up in the result */
|
|
46
66
|
(0, define_helpers_1.fn)((0, define_helpers_1.base)('dimnames', 'names', 'rownames', 'colnames', 'class'), built_in_proc_name_1.BuiltInProcName.DefaultReadAllArgs, { props: built_in_props_1.CallProp.Pure, sig: shared_signatures_1.SigShape }, define_helpers_1.Primitive),
|
|
47
67
|
(0, define_helpers_1.fn)((0, define_helpers_1.base)('structure'), built_in_proc_name_1.BuiltInProcName.DefaultReadAllArgs, { props: built_in_props_1.CallProp.Pure, sig: (0, shared_signatures_1.sig)({ '.Data': shared_signatures_1.Forced.Value, '...': shared_signatures_1.Forced.Value }) }),
|
|
@@ -49,14 +69,14 @@ exports.BaseDefinitions = [
|
|
|
49
69
|
(0, define_helpers_1.fn)((0, define_helpers_1.base)('missing'), built_in_proc_name_1.BuiltInProcName.DefaultReadAllArgs, { props: built_in_props_1.CallProp.Pure, sig: (0, shared_signatures_1.sig)({ x: built_in_props_1.ArgProp.Presence }) }, define_helpers_1.Primitive),
|
|
50
70
|
/* they fold everything they are handed into one result */
|
|
51
71
|
(0, define_helpers_1.fn)((0, define_helpers_1.base)('sum', 'prod', 'min', 'max', 'range', 'pmin', 'pmax', 'order', 'any'), built_in_proc_name_1.BuiltInProcName.DefaultReadAllArgs, { props: built_in_props_1.CallProp.Pure, sig: shared_signatures_1.SigDots }, define_helpers_1.Primitive),
|
|
52
|
-
(0, define_helpers_1.fn)((0, define_helpers_1.base)('data.frame', 'table'), built_in_proc_name_1.BuiltInProcName.DefaultReadAllArgs, { props: built_in_props_1.CallProp.Pure, sig: shared_signatures_1.SigDotsDeparsed }, define_helpers_1.Primitive),
|
|
72
|
+
(0, define_helpers_1.fn)((0, define_helpers_1.base)('data.frame', 'table'), built_in_proc_name_1.BuiltInProcName.DefaultReadAllArgs, { props: built_in_props_1.CallProp.Pure, sig: shared_signatures_1.SigDotsDeparsed, dispatches: ['as.data.frame', 'as.character', 'as.vector', 'length', 'names', 'unique'] }, define_helpers_1.Primitive),
|
|
53
73
|
(0, define_helpers_1.fn)((0, define_helpers_1.base)('cbind', 'rbind'), built_in_proc_name_1.BuiltInProcName.DefaultReadAllArgs, { props: built_in_props_1.CallProp.Pure, tags: [built_in_props_1.SemanticCallTag.Transforms], sig: shared_signatures_1.SigDotsDeparsed }, define_helpers_1.Primitive),
|
|
54
74
|
/* the separator sits behind the `...`, so R (and the {@link FnSig}) only ever matches it by its full name */
|
|
55
|
-
(0, define_helpers_1.fn)((0, define_helpers_1.base)('paste', 'paste0'), built_in_proc_name_1.BuiltInProcName.DefaultReadAllArgs, { props: built_in_props_1.CallProp.Pure, sig: (0, shared_signatures_1.sig)({ '...': shared_signatures_1.Forced.Value, sep: shared_signatures_1.Forced.Value }), dispatches: ['as.character'] }, { assumePrimitive: true, evalHandler: built_in_eval_name_1.BuiltInEvalName.StringFn }),
|
|
56
|
-
(0, define_helpers_1.fn)((0, define_helpers_1.base)('file.path'), built_in_proc_name_1.BuiltInProcName.DefaultReadAllArgs, { props: built_in_props_1.CallProp.Pure, sig: (0, shared_signatures_1.sig)({ '...': shared_signatures_1.Forced.Value, fsep: shared_signatures_1.Forced.Value }), dispatches: ['as.character'] }, { assumePrimitive: true, evalHandler: built_in_eval_name_1.BuiltInEvalName.StringFn }),
|
|
75
|
+
(0, define_helpers_1.fn)((0, define_helpers_1.base)('paste', 'paste0'), built_in_proc_name_1.BuiltInProcName.DefaultReadAllArgs, { props: built_in_props_1.CallProp.Pure, ambient: shared_configs_1.ReadsNumberFormat, sig: (0, shared_signatures_1.sig)({ '...': shared_signatures_1.Forced.Value, sep: shared_signatures_1.Forced.Value }), dispatches: ['as.character', 'as.vector'] }, { assumePrimitive: true, evalHandler: built_in_eval_name_1.BuiltInEvalName.StringFn }),
|
|
76
|
+
(0, define_helpers_1.fn)((0, define_helpers_1.base)('file.path'), built_in_proc_name_1.BuiltInProcName.DefaultReadAllArgs, { props: built_in_props_1.CallProp.Pure, ambient: shared_configs_1.ReadsNumberFormat, sig: (0, shared_signatures_1.sig)({ '...': shared_signatures_1.Forced.Value, fsep: shared_signatures_1.Forced.Value }), dispatches: ['as.character', 'as.vector'] }, { assumePrimitive: true, evalHandler: built_in_eval_name_1.BuiltInEvalName.StringFn }),
|
|
57
77
|
/* `x` carries the data, whatever follows only tunes the result */
|
|
58
78
|
(0, define_helpers_1.fn)([...identifier_1.Identifier.fromAll("base" /* PkgName.Base */, ['mean', /* running summaries & reordering */ 'cumsum', 'cumprod', 'cummax', 'cummin', 'diff', 'sort', 'rev', 'unique', 'duplicated',
|
|
59
|
-
/* coercion */ 'as.
|
|
79
|
+
/* coercion */ 'as.matrix', 'as.data.frame', 'as.factor', 'as.raw', 'as.list', 'as.array', 'factor', 'as.ordered']), ...(0, define_helpers_1.utils)('head', 'tail'), ...(0, define_helpers_1.stats)('var', 'sd', 'median', 'quantile')], built_in_proc_name_1.BuiltInProcName.DefaultReadAllArgs, { props: built_in_props_1.CallProp.Pure, sig: shared_signatures_1.SigXDots }, define_helpers_1.Primitive),
|
|
60
80
|
/* a number or a logical carries none of the text it was converted from */
|
|
61
81
|
(0, define_helpers_1.fn)((0, define_helpers_1.base)('as.integer', 'as.logical', 'as.numeric', 'as.double', 'as.complex', 'as.single'), built_in_proc_name_1.BuiltInProcName.DefaultReadAllArgs, { props: built_in_props_1.CallProp.Pure, tags: [built_in_props_1.SemanticCallTag.Narrows], sig: shared_signatures_1.SigXDots }, define_helpers_1.Primitive),
|
|
62
82
|
/* they read the values but answer only with a logical, so nothing those values carry reaches the result */
|
|
@@ -91,9 +111,10 @@ exports.BaseDefinitions = [
|
|
|
91
111
|
/* the rest of the pure computations, where no single shape fits */
|
|
92
112
|
(0, define_helpers_1.fn)([...identifier_1.Identifier.fromAll("base" /* PkgName.Base */, ['rep', 'rep.int', 'seq.int', 'append', 'complex', 'matrix', 'array', 'prop.table', 'colSums', 'rowSums', 'colMeans', 'rowMeans', 'solve',
|
|
93
113
|
'det', 'eigen', 'aperm', /* string */ 'grep', 'sub', 'gsub', 'substr', 'substring', 'strsplit', 'strrep', 'chartr', 'strtoi', 'shQuote', 'regexpr', 'gregexpr', 'regexec', 'format',
|
|
94
|
-
|
|
114
|
+
/* regmatches yields a substring of its subject, so what flows in flows out */ 'regmatches']), ...(0, define_helpers_1.stats)('cor', 'cov', 'xtabs')], built_in_proc_name_1.BuiltInProcName.DefaultReadAllArgs, { props: built_in_props_1.CallProp.Pure }, define_helpers_1.Primitive),
|
|
95
115
|
/* indices and index sequences: bounded by the shape of what they are handed, never by its contents */
|
|
96
|
-
(
|
|
116
|
+
/* `seq_along(x)` asks `length(x)` and `which.max(x)` asks `xtfrm(x)` */
|
|
117
|
+
(0, define_helpers_1.fn)((0, define_helpers_1.base)('which', 'which.max', 'which.min', 'seq_len', 'seq_along'), built_in_proc_name_1.BuiltInProcName.DefaultReadAllArgs, { props: built_in_props_1.CallProp.Pure, tags: [built_in_props_1.SemanticCallTag.Narrows], dispatches: ['length', 'xtfrm'] }, define_helpers_1.Primitive),
|
|
97
118
|
/* `seq` dispatches, so `...` really is all it declares; the named formals belong to `seq.default`/`seq.int` */
|
|
98
119
|
(0, define_helpers_1.fn)((0, define_helpers_1.base)('seq'), built_in_proc_name_1.BuiltInProcName.DefaultReadAllArgs, { props: built_in_props_1.CallProp.Pure, sig: (0, shared_signatures_1.sig)({ '...': shared_signatures_1.Forced.Value }) }, define_helpers_1.Primitive),
|
|
99
120
|
(0, define_helpers_1.fn)((0, define_helpers_1.base)('scan'), built_in_proc_name_1.BuiltInProcName.DefaultReadAllArgs, { tags: [built_in_props_1.SemanticCallTag.File, built_in_props_1.SemanticCallTag.Reads, built_in_props_1.SemanticCallTag.User], sig: (0, shared_signatures_1.sig)({ file: shared_signatures_1.Forced.Resource | built_in_props_1.ArgProp.Optional }) }),
|
|
@@ -108,13 +129,18 @@ exports.BaseDefinitions = [
|
|
|
108
129
|
(0, define_helpers_1.fn)((0, define_helpers_1.base)('socketConnection', 'serverSocket'), built_in_proc_name_1.BuiltInProcName.DefaultReadAllArgs, { tags: [built_in_props_1.SemanticCallTag.Opens, built_in_props_1.SemanticCallTag.Network, built_in_props_1.SemanticCallTag.Reads], sig: (0, shared_signatures_1.sig)({ host: shared_signatures_1.Forced.Resource }) }),
|
|
109
130
|
(0, define_helpers_1.fn)((0, define_helpers_1.base)('rawConnection'), built_in_proc_name_1.BuiltInProcName.DefaultReadAllArgs, { tags: [built_in_props_1.SemanticCallTag.Opens], sig: (0, shared_signatures_1.sig)({ object: shared_signatures_1.Forced.Value }) }),
|
|
110
131
|
(0, define_helpers_1.fn)((0, define_helpers_1.base)('stdout', 'stderr', 'stdin'), built_in_proc_name_1.BuiltInProcName.Default, { tags: [built_in_props_1.SemanticCallTag.Console] }),
|
|
111
|
-
|
|
132
|
+
/* how many diversions are on the stack */
|
|
133
|
+
(0, define_helpers_1.fn)((0, define_helpers_1.base)('sink.number'), built_in_proc_name_1.BuiltInProcName.Default, { ambient: { ...ambient_effect_1.Ambient.sink.reads, member: 'every' } }),
|
|
134
|
+
/* what was written into a text connection, pushed back lines are read before the rest */
|
|
135
|
+
(0, define_helpers_1.fn)((0, define_helpers_1.base)('textConnectionValue'), built_in_proc_name_1.BuiltInProcName.DefaultReadAllArgs, { tags: [built_in_props_1.SemanticCallTag.File, built_in_props_1.SemanticCallTag.Reads], sig: (0, shared_signatures_1.sig)({ con: shared_signatures_1.Forced.Resource }) }),
|
|
136
|
+
(0, define_helpers_1.fn)((0, define_helpers_1.base)('pushBack'), built_in_proc_name_1.BuiltInProcName.DefaultReadAllArgs, { props: built_in_props_1.CallProp.Invisible, ambient: ambient_effect_1.Ambient.files.writes, sig: (0, shared_signatures_1.sig)({ data: shared_signatures_1.Forced.Value, connection: shared_signatures_1.Forced.Handle, newLine: shared_signatures_1.Forced.Flag, encoding: shared_signatures_1.Forced.Flag }) }),
|
|
137
|
+
(0, define_helpers_1.fn)((0, define_helpers_1.base)('textConnection'), built_in_proc_name_1.BuiltInProcName.DefaultReadAllArgs, { ambient: ambient_effect_1.Ambient.textConnection.opens, tags: [built_in_props_1.SemanticCallTag.Opens], sig: (0, shared_signatures_1.sig)({ object: shared_signatures_1.Forced.Value }) }),
|
|
112
138
|
/* the calls ending what an opener started, each stating the argument holding the handle */
|
|
113
139
|
/* opening a connection decides where it reads and whether a write appends, which later uses of it depend on */
|
|
114
140
|
(0, define_helpers_1.fn)((0, define_helpers_1.base)('open', 'open.connection', 'seek'), built_in_proc_name_1.BuiltInProcName.DefaultReadAllArgs, { props: built_in_props_1.CallProp.Invisible, tags: [built_in_props_1.SemanticCallTag.File, built_in_props_1.SemanticCallTag.Writes], sig: (0, shared_signatures_1.sig)({ con: shared_signatures_1.Forced.Resource | built_in_props_1.ArgProp.Handle, '...': shared_signatures_1.Forced.Value }) }),
|
|
115
|
-
(0, define_helpers_1.fn)((0, define_helpers_1.base)('close'), built_in_proc_name_1.BuiltInProcName.DefaultReadAllArgs, { props: built_in_props_1.CallProp.Invisible | built_in_props_1.CallProp.Generic, ambient:
|
|
116
|
-
(0, define_helpers_1.fn)((0, define_helpers_1.base)('close.connection'), built_in_proc_name_1.BuiltInProcName.DefaultReadAllArgs, { props: built_in_props_1.CallProp.Invisible, ambient:
|
|
117
|
-
(0, define_helpers_1.fn)((0, define_helpers_1.base)('flush'), built_in_proc_name_1.BuiltInProcName.DefaultReadAllArgs, { props: built_in_props_1.CallProp.Invisible | built_in_props_1.CallProp.Generic, ambient:
|
|
141
|
+
(0, define_helpers_1.fn)((0, define_helpers_1.base)('close'), built_in_proc_name_1.BuiltInProcName.DefaultReadAllArgs, { props: built_in_props_1.CallProp.Invisible | built_in_props_1.CallProp.Generic, ambient: ClosesConnection, tags: [built_in_props_1.SemanticCallTag.Closes], sig: (0, shared_signatures_1.sig)({ con: shared_signatures_1.Forced.Handle, '...': shared_signatures_1.Forced.Value }) }),
|
|
142
|
+
(0, define_helpers_1.fn)((0, define_helpers_1.base)('close.connection'), built_in_proc_name_1.BuiltInProcName.DefaultReadAllArgs, { props: built_in_props_1.CallProp.Invisible, ambient: ClosesConnection, tags: [built_in_props_1.SemanticCallTag.Closes], sig: (0, shared_signatures_1.sig)({ con: shared_signatures_1.Forced.Handle, type: shared_signatures_1.Forced.Flag, '...': shared_signatures_1.Forced.Value }) }),
|
|
143
|
+
(0, define_helpers_1.fn)((0, define_helpers_1.base)('flush'), built_in_proc_name_1.BuiltInProcName.DefaultReadAllArgs, { props: built_in_props_1.CallProp.Invisible | built_in_props_1.CallProp.Generic, ambient: ambient_effect_1.Ambient.files.writes, sig: (0, shared_signatures_1.sig)({ con: shared_signatures_1.Forced.Handle }) }),
|
|
118
144
|
(0, define_helpers_1.fn)((0, define_helpers_1.base)('closeAllConnections'), built_in_proc_name_1.BuiltInProcName.DefaultReadAllArgs, { props: built_in_props_1.CallProp.Invisible, tags: [built_in_props_1.SemanticCallTag.Closes] }),
|
|
119
145
|
(0, define_helpers_1.fn)((0, define_helpers_1.base)('readLines', 'readBin', 'readChar'), built_in_proc_name_1.BuiltInProcName.DefaultReadAllArgs, { tags: [built_in_props_1.SemanticCallTag.File, built_in_props_1.SemanticCallTag.Reads], sig: (0, shared_signatures_1.sig)({ con: shared_signatures_1.Forced.Resource }) }),
|
|
120
146
|
(0, define_helpers_1.fn)((0, define_helpers_1.base)('readRDS', 'dget'), built_in_proc_name_1.BuiltInProcName.DefaultReadAllArgs, { tags: [built_in_props_1.SemanticCallTag.File, built_in_props_1.SemanticCallTag.Reads], sig: (0, shared_signatures_1.sig)({ file: shared_signatures_1.Forced.Resource }) }),
|
|
@@ -123,55 +149,59 @@ exports.BaseDefinitions = [
|
|
|
123
149
|
(0, define_helpers_1.fn)((0, define_helpers_1.base)('saveRDS'), built_in_proc_name_1.BuiltInProcName.DefaultReadAllArgs, { props: built_in_props_1.CallProp.Invisible, tags: [built_in_props_1.SemanticCallTag.File, built_in_props_1.SemanticCallTag.Writes], sig: (0, shared_signatures_1.sig)({ object: shared_signatures_1.Forced.Value, file: shared_signatures_1.Forced.Resource | built_in_props_1.ArgProp.Optional }) }),
|
|
124
150
|
(0, define_helpers_1.fn)((0, define_helpers_1.base)('save'), built_in_proc_name_1.BuiltInProcName.DefaultReadAllArgs, { namesIn: ['...', 'list'], props: built_in_props_1.CallProp.Invisible, tags: [built_in_props_1.SemanticCallTag.File, built_in_props_1.SemanticCallTag.Writes], sig: (0, shared_signatures_1.sig)({ '...': shared_signatures_1.Forced.Value, list: shared_signatures_1.Forced.Value, file: shared_signatures_1.Forced.Resource }) }),
|
|
125
151
|
(0, define_helpers_1.fn)((0, define_helpers_1.base)('save.image'), built_in_proc_name_1.BuiltInProcName.EnvContents, { props: built_in_props_1.CallProp.Invisible, tags: [built_in_props_1.SemanticCallTag.File, built_in_props_1.SemanticCallTag.Writes], sig: (0, shared_signatures_1.sig)({ file: shared_signatures_1.Forced.Resource }) }),
|
|
126
|
-
(0, define_helpers_1.fn)((0, define_helpers_1.base)('dir.exists'), built_in_proc_name_1.BuiltInProcName.DefaultReadAllArgs, { tags: [built_in_props_1.SemanticCallTag.File, built_in_props_1.SemanticCallTag.Reads], sig: (0, shared_signatures_1.sig)({
|
|
152
|
+
(0, define_helpers_1.fn)((0, define_helpers_1.base)('dir.exists'), built_in_proc_name_1.BuiltInProcName.DefaultReadAllArgs, { tags: [built_in_props_1.SemanticCallTag.File, built_in_props_1.SemanticCallTag.Reads], sig: (0, shared_signatures_1.sig)({ paths: shared_signatures_1.Forced.Resource }) }),
|
|
127
153
|
(0, define_helpers_1.fn)((0, define_helpers_1.base)('file.access'), built_in_proc_name_1.BuiltInProcName.DefaultReadAllArgs, { tags: [built_in_props_1.SemanticCallTag.File, built_in_props_1.SemanticCallTag.Reads], sig: (0, shared_signatures_1.sig)({ names: shared_signatures_1.Forced.Resource, mode: shared_signatures_1.Forced.Flag }) }),
|
|
128
|
-
(0, define_helpers_1.fn)([...(0, define_helpers_1.base)('normalizePath'), ...(0, define_helpers_1.pkg)("fs" /* PkgName.Fs */, 'path_abs', 'path_real')], built_in_proc_name_1.BuiltInProcName.DefaultReadAllArgs, { ambient:
|
|
154
|
+
(0, define_helpers_1.fn)([...(0, define_helpers_1.base)('normalizePath'), ...(0, define_helpers_1.pkg)("fs" /* PkgName.Fs */, 'path_abs', 'path_real')], built_in_proc_name_1.BuiltInProcName.DefaultReadAllArgs, { ambient: ambient_effect_1.Ambient.wd.reads, props: built_in_props_1.CallProp.Ambient, sig: (0, shared_signatures_1.sig)({ path: shared_signatures_1.Forced.Value, winslash: shared_signatures_1.Forced.Flag, mustWork: shared_signatures_1.Forced.Flag }) }),
|
|
129
155
|
(0, define_helpers_1.fn)((0, define_helpers_1.base)('dput'), built_in_proc_name_1.BuiltInProcName.DefaultReadAllArgs, { props: built_in_props_1.CallProp.Invisible, tags: [built_in_props_1.SemanticCallTag.File, built_in_props_1.SemanticCallTag.Writes, built_in_props_1.SemanticCallTag.Prints], sig: (0, shared_signatures_1.sig)({ x: shared_signatures_1.Forced.Value, file: shared_signatures_1.Forced.Resource | built_in_props_1.ArgProp.Optional }) }),
|
|
130
|
-
(0, define_helpers_1.fn)((0, define_helpers_1.base)('write'), built_in_proc_name_1.BuiltInProcName.DefaultReadAllArgs, { props: built_in_props_1.CallProp.Invisible, tags: [built_in_props_1.SemanticCallTag.File, built_in_props_1.SemanticCallTag.Writes, built_in_props_1.SemanticCallTag.Prints], sig: (0, shared_signatures_1.sig)({ x: shared_signatures_1.Forced.Value, file: shared_signatures_1.Forced.Resource }) }),
|
|
156
|
+
(0, define_helpers_1.fn)((0, define_helpers_1.base)('write'), built_in_proc_name_1.BuiltInProcName.DefaultReadAllArgs, { props: built_in_props_1.CallProp.Invisible, tags: [built_in_props_1.SemanticCallTag.File, built_in_props_1.SemanticCallTag.Writes, built_in_props_1.SemanticCallTag.Prints], sig: (0, shared_signatures_1.sig)({ x: shared_signatures_1.Forced.Value, file: shared_signatures_1.Forced.Resource, ncolumns: shared_signatures_1.Forced.Value, append: shared_signatures_1.Forced.Flag }) }),
|
|
131
157
|
(0, define_helpers_1.fn)((0, define_helpers_1.base)('write.dcf'), built_in_proc_name_1.BuiltInProcName.DefaultReadAllArgs, { props: built_in_props_1.CallProp.Invisible, tags: [built_in_props_1.SemanticCallTag.File, built_in_props_1.SemanticCallTag.Writes], sig: (0, shared_signatures_1.sig)({ x: shared_signatures_1.Forced.Value, file: shared_signatures_1.Forced.Resource | built_in_props_1.ArgProp.Optional }) }),
|
|
132
|
-
(0, define_helpers_1.fn)((0, define_helpers_1.base)('jitter'), built_in_proc_name_1.BuiltInProcName.DefaultReadAllArgs, { ambient:
|
|
133
|
-
(0, define_helpers_1.fn)([...(0, define_helpers_1.base)('sample', 'sample.int'), ...(0, define_helpers_1.stats)('runif', 'rnorm', 'rbinom', 'rpois', 'rexp', 'rgamma', 'rbeta', 'rcauchy', 'rchisq', 'rgeom', 'rhyper', 'rlnorm', 'rlogis', 'rmultinom', 'rnbinom', 'rsignrank', 'rt', 'rf', 'rweibull', 'rwilcox', 'arima.sim', 'simulate', 'kmeans')], built_in_proc_name_1.BuiltInProcName.DefaultReadAllArgs, { ambient:
|
|
158
|
+
(0, define_helpers_1.fn)((0, define_helpers_1.base)('jitter'), built_in_proc_name_1.BuiltInProcName.DefaultReadAllArgs, { ambient: ambient_effect_1.Ambient.rng.adds, tags: [built_in_props_1.SemanticCallTag.Random], sig: (0, shared_signatures_1.sig)({ x: built_in_props_1.ArgProp.NoDefault, factor: 0, amount: 0 }) }, define_helpers_1.Primitive),
|
|
159
|
+
(0, define_helpers_1.fn)([...(0, define_helpers_1.base)('sample', 'sample.int'), ...(0, define_helpers_1.stats)('runif', 'rnorm', 'rbinom', 'rpois', 'rexp', 'rgamma', 'rbeta', 'rcauchy', 'rchisq', 'rgeom', 'rhyper', 'rlnorm', 'rlogis', 'rmultinom', 'rnbinom', 'rsignrank', 'rt', 'rf', 'rweibull', 'rwilcox', 'arima.sim', 'simulate', 'kmeans')], built_in_proc_name_1.BuiltInProcName.DefaultReadAllArgs, { ambient: ambient_effect_1.Ambient.rng.adds, tags: [built_in_props_1.SemanticCallTag.Random] }),
|
|
134
160
|
(0, define_helpers_1.fn)((0, define_helpers_1.base)('expression'), built_in_proc_name_1.BuiltInProcName.Default, { props: built_in_props_1.CallProp.Lang, sig: (0, shared_signatures_1.sig)({ '...': built_in_props_1.ArgProp.Nse }) }, define_helpers_1.Primitive),
|
|
135
|
-
(0, define_helpers_1.fn)((0, define_helpers_1.base)('reg.finalizer'), built_in_proc_name_1.BuiltInProcName.Default, { ambient:
|
|
136
|
-
(0, define_helpers_1.fn)((0, define_helpers_1.base)('gc'), built_in_proc_name_1.BuiltInProcName.Default, { ambient:
|
|
137
|
-
(0, define_helpers_1.fn)((0, define_helpers_1.base)('rm'), built_in_proc_name_1.BuiltInProcName.Rm, { props: built_in_props_1.CallProp.Invisible | built_in_props_1.CallProp.Scope, sig: (0, shared_signatures_1.sig)({ '...': 0, list: built_in_props_1.ArgProp.Forced, pos: 0, envir: built_in_props_1.ArgProp.Forced, inherits: built_in_props_1.ArgProp.Forced }) }, define_helpers_1.Primitive),
|
|
161
|
+
(0, define_helpers_1.fn)((0, define_helpers_1.base)('reg.finalizer'), built_in_proc_name_1.BuiltInProcName.Default, { ambient: ambient_effect_1.Ambient.finalizers.adds, sig: (0, shared_signatures_1.sig)({ e: built_in_props_1.ArgProp.Forced, f: built_in_props_1.ArgProp.Forced, onexit: shared_signatures_1.Forced.Flag }) }),
|
|
162
|
+
(0, define_helpers_1.fn)((0, define_helpers_1.base)('gc'), built_in_proc_name_1.BuiltInProcName.Default, { ambient: ambient_effect_1.Ambient.finalizers.reads, sig: (0, shared_signatures_1.sig)({ verbose: shared_signatures_1.Forced.Flag, reset: shared_signatures_1.Forced.Flag, full: shared_signatures_1.Forced.Flag }) }),
|
|
163
|
+
(0, define_helpers_1.fn)((0, define_helpers_1.base)('rm', 'remove'), built_in_proc_name_1.BuiltInProcName.Rm, { props: built_in_props_1.CallProp.Invisible | built_in_props_1.CallProp.Scope, sig: (0, shared_signatures_1.sig)({ '...': 0, list: built_in_props_1.ArgProp.Forced, pos: 0, envir: built_in_props_1.ArgProp.Forced, inherits: built_in_props_1.ArgProp.Forced }) }, define_helpers_1.Primitive),
|
|
138
164
|
/* they read the state they set, so both bits apply */
|
|
139
|
-
(0, define_helpers_1.fn)((0, define_helpers_1.base)('options'), built_in_proc_name_1.BuiltInProcName.Default, { ambient: {
|
|
165
|
+
(0, define_helpers_1.fn)((0, define_helpers_1.base)('options'), built_in_proc_name_1.BuiltInProcName.Default, { ambient: [{ ...ambient_effect_1.Ambient.option.writes, member: { from: 'argument-names' }, unless: 'query' }, { ...ambient_effect_1.Ambient.option.reads, member: { from: 'unnamed', quoted: true }, when: 'query' }], props: built_in_props_1.CallProp.Invisible | built_in_props_1.CallProp.Ambient | built_in_props_1.CallProp.Configures, sig: (0, shared_signatures_1.sig)({ '...': built_in_props_1.ArgProp.Forced }) }),
|
|
140
166
|
/* `Sys.putenv` is defunct in current R, older scripts still use it */
|
|
141
|
-
(0, define_helpers_1.fn)((0, define_helpers_1.base)('Sys.setenv', 'Sys.putenv'), built_in_proc_name_1.BuiltInProcName.Default, { ambient: {
|
|
142
|
-
(0, define_helpers_1.fn)((0, define_helpers_1.base)('Sys.unsetenv'), built_in_proc_name_1.BuiltInProcName.Default, { ambient: (0, shared_configs_1.SetsEntryNamedBy)(ambient_state_name_1.KeyedState.Env, ['x'], 'x'), props: built_in_props_1.CallProp.Invisible | built_in_props_1.CallProp.Configures, sig: (0, shared_signatures_1.sig)({ '...': built_in_props_1.ArgProp.Forced }) }),
|
|
167
|
+
(0, define_helpers_1.fn)((0, define_helpers_1.base)('Sys.setenv', 'Sys.putenv'), built_in_proc_name_1.BuiltInProcName.Default, { ambient: { ...ambient_effect_1.Ambient.env.writes, member: { from: 'argument-names' } }, props: built_in_props_1.CallProp.Invisible | built_in_props_1.CallProp.Configures, sig: (0, shared_signatures_1.sig)({ '...': built_in_props_1.ArgProp.Forced }) }),
|
|
168
|
+
(0, define_helpers_1.fn)((0, define_helpers_1.base)('Sys.unsetenv'), built_in_proc_name_1.BuiltInProcName.Default, { ambient: { ...ambient_effect_1.Ambient.env.kills, member: (0, shared_configs_1.SetsEntryNamedBy)(ambient_state_name_1.KeyedState.Env, ['x'], 'x').member }, props: built_in_props_1.CallProp.Invisible | built_in_props_1.CallProp.Configures, sig: (0, shared_signatures_1.sig)({ '...': built_in_props_1.ArgProp.Forced }) }),
|
|
143
169
|
(0, define_helpers_1.fn)((0, define_helpers_1.base)('Sys.setlocale'), built_in_proc_name_1.BuiltInProcName.Default, { ambient: (0, shared_configs_1.SetsEntryNamedBy)(ambient_state_name_1.KeyedState.Locale, ['category', 'locale'], 'category', { fallback: 'LC_ALL' }), hasUnknownSideEffects: true, props: built_in_props_1.CallProp.Invisible | built_in_props_1.CallProp.Configures, sig: (0, shared_signatures_1.sig)({ '...': built_in_props_1.ArgProp.Forced }) }),
|
|
144
170
|
/* the language is the environment variable `LANGUAGE`, which the translations of messages follow */
|
|
145
171
|
(0, define_helpers_1.fn)((0, define_helpers_1.base)('Sys.setLanguage'), built_in_proc_name_1.BuiltInProcName.Default, { ambient: [(0, shared_configs_1.SetsEntry)(ambient_state_name_1.KeyedState.Locale, 'LANGUAGE'), (0, shared_configs_1.SetsEntry)(ambient_state_name_1.KeyedState.Env, 'LANGUAGE')], hasUnknownSideEffects: true, props: built_in_props_1.CallProp.Invisible | built_in_props_1.CallProp.Configures, sig: (0, shared_signatures_1.sig)({ '...': built_in_props_1.ArgProp.Forced }) }),
|
|
146
172
|
(0, define_helpers_1.fn)([...(0, define_helpers_1.base)('mapply'), ...(0, define_helpers_1.pkg)("functools" /* PkgName.Functools */, 'Mapply')], built_in_proc_name_1.BuiltInProcName.Apply, { indexOfFunction: 0, nameOfFunctionArgument: 'FUN', unquoteFunction: true, props: built_in_props_1.CallProp.MayPure, sig: (0, shared_signatures_1.sig)({ FUN: built_in_props_1.ArgProp.Callee, '...': built_in_props_1.ArgProp.Value }) }),
|
|
147
|
-
|
|
173
|
+
/* `X` is turned into a list first, by its `as.list` method */
|
|
174
|
+
(0, define_helpers_1.fn)((0, define_helpers_1.base)('lapply', 'sapply', 'vapply'), built_in_proc_name_1.BuiltInProcName.Apply, { indexOfFunction: 1, nameOfFunctionArgument: 'FUN', unquoteFunction: true, props: built_in_props_1.CallProp.MayPure, sig: (0, shared_signatures_1.sig)({ X: built_in_props_1.ArgProp.Value, FUN: built_in_props_1.ArgProp.Callee, '...': built_in_props_1.ArgProp.Value }), dispatches: ['as.list', 'as.vector', 'length', 'names'] }),
|
|
148
175
|
/* `vapply` takes the shape of the result before its `...`, so naming it keeps the positions honest */
|
|
149
176
|
(0, define_helpers_1.fn)((0, define_helpers_1.base)('vapply'), built_in_proc_name_1.BuiltInProcName.Apply, { indexOfFunction: 1, nameOfFunctionArgument: 'FUN', unquoteFunction: true, props: built_in_props_1.CallProp.MayPure, sig: (0, shared_signatures_1.sig)({ X: built_in_props_1.ArgProp.Value, FUN: built_in_props_1.ArgProp.Callee, 'FUN.VALUE': built_in_props_1.ArgProp.Shape, '...': built_in_props_1.ArgProp.Value }) }, define_helpers_1.Overrides),
|
|
150
177
|
(0, define_helpers_1.fn)([...(0, define_helpers_1.base)('apply', 'tapply'), ...(0, define_helpers_1.pkg)("functools" /* PkgName.Functools */, 'Tapply')], built_in_proc_name_1.BuiltInProcName.Apply, { indexOfFunction: 2, nameOfFunctionArgument: 'FUN', unquoteFunction: true, props: built_in_props_1.CallProp.MayPure, tags: [built_in_props_1.SemanticCallTag.Transforms], sig: (0, shared_signatures_1.sig)({ X: built_in_props_1.ArgProp.NoDefault, '...': 0 }) }),
|
|
151
178
|
(0, define_helpers_1.fn)((0, define_helpers_1.base)('Map'), built_in_proc_name_1.BuiltInProcName.Apply, { indexOfFunction: 0, nameOfFunctionArgument: 'f', unquoteFunction: true, props: built_in_props_1.CallProp.MayPure, sig: (0, shared_signatures_1.sig)({ f: built_in_props_1.ArgProp.Callee, '...': built_in_props_1.ArgProp.Value }) }),
|
|
152
179
|
(0, define_helpers_1.fn)((0, define_helpers_1.base)('outer'), built_in_proc_name_1.BuiltInProcName.Apply, { indexOfFunction: 2, nameOfFunctionArgument: 'FUN', unquoteFunction: true, props: built_in_props_1.CallProp.MayPure, sig: (0, shared_signatures_1.sig)({ X: built_in_props_1.ArgProp.Value, Y: built_in_props_1.ArgProp.Value, FUN: built_in_props_1.ArgProp.Callee, '...': built_in_props_1.ArgProp.Value }) }),
|
|
153
|
-
(0, define_helpers_1.fn)((0, define_helpers_1.base)('Filter'), built_in_proc_name_1.BuiltInProcName.Apply, { indexOfFunction: 0, nameOfFunctionArgument: 'f', unquoteFunction: true, props: built_in_props_1.CallProp.MayPure, sig: (0, shared_signatures_1.sig)({ f: built_in_props_1.ArgProp.Callee, x: built_in_props_1.ArgProp.Value }) }),
|
|
180
|
+
(0, define_helpers_1.fn)((0, define_helpers_1.base)('Filter'), built_in_proc_name_1.BuiltInProcName.Apply, { indexOfFunction: 0, nameOfFunctionArgument: 'f', unquoteFunction: true, props: built_in_props_1.CallProp.MayPure, sig: (0, shared_signatures_1.sig)({ f: built_in_props_1.ArgProp.Callee, x: built_in_props_1.ArgProp.Value }), dispatches: ['as.list', 'as.vector', '['] }),
|
|
154
181
|
(0, define_helpers_1.fn)((0, define_helpers_1.base)('Find', 'Position'), built_in_proc_name_1.BuiltInProcName.Apply, { indexOfFunction: 0, nameOfFunctionArgument: 'f', unquoteFunction: true, props: built_in_props_1.CallProp.MayPure, sig: (0, shared_signatures_1.sig)({ f: built_in_props_1.ArgProp.Callee, x: built_in_props_1.ArgProp.Value, right: built_in_props_1.ArgProp.Flag, nomatch: built_in_props_1.ArgProp.Value }) }),
|
|
155
182
|
(0, define_helpers_1.fn)((0, define_helpers_1.base)('replicate'), built_in_proc_name_1.BuiltInProcName.Default, { props: built_in_props_1.CallProp.MayPure, sig: (0, shared_signatures_1.sig)({ n: shared_signatures_1.Forced.Value, expr: built_in_props_1.ArgProp.Value, simplify: built_in_props_1.ArgProp.Flag }) }),
|
|
156
|
-
(0, define_helpers_1.fn)((0, define_helpers_1.base)('Reduce'), built_in_proc_name_1.BuiltInProcName.Apply, { indexOfFunction: 0, nameOfFunctionArgument: 'f', unquoteFunction: true, folds: ['x', 'init'], props: built_in_props_1.CallProp.MayPure, sig: (0, shared_signatures_1.sig)({ f: built_in_props_1.ArgProp.Callee, x: built_in_props_1.ArgProp.Value, init: built_in_props_1.ArgProp.Value, right: built_in_props_1.ArgProp.Flag, accumulate: built_in_props_1.ArgProp.Flag, simplify: built_in_props_1.ArgProp.Flag }) }),
|
|
183
|
+
(0, define_helpers_1.fn)((0, define_helpers_1.base)('Reduce'), built_in_proc_name_1.BuiltInProcName.Apply, { indexOfFunction: 0, nameOfFunctionArgument: 'f', unquoteFunction: true, folds: ['x', 'init'], props: built_in_props_1.CallProp.MayPure, sig: (0, shared_signatures_1.sig)({ f: built_in_props_1.ArgProp.Callee, x: built_in_props_1.ArgProp.Value, init: built_in_props_1.ArgProp.Value, right: built_in_props_1.ArgProp.Flag, accumulate: built_in_props_1.ArgProp.Flag, simplify: built_in_props_1.ArgProp.Flag }), dispatches: ['as.list', 'as.vector', 'length'] }),
|
|
157
184
|
(0, define_helpers_1.fn)((0, define_helpers_1.base)('rapply'), built_in_proc_name_1.BuiltInProcName.Apply, { indexOfFunction: 1, nameOfFunctionArgument: 'f', unquoteFunction: true, props: built_in_props_1.CallProp.MayPure, sig: (0, shared_signatures_1.sig)({ object: built_in_props_1.ArgProp.NoDefault, f: built_in_props_1.ArgProp.NoDefault, classes: built_in_props_1.ArgProp.Forced, deflt: built_in_props_1.ArgProp.Forced, how: built_in_props_1.ArgProp.Forced, '...': 0 }) }),
|
|
158
|
-
(0, define_helpers_1.fn)((0, define_helpers_1.base)('print'), built_in_proc_name_1.BuiltInProcName.Default, { keepArgumentOut: true,
|
|
185
|
+
(0, define_helpers_1.fn)((0, define_helpers_1.base)('print'), built_in_proc_name_1.BuiltInProcName.Default, { keepArgumentOut: true, ambient: shared_configs_1.PrintDispatched, props: built_in_props_1.CallProp.Invisible | built_in_props_1.CallProp.Generic, tags: [built_in_props_1.SemanticCallTag.Prints], sig: (0, shared_signatures_1.sig)({ x: built_in_props_1.ArgProp.Alias | built_in_props_1.ArgProp.Forced, '...': shared_signatures_1.Forced.Value }), dispatches: ['show', 'format'] }),
|
|
159
186
|
(0, define_helpers_1.fn)((0, define_helpers_1.base)('message'), built_in_proc_name_1.BuiltInProcName.Default, { ...Signals, signals: ['simpleMessage', 'message', 'condition'] }),
|
|
160
187
|
(0, define_helpers_1.fn)((0, define_helpers_1.base)('warning'), built_in_proc_name_1.BuiltInProcName.Default, { ...Signals, signals: ['simpleWarning', 'warning', 'condition'] }),
|
|
161
188
|
(0, define_helpers_1.fn)([...(0, define_helpers_1.pkg)("rlang" /* PkgName.Rlang */, 'warn'), ...(0, define_helpers_1.pkg)("msgr" /* PkgName.Msgr */, 'info')], built_in_proc_name_1.BuiltInProcName.Default, Signals),
|
|
189
|
+
(0, define_helpers_1.fn)((0, define_helpers_1.base)('packageStartupMessage'), built_in_proc_name_1.BuiltInProcName.Default, { ...Signals, signals: ['packageStartupMessage', 'simpleMessage', 'message', 'condition'] }),
|
|
162
190
|
(0, define_helpers_1.fn)((0, define_helpers_1.base)('invisible'), built_in_proc_name_1.BuiltInProcName.Default, { keepArgumentOut: true, props: built_in_props_1.CallProp.Pure | built_in_props_1.CallProp.Invisible, sig: (0, shared_signatures_1.sig)({ x: built_in_props_1.ArgProp.Alias | built_in_props_1.ArgProp.Forced }) }, define_helpers_1.Primitive),
|
|
163
191
|
(0, define_helpers_1.fn)((0, define_helpers_1.base)('force', 'identity'), built_in_proc_name_1.BuiltInProcName.Default, { keepArgumentOut: true, props: built_in_props_1.CallProp.Pure, sig: (0, shared_signatures_1.sig)({ x: built_in_props_1.ArgProp.Alias | built_in_props_1.ArgProp.Forced }) }),
|
|
164
192
|
(0, define_helpers_1.fn)((0, define_helpers_1.base)('I'), built_in_proc_name_1.BuiltInProcName.Default, { keepArgumentOut: true, props: built_in_props_1.CallProp.Pure, sig: (0, shared_signatures_1.sig)({ x: shared_signatures_1.Forced.Value }) }),
|
|
165
|
-
(0, define_helpers_1.fn)((0, define_helpers_1.base)('suppressWarnings'
|
|
193
|
+
(0, define_helpers_1.fn)((0, define_helpers_1.base)('suppressWarnings'), built_in_proc_name_1.BuiltInProcName.Default, { ...Suppresses, muffles: ['warning'] }),
|
|
194
|
+
(0, define_helpers_1.fn)((0, define_helpers_1.base)('suppressMessages'), built_in_proc_name_1.BuiltInProcName.Default, { ...Suppresses, muffles: ['message'] }),
|
|
195
|
+
(0, define_helpers_1.fn)((0, define_helpers_1.base)('suppressPackageStartupMessages'), built_in_proc_name_1.BuiltInProcName.Default, { ...Suppresses, muffles: ['packageStartupMessage'] }),
|
|
166
196
|
/* it changes into a directory that has to exist, so it reads the files as well */
|
|
167
|
-
(0, define_helpers_1.fn)((0, define_helpers_1.base)('setwd'), built_in_proc_name_1.BuiltInProcName.Default, { ambient:
|
|
197
|
+
(0, define_helpers_1.fn)((0, define_helpers_1.base)('setwd'), built_in_proc_name_1.BuiltInProcName.Default, { ambient: [ambient_effect_1.Ambient.wd.reads, ambient_effect_1.Ambient.directories.reads, ambient_effect_1.Ambient.wd.writes], props: built_in_props_1.CallProp.Invisible | built_in_props_1.CallProp.Ambient | built_in_props_1.CallProp.Configures, tags: [built_in_props_1.SemanticCallTag.File, built_in_props_1.SemanticCallTag.Reads], sig: (0, shared_signatures_1.sig)({ dir: built_in_props_1.ArgProp.Value | shared_signatures_1.Forced.Resource }) }),
|
|
168
198
|
/* `Sys.umask()` only reports the mask, a mode sets it and hands back the old one invisibly */
|
|
169
|
-
(0, define_helpers_1.fn)((0, define_helpers_1.base)('Sys.umask'), built_in_proc_name_1.BuiltInProcName.Default, { ambient: {
|
|
170
|
-
(0, define_helpers_1.fn)((0, define_helpers_1.base)('set.seed'), built_in_proc_name_1.BuiltInProcName.Default, { ambient:
|
|
171
|
-
(0, define_helpers_1.fn)((0, define_helpers_1.base)('RNGversion'), built_in_proc_name_1.BuiltInProcName.Default, { ambient:
|
|
172
|
-
(0, define_helpers_1.fn)((0, define_helpers_1.base)('RNGkind'), built_in_proc_name_1.BuiltInProcName.Default, { ambient:
|
|
199
|
+
(0, define_helpers_1.fn)((0, define_helpers_1.base)('Sys.umask'), built_in_proc_name_1.BuiltInProcName.Default, { ambient: { ...ambient_effect_1.Ambient.umask.writes, unless: 'no-arguments' }, props: built_in_props_1.CallProp.Invisible | built_in_props_1.CallProp.Configures, sig: (0, shared_signatures_1.sig)({ mode: shared_signatures_1.Forced.Value }) }),
|
|
200
|
+
(0, define_helpers_1.fn)((0, define_helpers_1.base)('set.seed'), built_in_proc_name_1.BuiltInProcName.Default, { ambient: [ambient_effect_1.Ambient.rngKind.reads, ambient_effect_1.Ambient.rng.writes, ...SetsRngKind(['seed'])], props: built_in_props_1.CallProp.Invisible | built_in_props_1.CallProp.Configures, tags: [built_in_props_1.SemanticCallTag.Random], sig: (0, shared_signatures_1.sig)({ seed: shared_signatures_1.Forced.Value, kind: shared_signatures_1.Forced.Value, 'normal.kind': shared_signatures_1.Forced.Value, 'sample.kind': shared_signatures_1.Forced.Value }) }),
|
|
201
|
+
(0, define_helpers_1.fn)((0, define_helpers_1.base)('RNGversion'), built_in_proc_name_1.BuiltInProcName.Default, { ambient: [ambient_effect_1.Ambient.rngKind.reads, ...SetsRngKind([])], props: built_in_props_1.CallProp.Invisible | built_in_props_1.CallProp.Configures, tags: [built_in_props_1.SemanticCallTag.Random], sig: (0, shared_signatures_1.sig)({ vstr: shared_signatures_1.Forced.Value }) }),
|
|
202
|
+
(0, define_helpers_1.fn)((0, define_helpers_1.base)('RNGkind'), built_in_proc_name_1.BuiltInProcName.Default, { ambient: [ambient_effect_1.Ambient.rngKind.reads, ...SetsRngKind([])], props: built_in_props_1.CallProp.Configures, tags: [built_in_props_1.SemanticCallTag.Random], sig: (0, shared_signatures_1.sig)({ kind: shared_signatures_1.Forced.Value, 'normal.kind': shared_signatures_1.Forced.Value, 'sample.kind': shared_signatures_1.Forced.Value }) }),
|
|
173
203
|
(0, define_helpers_1.fn)((0, define_helpers_1.base)('body', 'formals'), built_in_proc_name_1.BuiltInProcName.Default, { hasUnknownSideEffects: true, props: built_in_props_1.CallProp.Lang, sig: (0, shared_signatures_1.sig)({ fun: shared_signatures_1.Forced.Value }) }, define_helpers_1.Primitive),
|
|
174
|
-
(0, define_helpers_1.fn)((0, define_helpers_1.base)('.libPaths'), built_in_proc_name_1.BuiltInProcName.Default, { props: built_in_props_1.CallProp.Configures, ambient: {
|
|
204
|
+
(0, define_helpers_1.fn)((0, define_helpers_1.base)('.libPaths'), built_in_proc_name_1.BuiltInProcName.Default, { props: built_in_props_1.CallProp.Configures, ambient: { ...ambient_effect_1.Ambient.libPaths.writes, unless: 'no-arguments' }, sig: (0, shared_signatures_1.sig)({ new: shared_signatures_1.Forced.Value, 'include.site': shared_signatures_1.Forced.Flag }) }),
|
|
175
205
|
(0, define_helpers_1.fn)((0, define_helpers_1.base)('addTaskCallback'), built_in_proc_name_1.BuiltInProcName.Default, { hasUnknownSideEffects: true, props: built_in_props_1.CallProp.Configures, sig: (0, shared_signatures_1.sig)({ f: built_in_props_1.ArgProp.Forced | built_in_props_1.ArgProp.Callee, data: shared_signatures_1.Forced.Value, name: shared_signatures_1.Forced.Value }) }),
|
|
176
206
|
(0, define_helpers_1.fn)((0, define_helpers_1.base)('setHook'), built_in_proc_name_1.BuiltInProcName.Default, { hasUnknownSideEffects: true, props: built_in_props_1.CallProp.Configures, sig: (0, shared_signatures_1.sig)({ hookName: shared_signatures_1.Forced.Value, value: built_in_props_1.ArgProp.Forced | built_in_props_1.ArgProp.Callee, action: shared_signatures_1.Forced.Flag }) }),
|
|
177
207
|
(0, define_helpers_1.fn)((0, define_helpers_1.base)('trace'), built_in_proc_name_1.BuiltInProcName.Default, { hasUnknownSideEffects: true, tags: [built_in_props_1.SemanticCallTag.Eval], sig: (0, shared_signatures_1.sig)({ what: built_in_props_1.ArgProp.Value, tracer: built_in_props_1.ArgProp.Value | built_in_props_1.ArgProp.Injectable, exit: built_in_props_1.ArgProp.Value | built_in_props_1.ArgProp.Injectable, at: built_in_props_1.ArgProp.Value, print: built_in_props_1.ArgProp.Flag, signature: built_in_props_1.ArgProp.Value, where: built_in_props_1.ArgProp.Value, edit: built_in_props_1.ArgProp.Flag }) }),
|
|
@@ -179,19 +209,25 @@ exports.BaseDefinitions = [
|
|
|
179
209
|
(0, define_helpers_1.fn)((0, define_helpers_1.base)('environment'), built_in_proc_name_1.BuiltInProcName.Default, { hasUnknownSideEffects: true, readsFrame: true, frame: built_in_props_1.ArgProp.Value, tags: [built_in_props_1.SemanticCallTag.Frames], sig: (0, shared_signatures_1.sig)({ fun: shared_signatures_1.Forced.Handle }) }, define_helpers_1.Primitive),
|
|
180
210
|
(0, define_helpers_1.fn)((0, define_helpers_1.base)('.Call', '.External', '.C', '.Fortran', '.External2', '.Call.graphics', '.External.graphics'), built_in_proc_name_1.BuiltInProcName.Default, { hasUnknownSideEffects: true, sig: (0, shared_signatures_1.sig)({ '.NAME': shared_signatures_1.Forced.Value }), markArgsAsMasked: nse_kind_1.NseArguments.First, treatAsFnCall: { '.Call': ['.NAME'], '.External': ['.NAME'], '.C': ['.NAME'], '.Fortran': ['.NAME'], /* the entry points R's graphics engine and internal code call foreign routines through */ '.External2': ['.NAME'], '.Call.graphics': ['.NAME'], '.External.graphics': ['.NAME'] }, props: built_in_props_1.CallProp.Ffi }, define_helpers_1.Primitive),
|
|
181
211
|
(0, define_helpers_1.fn)((0, define_helpers_1.base)('eval'), built_in_proc_name_1.BuiltInProcName.Eval, { includeFunctionCall: true, supportFunctionCall: false, keepEnvironment: true, tags: [built_in_props_1.SemanticCallTag.Eval], sig: (0, shared_signatures_1.sig)({ expr: shared_signatures_1.Forced.Value | built_in_props_1.ArgProp.Injectable, envir: shared_signatures_1.Forced.Value, enclos: shared_signatures_1.Forced.Value }) }, define_helpers_1.Primitive),
|
|
182
|
-
(0, define_helpers_1.fn)((0, define_helpers_1.base)('cat'), built_in_proc_name_1.BuiltInProcName.Default, {
|
|
212
|
+
(0, define_helpers_1.fn)((0, define_helpers_1.base)('cat'), built_in_proc_name_1.BuiltInProcName.Default, { ambient: [shared_configs_1.ReadPrintingOptions, { ...ambient_effect_1.Ambient.messageSink.adds, when: { arg: 'file', formals: ['...', 'file'], calls: ['stderr'] } }], props: built_in_props_1.CallProp.Invisible, tags: [built_in_props_1.SemanticCallTag.File, built_in_props_1.SemanticCallTag.Writes, built_in_props_1.SemanticCallTag.Prints], sig: (0, shared_signatures_1.sig)({ '...': shared_signatures_1.Forced.Value, file: shared_signatures_1.Forced.Resource | built_in_props_1.ArgProp.Optional, sep: shared_signatures_1.Forced.Value, fill: shared_signatures_1.Forced.Value, labels: shared_signatures_1.Forced.Value, append: shared_signatures_1.Forced.Flag }) }),
|
|
183
213
|
(0, define_helpers_1.fn)((0, define_helpers_1.base)('switch'), built_in_proc_name_1.BuiltInProcName.Default, { alternativeArgsFrom: 1, useAsProcessor: built_in_proc_name_1.BuiltInProcName.Switch, props: built_in_props_1.CallProp.Pure, sig: (0, shared_signatures_1.sig)({ EXPR: shared_signatures_1.Forced.Value }) }),
|
|
184
214
|
(0, define_helpers_1.fn)((0, define_helpers_1.base)('stop'), built_in_proc_name_1.BuiltInProcName.Default, { ...Throws, signals: ['simpleError', 'error', 'condition'] }),
|
|
215
|
+
/* ends the program: nothing after it runs, so it is an exit like a raise for everything that follows (no handler catches it, but treating it as one only keeps more) */
|
|
216
|
+
(0, define_helpers_1.fn)((0, define_helpers_1.base)('quit', 'q'), built_in_proc_name_1.BuiltInProcName.Default, { cfg: 4 /* ExitPointType.Error */, props: built_in_props_1.CallProp.Throws, sig: (0, shared_signatures_1.sig)({ save: shared_signatures_1.Forced.Value, status: shared_signatures_1.Forced.Value, runLast: shared_signatures_1.Forced.Value }) }),
|
|
185
217
|
/* their classes depend on more than the message (`class = `, a glue template evaluated in the caller) */
|
|
186
218
|
(0, define_helpers_1.fn)([...(0, define_helpers_1.pkg)("rlang" /* PkgName.Rlang */, 'abort'), ...(0, define_helpers_1.pkg)("cli" /* PkgName.Cli */, 'cli_abort'), ...(0, define_helpers_1.pkg)("R.methodsS3" /* PkgName.RmethodsS3 */, 'throw'), ...(0, define_helpers_1.pkg)("R.oo" /* PkgName.Roo */, 'throw'),
|
|
187
219
|
/* R.oo re-exports R.methodsS3::throw */ ...(0, define_helpers_1.pkg)("purrr" /* PkgName.Purrr */, 'stop_bad_type', 'stop_bad_element_type', 'stop_bad_element_length')], built_in_proc_name_1.BuiltInProcName.Default, Throws),
|
|
188
220
|
/* the block is evaluated whatever happens, the handlers only when something does, and an error keeps the value from coming back */
|
|
189
|
-
(0, define_helpers_1.fn)((0, define_helpers_1.base)('try'), built_in_proc_name_1.BuiltInProcName.Try, { block: 'expr', handlers: {}, sig: (0, shared_signatures_1.sig)({ expr: shared_signatures_1.Forced.Value }) }, define_helpers_1.Primitive),
|
|
190
|
-
|
|
221
|
+
(0, define_helpers_1.fn)((0, define_helpers_1.base)('try'), built_in_proc_name_1.BuiltInProcName.Try, { block: 'expr', handlers: {}, ambient: [{ ...ambient_effect_1.Ambient.messageSink.adds, unless: { flag: 'silent' } }, ambient_effect_1.Ambient.errorMessage.adds], sig: (0, shared_signatures_1.sig)({ expr: shared_signatures_1.Forced.Value }), dispatches: ConditionAccessors }, define_helpers_1.Primitive),
|
|
222
|
+
/* an error it catches may set the last error message */
|
|
223
|
+
(0, define_helpers_1.fn)([...(0, define_helpers_1.base)('tryCatch'), ...(0, define_helpers_1.pkg)("tryCatchLog" /* PkgName.TryCatchLog */, 'tryCatchLog')], built_in_proc_name_1.BuiltInProcName.Try, { block: 'expr', handlers: { error: 'error', finally: 'finally' }, ambient: ambient_effect_1.Ambient.errorMessage.adds, sig: (0, shared_signatures_1.sig)({ expr: shared_signatures_1.Forced.Value, '...': built_in_props_1.ArgProp.Callee, finally: built_in_props_1.ArgProp.Nse }) }, define_helpers_1.Primitive),
|
|
224
|
+
(0, define_helpers_1.fn)((0, define_helpers_1.base)('geterrmessage'), built_in_proc_name_1.BuiltInProcName.Default, { ambient: ambient_effect_1.Ambient.errorMessage.reads, props: built_in_props_1.CallProp.Ambient }),
|
|
191
225
|
(0, define_helpers_1.fn)((0, define_helpers_1.base)('withCallingHandlers'), built_in_proc_name_1.BuiltInProcName.Try, { block: 'expr', aborts: false, handlers: {}, sig: (0, shared_signatures_1.sig)({ expr: shared_signatures_1.Forced.Value, '...': built_in_props_1.ArgProp.Callee }) }, define_helpers_1.Primitive),
|
|
192
226
|
/* its handlers run on what the session signals from then on */
|
|
193
227
|
(0, define_helpers_1.fn)((0, define_helpers_1.base)('globalCallingHandlers'), built_in_proc_name_1.BuiltInProcName.Try, { aborts: false, handlers: {}, sig: (0, shared_signatures_1.sig)({ '...': built_in_props_1.ArgProp.Callee }) }, define_helpers_1.Primitive),
|
|
194
|
-
|
|
228
|
+
/* invoking a restart leaves the code for the function of that name, one muffling a signal resumes where the signal was raised */
|
|
229
|
+
(0, define_helpers_1.fn)((0, define_helpers_1.base)('withRestarts'), built_in_proc_name_1.BuiltInProcName.Try, { block: 'expr', handlers: { error: 'error' }, sig: (0, shared_signatures_1.sig)({ expr: shared_signatures_1.Forced.Value, '...': built_in_props_1.ArgProp.Callee }) }),
|
|
230
|
+
(0, define_helpers_1.fn)((0, define_helpers_1.base)('invokeRestart'), built_in_proc_name_1.BuiltInProcName.Default, { cfg: 4 /* ExitPointType.Error */, cfgUnless: { arg: 'r', formals: ['r'], is: MuffleRestarts }, props: built_in_props_1.CallProp.Throws, sig: (0, shared_signatures_1.sig)({ r: shared_signatures_1.Forced.Value, '...': shared_signatures_1.Forced.Value }) }, define_helpers_1.Primitive),
|
|
195
231
|
(0, define_helpers_1.fn)([...(0, define_helpers_1.base)('stopifnot'), ...(0, define_helpers_1.pkg)("assertthat" /* PkgName.AssertThat */, 'assert_that')], built_in_proc_name_1.BuiltInProcName.StopIfNot, { props: built_in_props_1.CallProp.Invisible | built_in_props_1.CallProp.Throws, sig: (0, shared_signatures_1.sig)({ '...': 0, exprs: built_in_props_1.ArgProp.NoDefault, exprObject: built_in_props_1.ArgProp.NoDefault, local: 0 }) }),
|
|
196
232
|
/* it hands back what it evaluated invisibly, so a top-level `source()` prints nothing of its own */
|
|
197
233
|
(0, define_helpers_1.fn)((0, define_helpers_1.base)('source'), built_in_proc_name_1.BuiltInProcName.Source, { includeFunctionCall: true, forceFollow: false, props: built_in_props_1.CallProp.Invisible, tags: [built_in_props_1.SemanticCallTag.File, built_in_props_1.SemanticCallTag.Reads, built_in_props_1.SemanticCallTag.Eval], sig: (0, shared_signatures_1.sig)({ file: shared_signatures_1.Forced.Resource | built_in_props_1.ArgProp.Injectable, local: shared_signatures_1.Forced.Flag, echo: shared_signatures_1.Forced.Flag, 'print.eval': built_in_props_1.ArgProp.Flag, exprs: built_in_props_1.ArgProp.Value | built_in_props_1.ArgProp.Injectable }) }),
|
|
@@ -216,6 +252,10 @@ exports.BaseDefinitions = [
|
|
|
216
252
|
(0, define_helpers_1.fn)([...(0, define_helpers_1.base)('find.package'), ...(0, define_helpers_1.utils)('installed.packages', 'packageVersion', 'packageDescription')], built_in_proc_name_1.BuiltInProcName.Default, { props: built_in_props_1.CallProp.Ambient, tags: [built_in_props_1.SemanticCallTag.ChecksPackage], sig: (0, shared_signatures_1.sig)({ '...': built_in_props_1.ArgProp.Forced }) }),
|
|
217
253
|
(0, define_helpers_1.fn)((0, define_helpers_1.base)('assign'), built_in_proc_name_1.BuiltInProcName.Assignment, { targetVariable: true, mayHaveMoreArgs: true, environmentArg: 'envir', props: built_in_props_1.CallProp.Scope | built_in_props_1.CallProp.Invisible, sig: (0, shared_signatures_1.sig)({ x: built_in_props_1.ArgProp.Value, value: built_in_props_1.ArgProp.Value, pos: built_in_props_1.ArgProp.Flag, envir: built_in_props_1.ArgProp.Written, inherits: built_in_props_1.ArgProp.Flag }) }, define_helpers_1.Primitive),
|
|
218
254
|
(0, define_helpers_1.fn)((0, define_helpers_1.base)('makeActiveBinding'), built_in_proc_name_1.BuiltInProcName.Assignment, { targetVariable: true, mayHaveMoreArgs: true, callsSource: true, environmentArg: 'env', props: built_in_props_1.CallProp.Scope | built_in_props_1.CallProp.Invisible, sig: (0, shared_signatures_1.sig)({ sym: built_in_props_1.ArgProp.Value, fun: built_in_props_1.ArgProp.Callee, env: built_in_props_1.ArgProp.Written }) }, define_helpers_1.Primitive),
|
|
255
|
+
/* a locked binding makes every later write to it fail, and each of them fails if there is no binding to act on */
|
|
256
|
+
(0, define_helpers_1.fn)((0, define_helpers_1.base)('lockBinding', 'unlockBinding'), built_in_proc_name_1.BuiltInProcName.Get, { returnsValue: false, hasUnknownSideEffects: true, locks: true, props: built_in_props_1.CallProp.Invisible, sig: (0, shared_signatures_1.sig)({ sym: shared_signatures_1.Forced.Value, env: shared_signatures_1.Forced.Value }) }),
|
|
257
|
+
(0, define_helpers_1.fn)((0, define_helpers_1.base)('bindingIsLocked', 'bindingIsActive'), built_in_proc_name_1.BuiltInProcName.Get, { returnsValue: false, props: built_in_props_1.CallProp.Pure, sig: (0, shared_signatures_1.sig)({ sym: shared_signatures_1.Forced.Value, env: shared_signatures_1.Forced.Value }) }),
|
|
258
|
+
(0, define_helpers_1.fn)((0, define_helpers_1.base)('lockEnvironment'), built_in_proc_name_1.BuiltInProcName.Default, { hasUnknownSideEffects: true, locks: true, props: built_in_props_1.CallProp.Invisible, sig: (0, shared_signatures_1.sig)({ env: shared_signatures_1.Forced.Value, bindings: shared_signatures_1.Forced.Flag }) }),
|
|
219
259
|
(0, define_helpers_1.fn)((0, define_helpers_1.base)('delayedAssign'), built_in_proc_name_1.BuiltInProcName.Assignment, { keepEnvironment: true, quoteSource: true, targetVariable: true, mayHaveMoreArgs: true, environmentArg: 'assign.env', props: built_in_props_1.CallProp.Invisible | built_in_props_1.CallProp.Scope, sig: (0, shared_signatures_1.sig)({ x: built_in_props_1.ArgProp.NoDefault, value: built_in_props_1.ArgProp.NoDefault | built_in_props_1.ArgProp.Nse, 'eval.env': shared_signatures_1.Forced.Value, 'assign.env': built_in_props_1.ArgProp.Forced | built_in_props_1.ArgProp.Written }) }, define_helpers_1.Primitive),
|
|
220
260
|
/* registers the method of an S3 class, which the dispatch finds after one bound by its name */
|
|
221
261
|
(0, define_helpers_1.fn)((0, define_helpers_1.base)('.S3method'), built_in_proc_name_1.BuiltInProcName.AssignmentLike, { targetVariable: true, makeMaybe: true, registers: true, target: { idx: 0, name: 'generic' }, targetClass: { idx: 1, name: 'class' }, source: { idx: 2, name: 'method' }, props: built_in_props_1.CallProp.Scope | built_in_props_1.CallProp.Invisible, sig: (0, shared_signatures_1.sig)({ generic: built_in_props_1.ArgProp.Value, class: built_in_props_1.ArgProp.Value, method: built_in_props_1.ArgProp.Value }) }),
|
|
@@ -252,18 +292,22 @@ exports.BaseDefinitions = [
|
|
|
252
292
|
(0, define_helpers_1.fn)((0, define_helpers_1.base)('sys.function'), built_in_proc_name_1.BuiltInProcName.Recall, { libFn: true, unknownOnNonZeroArg: true, props: built_in_props_1.CallProp.Lang, frame: built_in_props_1.ArgProp.Nse, tags: [built_in_props_1.SemanticCallTag.Frames], sig: (0, shared_signatures_1.sig)({ which: built_in_props_1.ArgProp.Forced }) }),
|
|
253
293
|
(0, define_helpers_1.fn)((0, define_helpers_1.base)('c'), built_in_proc_name_1.BuiltInProcName.Vector, { props: built_in_props_1.CallProp.Pure, sig: (0, shared_signatures_1.sig)({ '...': built_in_props_1.ArgProp.Value }) }, { assumePrimitive: true, evalHandler: built_in_eval_name_1.BuiltInEvalName.Vector }),
|
|
254
294
|
(0, define_helpers_1.fn)((0, define_helpers_1.base)('sys.on.exit', 'asNamespace', 'unname'), built_in_proc_name_1.BuiltInProcName.Default, { hasUnknownSideEffects: true }),
|
|
255
|
-
/* they create, move, or delete files */
|
|
256
|
-
(0, define_helpers_1.fn)([...(0, define_helpers_1.base)('dir.create'), ...(0, define_helpers_1.pkg)("fs" /* PkgName.Fs */, 'dir_create')], built_in_proc_name_1.BuiltInProcName.DefaultReadAllArgs, { props: built_in_props_1.CallProp.Invisible, tags: [built_in_props_1.SemanticCallTag.File, built_in_props_1.SemanticCallTag.Writes], sig: (0, shared_signatures_1.sig)({ path: shared_signatures_1.Forced.Resource, '...': built_in_props_1.ArgProp.Flag }) }),
|
|
257
|
-
(0, define_helpers_1.fn)((0, define_helpers_1.base)('unlink'), built_in_proc_name_1.BuiltInProcName.DefaultReadAllArgs, { props: built_in_props_1.CallProp.Invisible,
|
|
295
|
+
/* they create, move, or delete files, and as we do not know which paths are directories, the directories as well */
|
|
296
|
+
(0, define_helpers_1.fn)([...(0, define_helpers_1.base)('dir.create'), ...(0, define_helpers_1.pkg)("fs" /* PkgName.Fs */, 'dir_create')], built_in_proc_name_1.BuiltInProcName.DefaultReadAllArgs, { props: built_in_props_1.CallProp.Invisible, ambient: ambient_effect_1.Ambient.directories.adds, tags: [built_in_props_1.SemanticCallTag.File, built_in_props_1.SemanticCallTag.Writes], sig: (0, shared_signatures_1.sig)({ path: shared_signatures_1.Forced.Resource, '...': built_in_props_1.ArgProp.Flag }) }),
|
|
297
|
+
(0, define_helpers_1.fn)((0, define_helpers_1.base)('unlink'), built_in_proc_name_1.BuiltInProcName.DefaultReadAllArgs, { props: built_in_props_1.CallProp.Invisible, ...RemovesFiles((0, shared_signatures_1.sig)({ x: shared_signatures_1.Forced.Resource, recursive: built_in_props_1.ArgProp.Flag, force: built_in_props_1.ArgProp.Flag, expand: built_in_props_1.ArgProp.Flag })) }),
|
|
258
298
|
(0, define_helpers_1.fn)((0, define_helpers_1.base)('Sys.chmod'), built_in_proc_name_1.BuiltInProcName.DefaultReadAllArgs, { props: built_in_props_1.CallProp.Invisible, tags: [built_in_props_1.SemanticCallTag.File, built_in_props_1.SemanticCallTag.Writes], sig: (0, shared_signatures_1.sig)({ paths: shared_signatures_1.Forced.Resource, mode: built_in_props_1.ArgProp.Flag, use_umask: built_in_props_1.ArgProp.Flag }) }),
|
|
259
299
|
(0, define_helpers_1.fn)([...(0, define_helpers_1.base)('file.create'), ...(0, define_helpers_1.pkg)("fs" /* PkgName.Fs */, 'file_create', 'file_touch')], built_in_proc_name_1.BuiltInProcName.DefaultReadAllArgs, { tags: [built_in_props_1.SemanticCallTag.File, built_in_props_1.SemanticCallTag.Writes], sig: (0, shared_signatures_1.sig)({ '...': shared_signatures_1.Forced.Resource, showWarnings: built_in_props_1.ArgProp.Flag }) }),
|
|
260
|
-
(0, define_helpers_1.fn)(
|
|
300
|
+
(0, define_helpers_1.fn)((0, define_helpers_1.base)('file.remove'), built_in_proc_name_1.BuiltInProcName.Default, { hasUnknownSideEffects: true, ...RemovesFiles((0, shared_signatures_1.sig)({ '...': shared_signatures_1.Forced.Resource })) }),
|
|
301
|
+
(0, define_helpers_1.fn)((0, define_helpers_1.pkg)("fs" /* PkgName.Fs */, 'file_delete', 'dir_delete', 'link_delete'), built_in_proc_name_1.BuiltInProcName.Default, { hasUnknownSideEffects: true, ...RemovesFiles((0, shared_signatures_1.sig)({ path: shared_signatures_1.Forced.Resource })) }),
|
|
302
|
+
(0, define_helpers_1.fn)((0, define_helpers_1.base)('Sys.junction'), built_in_proc_name_1.BuiltInProcName.Default, { hasUnknownSideEffects: true, tags: [built_in_props_1.SemanticCallTag.File, built_in_props_1.SemanticCallTag.Writes] }),
|
|
261
303
|
(0, define_helpers_1.fn)((0, define_helpers_1.base)('file.copy', 'file.link', 'file.symlink'), built_in_proc_name_1.BuiltInProcName.Default, { tags: shared_configs_1.CopiesFiles, sig: (0, shared_signatures_1.sig)({ from: shared_signatures_1.Forced.Resource, to: shared_signatures_1.Forced.Resource | built_in_props_1.ArgProp.Written, overwrite: built_in_props_1.ArgProp.Flag, recursive: built_in_props_1.ArgProp.Flag, 'copy.mode': built_in_props_1.ArgProp.Flag, 'copy.date': built_in_props_1.ArgProp.Flag }) }),
|
|
262
304
|
/* a moved file is gone from where it was */
|
|
263
|
-
(0, define_helpers_1.fn)((0, define_helpers_1.base)('file.rename'), built_in_proc_name_1.BuiltInProcName.Default, { hasUnknownSideEffects: true, tags: shared_configs_1.CopiesFiles, sig: (0, shared_signatures_1.sig)({ from: shared_signatures_1.Forced.Resource, to: shared_signatures_1.Forced.Resource | built_in_props_1.ArgProp.Written }) }),
|
|
305
|
+
(0, define_helpers_1.fn)((0, define_helpers_1.base)('file.rename'), built_in_proc_name_1.BuiltInProcName.Default, { hasUnknownSideEffects: true, ambient: ambient_effect_1.Ambient.directories.adds, tags: shared_configs_1.CopiesFiles, sig: (0, shared_signatures_1.sig)({ from: shared_signatures_1.Forced.Resource, to: shared_signatures_1.Forced.Resource | built_in_props_1.ArgProp.Written }) }),
|
|
264
306
|
(0, define_helpers_1.fn)((0, define_helpers_1.base)('file.append'), built_in_proc_name_1.BuiltInProcName.Default, { tags: shared_configs_1.CopiesFiles, sig: (0, shared_signatures_1.sig)({ file1: shared_signatures_1.Forced.Resource | built_in_props_1.ArgProp.Written, file2: shared_signatures_1.Forced.Resource }) }),
|
|
265
307
|
/* `sink` diverts the output, `par`/`tpar` set (or query) the parameters of the current device */
|
|
266
|
-
(0, define_helpers_1.fn)((0, define_helpers_1.base)('sink'), built_in_proc_name_1.BuiltInProcName.Default,
|
|
308
|
+
(0, define_helpers_1.fn)((0, define_helpers_1.base)('sink'), built_in_proc_name_1.BuiltInProcName.Default,
|
|
309
|
+
/* `append = TRUE` keeps what the file held, so a diversion reads it */
|
|
310
|
+
{ ambient: [{ ...ambient_effect_1.Ambient.files.reads, sig: SinkSig }, ...SinkStack(ambient_effect_1.Ambient.sink, ['output', null], ['message']), ...SinkStack(ambient_effect_1.Ambient.messageSink, ['message'], ['output', null])], props: built_in_props_1.CallProp.Invisible, tags: [built_in_props_1.SemanticCallTag.File, built_in_props_1.SemanticCallTag.Writes], sig: SinkSig }),
|
|
267
311
|
(0, define_helpers_1.fn)((0, define_helpers_1.base)('on.exit'), built_in_proc_name_1.BuiltInProcName.RegisterHook, { props: built_in_props_1.CallProp.Invisible, hook: built_in_kinds_1.KnownHooks.OnFnExit, args: { expr: { idx: 0, name: 'expr' }, add: { idx: 1, name: 'add', default: false }, after: { idx: 2, name: 'after', default: true } }, sig: (0, shared_signatures_1.sig)({ expr: built_in_props_1.ArgProp.Nse, add: built_in_props_1.ArgProp.Forced, after: built_in_props_1.ArgProp.Forced }) }, define_helpers_1.Primitive),
|
|
268
312
|
/* `parse(text=)` turns text into an expression, with `file=` it reads that file */
|
|
269
313
|
(0, define_helpers_1.fn)((0, define_helpers_1.base)('parse', 'str2lang', 'str2expression'), built_in_proc_name_1.BuiltInProcName.Default, { props: built_in_props_1.CallProp.Pure, sig: (0, shared_signatures_1.sig)({ '...': built_in_props_1.ArgProp.Forced }) }),
|
|
@@ -287,11 +331,20 @@ exports.BaseDefinitions = [
|
|
|
287
331
|
(0, define_helpers_1.fn)((0, define_helpers_1.base)('dyn.load'), built_in_proc_name_1.BuiltInProcName.Default, { props: built_in_props_1.CallProp.Ffi | built_in_props_1.CallProp.Invisible, sig: (0, shared_signatures_1.sig)({ '...': built_in_props_1.ArgProp.Forced }) }),
|
|
288
332
|
(0, define_helpers_1.fn)((0, define_helpers_1.base)('getNativeSymbolInfo'), built_in_proc_name_1.BuiltInProcName.Default, { props: built_in_props_1.CallProp.Ffi, sig: (0, shared_signatures_1.sig)({ '...': built_in_props_1.ArgProp.Forced }) }),
|
|
289
333
|
/* ambient state: options, environment variables, the clock, the session itself */
|
|
290
|
-
(0, define_helpers_1.fn)((0, define_helpers_1.base)('Sys.getenv'), built_in_proc_name_1.BuiltInProcName.Default, { props: built_in_props_1.CallProp.Ambient, ambient: {
|
|
291
|
-
|
|
292
|
-
(0, define_helpers_1.fn)((0, define_helpers_1.base)('
|
|
293
|
-
|
|
294
|
-
(0, define_helpers_1.fn)((0, define_helpers_1.base)('
|
|
334
|
+
(0, define_helpers_1.fn)((0, define_helpers_1.base)('Sys.getenv'), built_in_proc_name_1.BuiltInProcName.Default, { props: built_in_props_1.CallProp.Ambient, ambient: { ...ambient_effect_1.Ambient.env.reads, member: { from: 'parameter', signature: ['x', 'unset', 'names', 'allowEmpty'], names: ['x'] }, handsBack: true }, sig: (0, shared_signatures_1.sig)({ '...': built_in_props_1.ArgProp.Forced }) }),
|
|
335
|
+
/* turning a number into text reads `scipen` and `OutDec` */
|
|
336
|
+
(0, define_helpers_1.fn)((0, define_helpers_1.base)('as.character', 'toString', 'formatC'), built_in_proc_name_1.BuiltInProcName.DefaultReadAllArgs, { props: built_in_props_1.CallProp.Pure, ambient: shared_configs_1.ReadsNumberFormat, sig: shared_signatures_1.SigXDots }, define_helpers_1.Primitive),
|
|
337
|
+
/* it formats each number with `format`, applied to `x` as a list */
|
|
338
|
+
(0, define_helpers_1.fn)((0, define_helpers_1.base)('prettyNum'), built_in_proc_name_1.BuiltInProcName.DefaultReadAllArgs, { props: built_in_props_1.CallProp.Pure, ambient: shared_configs_1.PrintDispatched, sig: shared_signatures_1.SigXDots, dispatches: ['as.list', 'as.vector'] }, define_helpers_1.Primitive),
|
|
339
|
+
/* the local date and time zone follow `TZ` */
|
|
340
|
+
(0, define_helpers_1.fn)((0, define_helpers_1.base)('Sys.Date', 'Sys.timezone', 'date'), built_in_proc_name_1.BuiltInProcName.Default, { ambient: { ...ambient_effect_1.Ambient.env.reads, member: { from: 'constant', keys: ['TZ'] } }, props: built_in_props_1.CallProp.Ambient, sig: (0, shared_signatures_1.sig)({ '...': built_in_props_1.ArgProp.Forced }) }),
|
|
341
|
+
(0, define_helpers_1.fn)((0, define_helpers_1.base)('Sys.getlocale'), built_in_proc_name_1.BuiltInProcName.Default, { ambient: { ...ambient_effect_1.Ambient.locale.reads, member: { from: 'parameter', signature: ['category'], names: ['category'], fallback: 'LC_ALL' } }, sig: (0, shared_signatures_1.sig)({ category: built_in_props_1.ArgProp.Forced }) }),
|
|
342
|
+
/* a numeric color is an index into the palette */
|
|
343
|
+
(0, define_helpers_1.fn)((0, define_helpers_1.pkg)("grDevices" /* PkgName.GrDevices */, 'col2rgb', 'adjustcolor', 'colorRampPalette', 'colorRamp'), built_in_proc_name_1.BuiltInProcName.DefaultReadAllArgs, { props: built_in_props_1.CallProp.Pure, ambient: ambient_effect_1.Ambient.palette.reads, sig: shared_signatures_1.SigXDots }),
|
|
344
|
+
(0, define_helpers_1.fn)((0, define_helpers_1.base)('Sys.info', 'Sys.getpid', 'getRversion', 'R.Version', 'Sys.time', 'proc.time', 'interactive'), built_in_proc_name_1.BuiltInProcName.Default, { props: built_in_props_1.CallProp.Ambient, sig: (0, shared_signatures_1.sig)({ '...': built_in_props_1.ArgProp.Forced }) }),
|
|
345
|
+
(0, define_helpers_1.fn)((0, define_helpers_1.base)('getwd'), built_in_proc_name_1.BuiltInProcName.Default, { ambient: ambient_effect_1.Ambient.wd.reads, props: built_in_props_1.CallProp.Ambient, sig: (0, shared_signatures_1.sig)({ '...': built_in_props_1.ArgProp.Forced }) }),
|
|
346
|
+
(0, define_helpers_1.fn)([...(0, define_helpers_1.base)('search', 'searchpaths'), ...(0, define_helpers_1.utils)('find', 'apropos')], built_in_proc_name_1.BuiltInProcName.Default, { ambient: ambient_effect_1.Ambient.searchPath.reads, props: built_in_props_1.CallProp.Ambient, sig: (0, shared_signatures_1.sig)({ '...': built_in_props_1.ArgProp.Forced }) }),
|
|
347
|
+
(0, define_helpers_1.fn)((0, define_helpers_1.base)('getOption'), built_in_proc_name_1.BuiltInProcName.Default, { ambient: { ...ambient_effect_1.Ambient.option.reads, member: { from: 'parameter', signature: ['x', 'default'], names: ['x'] }, handsBack: true }, props: built_in_props_1.CallProp.Ambient, sig: (0, shared_signatures_1.sig)({ '...': built_in_props_1.ArgProp.Forced }) }),
|
|
295
348
|
(0, define_helpers_1.fn)((0, define_helpers_1.base)('commandArgs'), built_in_proc_name_1.BuiltInProcName.Default, { props: built_in_props_1.CallProp.Ambient, tags: [built_in_props_1.SemanticCallTag.CommandLine], sig: (0, shared_signatures_1.sig)({ '...': built_in_props_1.ArgProp.Forced }) }),
|
|
296
349
|
/* system commands */
|
|
297
350
|
(0, define_helpers_1.fn)((0, define_helpers_1.base)('system'), built_in_proc_name_1.BuiltInProcName.Default, { tags: [built_in_props_1.SemanticCallTag.Process], sig: (0, shared_signatures_1.sig)({ command: shared_signatures_1.Forced.Value | built_in_props_1.ArgProp.Injectable, intern: shared_signatures_1.Forced.Flag, 'ignore.stdout': shared_signatures_1.Forced.Flag, 'ignore.stderr': shared_signatures_1.Forced.Flag, wait: shared_signatures_1.Forced.Flag, input: shared_signatures_1.Forced.Value, 'show.output.on.console': built_in_props_1.ArgProp.Flag, minimized: built_in_props_1.ArgProp.Flag, invisible: built_in_props_1.ArgProp.Flag, timeout: shared_signatures_1.Forced.Value }) }),
|
|
@@ -301,6 +354,11 @@ exports.BaseDefinitions = [
|
|
|
301
354
|
(0, define_helpers_1.fn)((0, define_helpers_1.base)('pipe'), built_in_proc_name_1.BuiltInProcName.Default, { tags: [built_in_props_1.SemanticCallTag.Opens, built_in_props_1.SemanticCallTag.Process], sig: (0, shared_signatures_1.sig)({ description: shared_signatures_1.Forced.Resource | built_in_props_1.ArgProp.Injectable, open: shared_signatures_1.Forced.Flag, encoding: shared_signatures_1.Forced.Value }) }),
|
|
302
355
|
/* whatever the user types, picks, or sends along with a request */
|
|
303
356
|
(0, define_helpers_1.fn)([...(0, define_helpers_1.base)('readline', 'file.choose'), ...(0, define_helpers_1.utils)('askYesNo', 'choose.files', 'choose.dir', 'menu', 'select.list', 'winDialogString', 'winDialog')], built_in_proc_name_1.BuiltInProcName.Default, { tags: [built_in_props_1.SemanticCallTag.User], sig: (0, shared_signatures_1.sig)({ '...': built_in_props_1.ArgProp.Forced }) }),
|
|
357
|
+
/* what opens a viewer, an editor, or the debugger, which only an interactive session has: `View(df)` left in a script does nothing under `Rscript` */
|
|
358
|
+
(0, define_helpers_1.fn)((0, define_helpers_1.utils)('View'), built_in_proc_name_1.BuiltInProcName.Default, { props: built_in_props_1.CallProp.Invisible, tags: [built_in_props_1.SemanticCallTag.Interactive], sig: (0, shared_signatures_1.sig)({ x: shared_signatures_1.Forced.Value, title: shared_signatures_1.Forced.Value }) }),
|
|
359
|
+
/* `edit` and `data.entry` hand back what was edited, the others return invisibly */
|
|
360
|
+
(0, define_helpers_1.fn)([...(0, define_helpers_1.utils)('edit', 'de', 'data.entry')], built_in_proc_name_1.BuiltInProcName.Default, { tags: [built_in_props_1.SemanticCallTag.Interactive], sig: (0, shared_signatures_1.sig)({ '...': built_in_props_1.ArgProp.Forced }) }),
|
|
361
|
+
(0, define_helpers_1.fn)([...(0, define_helpers_1.utils)('fix', 'file.edit', 'page', 'recover'), ...(0, define_helpers_1.base)('browser', 'debug', 'debugonce', 'undebug')], built_in_proc_name_1.BuiltInProcName.Default, { props: built_in_props_1.CallProp.Invisible, tags: [built_in_props_1.SemanticCallTag.Interactive], sig: (0, shared_signatures_1.sig)({ '...': built_in_props_1.ArgProp.Forced }) }),
|
|
304
362
|
/* they only make up a path, they do not go near the file system, so `File` would be wrong here */
|
|
305
363
|
(0, define_helpers_1.fn)((0, define_helpers_1.base)('tempfile', 'tempdir'), built_in_proc_name_1.BuiltInProcName.Default, { tags: [built_in_props_1.SemanticCallTag.TempFile], sig: (0, shared_signatures_1.sig)({ '...': built_in_props_1.ArgProp.Forced }) }),
|
|
306
364
|
/* they are all mapped to `<-` but we separate super assignments */
|
|
@@ -309,7 +367,7 @@ exports.BaseDefinitions = [
|
|
|
309
367
|
(0, define_helpers_1.replacement)((0, define_helpers_1.base)('attributes', 'attr', 'class', 'rownames', 'colnames', 'environment'), ['<-', '<<-'], { readIndices: true, props: built_in_props_1.CallProp.Scope }),
|
|
310
368
|
(0, define_helpers_1.replacement)((0, define_helpers_1.base)('body', 'formals'), ['<-', '<<-'], { readIndices: true, props: built_in_props_1.CallProp.Scope | built_in_props_1.CallProp.Lang, sig: (0, shared_signatures_1.sig)({ fun: built_in_props_1.ArgProp.Value, value: built_in_props_1.ArgProp.Value | built_in_props_1.ArgProp.Injectable }) }),
|
|
311
369
|
/* the string and shape functions R declares formals for, restated one by one: the group above gives them what they do, this gives them the arguments they do it with (the names are R's own) */
|
|
312
|
-
(0, define_helpers_1.fn)((0, define_helpers_1.base)('sprintf'), built_in_proc_name_1.BuiltInProcName.DefaultReadAllArgs, { props: built_in_props_1.CallProp.Pure, sig: (0, shared_signatures_1.sig)({ fmt: shared_signatures_1.Forced.Value, '...': shared_signatures_1.Forced.Value }), dispatches: ['as.character'] }, { assumePrimitive: true, evalHandler: built_in_eval_name_1.BuiltInEvalName.StringFn }),
|
|
370
|
+
(0, define_helpers_1.fn)((0, define_helpers_1.base)('sprintf'), built_in_proc_name_1.BuiltInProcName.DefaultReadAllArgs, { props: built_in_props_1.CallProp.Pure, sig: (0, shared_signatures_1.sig)({ fmt: shared_signatures_1.Forced.Value, '...': shared_signatures_1.Forced.Value }), dispatches: ['as.character', 'as.vector'] }, { assumePrimitive: true, evalHandler: built_in_eval_name_1.BuiltInEvalName.StringFn }),
|
|
313
371
|
(0, define_helpers_1.fn)((0, define_helpers_1.base)('format'), built_in_proc_name_1.BuiltInProcName.DefaultReadAllArgs, { ambient: shared_configs_1.PrintDispatched, props: built_in_props_1.CallProp.Pure, sig: shared_signatures_1.SigXDots }, { overrides: true, assumePrimitive: true }),
|
|
314
372
|
(0, define_helpers_1.fn)((0, define_helpers_1.base)('grep'), built_in_proc_name_1.BuiltInProcName.DefaultReadAllArgs, { props: built_in_props_1.CallProp.Pure, sig: (0, shared_signatures_1.sig)({ pattern: shared_signatures_1.Forced.Value, x: shared_signatures_1.Forced.Value, 'ignore.case': shared_signatures_1.Forced.Flag, perl: shared_signatures_1.Forced.Flag, value: shared_signatures_1.Forced.Flag, fixed: shared_signatures_1.Forced.Flag, useBytes: shared_signatures_1.Forced.Flag, invert: shared_signatures_1.Forced.Flag }) }, { overrides: true, assumePrimitive: true }),
|
|
315
373
|
(0, define_helpers_1.fn)((0, define_helpers_1.base)('sub', 'gsub'), built_in_proc_name_1.BuiltInProcName.DefaultReadAllArgs, { props: built_in_props_1.CallProp.Pure, tags: [built_in_props_1.SemanticCallTag.Edits], sig: (0, shared_signatures_1.sig)({ pattern: shared_signatures_1.Forced.Value, replacement: shared_signatures_1.Forced.Value, x: shared_signatures_1.Forced.Value, 'ignore.case': shared_signatures_1.Forced.Flag, perl: shared_signatures_1.Forced.Flag, fixed: shared_signatures_1.Forced.Flag, useBytes: shared_signatures_1.Forced.Flag }) }, { overrides: true, assumePrimitive: true }),
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { BuiltInProcName } from '../built-in-proc-name';
|
|
2
2
|
/** The built-in definitions of the language itself: control flow, functions, environments, quoting, and evaluation. */
|
|
3
|
-
export declare const LanguageDefinitions: [import("../built-in-config").BuiltInFunctionDefinition<BuiltInProcName.Default>, import("../built-in-config").BuiltInFunctionDefinition<BuiltInProcName.DefaultReadAllArgs>, import("../built-in-config").BuiltInFunctionDefinition<BuiltInProcName.DefaultReadAllArgs>, import("../built-in-config").BuiltInFunctionDefinition<BuiltInProcName.DefaultReadAllArgs>, import("../built-in-config").BuiltInFunctionDefinition<BuiltInProcName.Default>, import("../built-in-config").BuiltInFunctionDefinition<BuiltInProcName.Default>, import("../built-in-config").BuiltInFunctionDefinition<BuiltInProcName.Default>, import("../built-in-config").BuiltInFunctionDefinition<BuiltInProcName.Default>, import("../built-in-config").BuiltInFunctionDefinition<BuiltInProcName.Default>, import("../built-in-config").BuiltInFunctionDefinition<BuiltInProcName.Default>, import("../built-in-config").BuiltInFunctionDefinition<BuiltInProcName.Default>, import("../built-in-config").BuiltInFunctionDefinition<BuiltInProcName.Default>, import("../built-in-config").BuiltInFunctionDefinition<BuiltInProcName.Default>, import("../built-in-config").BuiltInFunctionDefinition<BuiltInProcName.Default>, import("../built-in-config").BuiltInFunctionDefinition<BuiltInProcName.Default>, import("../built-in-config").BuiltInFunctionDefinition<BuiltInProcName.Default>, import("../built-in-config").BuiltInFunctionDefinition<BuiltInProcName.Default>, import("../built-in-config").BuiltInFunctionDefinition<BuiltInProcName.ExpressionList>, import("../built-in-config").BuiltInFunctionDefinition<BuiltInProcName.Access>, import("../built-in-config").BuiltInFunctionDefinition<BuiltInProcName.Access>, import("../built-in-config").BuiltInFunctionDefinition<BuiltInProcName.Access>, import("../built-in-config").BuiltInFunctionDefinition<BuiltInProcName.Access>, import("../built-in-config").BuiltInFunctionDefinition<BuiltInProcName.NamespaceAccess>, import("../built-in-config").BuiltInFunctionDefinition<BuiltInProcName.NamespaceAccess>, import("../built-in-config").BuiltInFunctionDefinition<BuiltInProcName.IfThenElse>, import("../built-in-config").BuiltInFunctionDefinition<BuiltInProcName.Pipe>, import("../built-in-config").BuiltInFunctionDefinition<BuiltInProcName.Pipe>, import("../built-in-config").BuiltInFunctionDefinition<BuiltInProcName.FunctionDefinition>, import("../built-in-config").BuiltInFunctionDefinition<BuiltInProcName.ForLoop>, import("../built-in-config").BuiltInFunctionDefinition<BuiltInProcName.RepeatLoop>, import("../built-in-config").BuiltInFunctionDefinition<BuiltInProcName.WhileLoop>, import("../built-in-config").BuiltInFunctionDefinition<BuiltInProcName.Default>, import("../built-in-config").BuiltInFunctionDefinition<BuiltInProcName.Default>, import("../built-in-config").BuiltInFunctionDefinition<BuiltInProcName.Default>, import("../built-in-config").BuiltInFunctionDefinition<BuiltInProcName.Default>, import("../built-in-config").BuiltInFunctionDefinition<BuiltInProcName.Default>, import("../built-in-config").BuiltInReplacementDefinition, import("../built-in-config").BuiltInFunctionDefinition<BuiltInProcName.DefaultReadAllArgs>];
|
|
3
|
+
export declare const LanguageDefinitions: [import("../built-in-config").BuiltInFunctionDefinition<BuiltInProcName.Default>, import("../built-in-config").BuiltInFunctionDefinition<BuiltInProcName.DefaultReadAllArgs>, import("../built-in-config").BuiltInFunctionDefinition<BuiltInProcName.DefaultReadAllArgs>, import("../built-in-config").BuiltInFunctionDefinition<BuiltInProcName.DefaultReadAllArgs>, import("../built-in-config").BuiltInFunctionDefinition<BuiltInProcName.Default>, import("../built-in-config").BuiltInFunctionDefinition<BuiltInProcName.Default>, import("../built-in-config").BuiltInFunctionDefinition<BuiltInProcName.Default>, import("../built-in-config").BuiltInFunctionDefinition<BuiltInProcName.Default>, import("../built-in-config").BuiltInFunctionDefinition<BuiltInProcName.Default>, import("../built-in-config").BuiltInFunctionDefinition<BuiltInProcName.Default>, import("../built-in-config").BuiltInFunctionDefinition<BuiltInProcName.Default>, import("../built-in-config").BuiltInFunctionDefinition<BuiltInProcName.Default>, import("../built-in-config").BuiltInFunctionDefinition<BuiltInProcName.Default>, import("../built-in-config").BuiltInFunctionDefinition<BuiltInProcName.Default>, import("../built-in-config").BuiltInFunctionDefinition<BuiltInProcName.Default>, import("../built-in-config").BuiltInFunctionDefinition<BuiltInProcName.Default>, import("../built-in-config").BuiltInFunctionDefinition<BuiltInProcName.Default>, import("../built-in-config").BuiltInFunctionDefinition<BuiltInProcName.Default>, import("../built-in-config").BuiltInFunctionDefinition<BuiltInProcName.ExpressionList>, import("../built-in-config").BuiltInFunctionDefinition<BuiltInProcName.Access>, import("../built-in-config").BuiltInFunctionDefinition<BuiltInProcName.Access>, import("../built-in-config").BuiltInFunctionDefinition<BuiltInProcName.Access>, import("../built-in-config").BuiltInFunctionDefinition<BuiltInProcName.Access>, import("../built-in-config").BuiltInFunctionDefinition<BuiltInProcName.NamespaceAccess>, import("../built-in-config").BuiltInFunctionDefinition<BuiltInProcName.NamespaceAccess>, import("../built-in-config").BuiltInFunctionDefinition<BuiltInProcName.IfThenElse>, import("../built-in-config").BuiltInFunctionDefinition<BuiltInProcName.Pipe>, import("../built-in-config").BuiltInFunctionDefinition<BuiltInProcName.Pipe>, import("../built-in-config").BuiltInFunctionDefinition<BuiltInProcName.FunctionDefinition>, import("../built-in-config").BuiltInFunctionDefinition<BuiltInProcName.ForLoop>, import("../built-in-config").BuiltInFunctionDefinition<BuiltInProcName.RepeatLoop>, import("../built-in-config").BuiltInFunctionDefinition<BuiltInProcName.WhileLoop>, import("../built-in-config").BuiltInFunctionDefinition<BuiltInProcName.Default>, import("../built-in-config").BuiltInFunctionDefinition<BuiltInProcName.Default>, import("../built-in-config").BuiltInFunctionDefinition<BuiltInProcName.Default>, import("../built-in-config").BuiltInFunctionDefinition<BuiltInProcName.Default>, import("../built-in-config").BuiltInFunctionDefinition<BuiltInProcName.Default>, import("../built-in-config").BuiltInReplacementDefinition, import("../built-in-config").BuiltInFunctionDefinition<BuiltInProcName.DefaultReadAllArgs>];
|
|
@@ -11,6 +11,7 @@ const nse_kind_1 = require("../../internal/process/functions/call/nse-kind");
|
|
|
11
11
|
const data_masking_functions_1 = require("../data-masking-functions");
|
|
12
12
|
const built_in_props_1 = require("../built-in-props");
|
|
13
13
|
const shared_configs_1 = require("./shared-configs");
|
|
14
|
+
const ambient_effect_1 = require("../ambient-effect");
|
|
14
15
|
/** What `$` and `@` share: they access a field by its name. */
|
|
15
16
|
const NamedAccess = { treatIndicesAsString: true, resolveField: true, props: built_in_props_1.CallProp.Pure, sig: (0, shared_signatures_1.sig)({ x: shared_signatures_1.Forced.Value, name: built_in_props_1.ArgProp.Nse }) };
|
|
16
17
|
/** The built-in definitions of the language itself: control flow, functions, environments, quoting, and evaluation. */
|
|
@@ -21,17 +22,19 @@ exports.LanguageDefinitions = [
|
|
|
21
22
|
(0, define_helpers_1.fn)(shared_configs_1.ModelFits, built_in_proc_name_1.BuiltInProcName.DefaultReadAllArgs, { props: built_in_props_1.CallProp.Pure, tags: [built_in_props_1.SemanticCallTag.Statistics] }),
|
|
22
23
|
(0, define_helpers_1.fn)(identifier_1.Identifier.fromAllIn(shared_configs_1.DbPackages, ['dbConnect']), built_in_proc_name_1.BuiltInProcName.DefaultReadAllArgs, { libFn: true, ambient: (0, shared_configs_1.DbReadsWrites)(shared_configs_1.DbConnectSig), tags: [built_in_props_1.SemanticCallTag.Opens, built_in_props_1.SemanticCallTag.Database, built_in_props_1.SemanticCallTag.File, built_in_props_1.SemanticCallTag.Reads, built_in_props_1.SemanticCallTag.Writes], sig: shared_configs_1.DbConnectSig }),
|
|
23
24
|
// graphics base
|
|
24
|
-
(0, define_helpers_1.fn)((0, shared_configs_1.namespacePlotFunctions)(shared_configs_1.GraphicsPlotCreate.concat(shared_configs_1.TinyPlotCrate).filter(f => !shared_configs_1.VisiblePlotCreate.has(f))), built_in_proc_name_1.BuiltInProcName.Default, { ...shared_configs_1.PlotCreateConfig, props: built_in_props_1.CallProp.Invisible, ambient: shared_configs_1.
|
|
25
|
-
|
|
26
|
-
|
|
25
|
+
(0, define_helpers_1.fn)((0, shared_configs_1.namespacePlotFunctions)(shared_configs_1.GraphicsPlotCreate.concat(shared_configs_1.TinyPlotCrate).filter(f => !shared_configs_1.VisiblePlotCreate.has(f))), built_in_proc_name_1.BuiltInProcName.Default, { ...shared_configs_1.PlotCreateConfig, props: built_in_props_1.CallProp.Invisible, ambient: shared_configs_1.NewPlot }, define_helpers_1.Primitive),
|
|
26
|
+
/* they return a plot object instead of drawing at once */
|
|
27
|
+
(0, define_helpers_1.fn)((0, shared_configs_1.namespacePlotFunctions)([...shared_configs_1.VisiblePlotCreate]), built_in_proc_name_1.BuiltInProcName.Default, { ...shared_configs_1.PlotCreateConfig, ambient: shared_configs_1.BuildsPlot }, define_helpers_1.Primitive),
|
|
27
28
|
(0, define_helpers_1.fn)((0, shared_configs_1.namespacePlotFunctions)(shared_configs_1.GgPlotCreate), built_in_proc_name_1.BuiltInProcName.Default, shared_configs_1.PlotCreateConfig, define_helpers_1.Primitive),
|
|
28
|
-
(0, define_helpers_1.fn)((0, shared_configs_1.namespacePlotFunctions)(['grid.arrange']), built_in_proc_name_1.BuiltInProcName.Default, { ...shared_configs_1.PlotCreateConfig, props: built_in_props_1.CallProp.Invisible }, { overrides: true, assumePrimitive: true }),
|
|
29
|
+
(0, define_helpers_1.fn)((0, shared_configs_1.namespacePlotFunctions)(['grid.arrange']), built_in_proc_name_1.BuiltInProcName.Default, { ...shared_configs_1.PlotCreateConfig, props: built_in_props_1.CallProp.Invisible, ambient: ambient_effect_1.Ambient.plot.resets }, { overrides: true, assumePrimitive: true }),
|
|
29
30
|
// graphics addons
|
|
30
|
-
(0, define_helpers_1.fn)((0, shared_configs_1.namespacePlotFunctions)(shared_configs_1.GraphicsPlotAddons
|
|
31
|
+
(0, define_helpers_1.fn)((0, shared_configs_1.namespacePlotFunctions)(shared_configs_1.GraphicsPlotAddons), built_in_proc_name_1.BuiltInProcName.Default, { ...shared_configs_1.PlotAddonConfig, props: built_in_props_1.CallProp.Invisible, ambient: shared_configs_1.AddsToPlot }, define_helpers_1.Primitive),
|
|
32
|
+
(0, define_helpers_1.fn)((0, shared_configs_1.namespacePlotFunctions)([...shared_configs_1.PlotFunctionsWithAddParam]), built_in_proc_name_1.BuiltInProcName.Default, { ...shared_configs_1.PlotAddonConfig, props: built_in_props_1.CallProp.Invisible, ambient: shared_configs_1.MayAddToPlot }, { overrides: true, assumePrimitive: true }),
|
|
31
33
|
(0, define_helpers_1.fn)((0, shared_configs_1.namespacePlotFunctions)(shared_configs_1.GgPlotImplicitAddons.filter(f => !shared_configs_1.InvisibleGgPlotAddons.includes(f))), built_in_proc_name_1.BuiltInProcName.Default, shared_configs_1.PlotAddonConfig, define_helpers_1.Primitive),
|
|
32
|
-
|
|
34
|
+
/* they change the theme every later ggplot is drawn with, like `theme_set` */
|
|
35
|
+
(0, define_helpers_1.fn)((0, shared_configs_1.namespacePlotFunctions)(shared_configs_1.InvisibleGgPlotAddons), built_in_proc_name_1.BuiltInProcName.Default, { ...shared_configs_1.PlotAddonConfig, props: built_in_props_1.CallProp.Invisible, ambient: [], hasUnknownSideEffects: true }, define_helpers_1.Primitive),
|
|
33
36
|
// plot tags
|
|
34
|
-
(0, define_helpers_1.fn)((0, shared_configs_1.namespacePlotFunctions)(shared_configs_1.GgPlotAddons), built_in_proc_name_1.BuiltInProcName.Default, { libFn: true,
|
|
37
|
+
(0, define_helpers_1.fn)((0, shared_configs_1.namespacePlotFunctions)(shared_configs_1.GgPlotAddons), built_in_proc_name_1.BuiltInProcName.Default, { libFn: true, ambient: [shared_configs_1.BuildsPlot, ambient_effect_1.Ambient.lastPlot.reads], tags: [built_in_props_1.SemanticCallTag.Graphics], sig: (0, shared_signatures_1.sig)({ '...': built_in_props_1.ArgProp.Forced }) }, define_helpers_1.Primitive),
|
|
35
38
|
(0, define_helpers_1.fn)((0, shared_configs_1.namespacePlotFunctions)(shared_configs_1.TinyPlotAddons), built_in_proc_name_1.BuiltInProcName.Default, { libFn: true, props: built_in_props_1.CallProp.Invisible, hasUnknownSideEffects: { type: 'link-to-last-call', callName: (0, shared_configs_1.toRegex)([...shared_configs_1.TinyPlotCrate, ...shared_configs_1.TinyPlotAddons]) }, tags: [built_in_props_1.SemanticCallTag.Graphics], sig: (0, shared_signatures_1.sig)({ '...': built_in_props_1.ArgProp.Forced }) }, define_helpers_1.Primitive),
|
|
36
39
|
(0, define_helpers_1.fn)(['('], built_in_proc_name_1.BuiltInProcName.Default, { keepArgumentOut: true, props: built_in_props_1.CallProp.Pure, sig: (0, shared_signatures_1.sig)({ x: built_in_props_1.ArgProp.Forced | built_in_props_1.ArgProp.Alias }) }, { assumePrimitive: true, evalHandler: built_in_eval_name_1.BuiltInEvalName.Group }),
|
|
37
40
|
(0, define_helpers_1.fn)(['return'], built_in_proc_name_1.BuiltInProcName.Default, { cfg: 1 /* ExitPointType.Return */, keepArgumentOut: true, useAsProcessor: built_in_proc_name_1.BuiltInProcName.Return, props: built_in_props_1.CallProp.Pure, sig: (0, shared_signatures_1.sig)({ value: built_in_props_1.ArgProp.Forced | built_in_props_1.ArgProp.Alias }) }, define_helpers_1.Primitive),
|
|
@@ -48,7 +51,7 @@ exports.LanguageDefinitions = [
|
|
|
48
51
|
(0, define_helpers_1.fn)(['if'], built_in_proc_name_1.BuiltInProcName.IfThenElse, { sig: (0, shared_signatures_1.sig)({ cond: built_in_props_1.ArgProp.NoDefault | built_in_props_1.ArgProp.Forced | built_in_props_1.ArgProp.Atomic, 'cons.expr': built_in_props_1.ArgProp.NoDefault, 'alt.expr': 0 }) }, define_helpers_1.Primitive),
|
|
49
52
|
/* a pipe hands back what the side it feeds hands back, which `Alias` is what states */
|
|
50
53
|
(0, define_helpers_1.fn)(['|>'], built_in_proc_name_1.BuiltInProcName.Pipe, { pipePlaceholderName: '_', assignLhs: false, returnLhs: false, sig: (0, shared_signatures_1.sig)({ lhs: built_in_props_1.ArgProp.Value, rhs: built_in_props_1.ArgProp.Alias }) }, define_helpers_1.Primitive),
|
|
51
|
-
(0, define_helpers_1.fn)([...identifier_1.Identifier.fromAllIn(shared_configs_1.MagrittrPipePackages, ['%>%']), '%!>%'], built_in_proc_name_1.BuiltInProcName.Pipe, { pipePlaceholderName: '.', assignLhs: false, returnLhs: false, rhsMightBeSymbol: true, sig: (0, shared_signatures_1.sig)({ lhs: built_in_props_1.ArgProp.Value, rhs: built_in_props_1.ArgProp.Alias }) }, define_helpers_1.Primitive),
|
|
54
|
+
(0, define_helpers_1.fn)([...identifier_1.Identifier.fromAllIn(shared_configs_1.MagrittrPipePackages, ['%>%']), ...(0, define_helpers_1.pkg)("magrittr" /* PkgName.Magrittr */, '%!>%')], built_in_proc_name_1.BuiltInProcName.Pipe, { pipePlaceholderName: '.', assignLhs: false, returnLhs: false, rhsMightBeSymbol: true, sig: (0, shared_signatures_1.sig)({ lhs: built_in_props_1.ArgProp.Value, rhs: built_in_props_1.ArgProp.Alias }) }, define_helpers_1.Primitive),
|
|
52
55
|
(0, define_helpers_1.fn)(['function', '\\'], built_in_proc_name_1.BuiltInProcName.FunctionDefinition, { sig: (0, shared_signatures_1.sig)({ arglist: built_in_props_1.ArgProp.Nse, expr: built_in_props_1.ArgProp.NoDefault | built_in_props_1.ArgProp.Nse }) }, define_helpers_1.Primitive),
|
|
53
56
|
(0, define_helpers_1.fn)(['for'], built_in_proc_name_1.BuiltInProcName.ForLoop, { props: built_in_props_1.CallProp.Invisible, sig: (0, shared_signatures_1.sig)({ var: built_in_props_1.ArgProp.NoDefault | built_in_props_1.ArgProp.Nse, seq: built_in_props_1.ArgProp.NoDefault | built_in_props_1.ArgProp.Forced, expr: built_in_props_1.ArgProp.NoDefault }) }, define_helpers_1.Primitive),
|
|
54
57
|
(0, define_helpers_1.fn)(['repeat'], built_in_proc_name_1.BuiltInProcName.RepeatLoop, { props: built_in_props_1.CallProp.Invisible, sig: (0, shared_signatures_1.sig)({ expr: built_in_props_1.ArgProp.NoDefault | built_in_props_1.ArgProp.Forced }) }, define_helpers_1.Primitive),
|
|
@@ -28,7 +28,7 @@ exports.ToolingDefinitions = [
|
|
|
28
28
|
(0, define_helpers_1.fn)((0, define_helpers_1.pkg)("renv" /* PkgName.Renv */, 'snapshot'), built_in_proc_name_1.BuiltInProcName.DefaultReadAllArgs, { libFn: true, props: built_in_props_1.CallProp.Invisible, tags: [built_in_props_1.SemanticCallTag.File, built_in_props_1.SemanticCallTag.Writes], sig: (0, shared_signatures_1.sig)({ project: shared_signatures_1.Forced.Value, '...': shared_signatures_1.Forced.Value, library: shared_signatures_1.Forced.Value, lockfile: shared_signatures_1.Forced.Resource }) }),
|
|
29
29
|
/* loaders taking several packages at once, each attached as by `library` */
|
|
30
30
|
/* a preference puts the preferred function on top of the search path */
|
|
31
|
-
(0, define_helpers_1.fn)((0, define_helpers_1.pkg)("conflicted" /* PkgName.Conflicted */, 'conflict_prefer', 'conflicts_prefer'), built_in_proc_name_1.BuiltInProcName.Prefer, { libFn: true, ambient:
|
|
31
|
+
(0, define_helpers_1.fn)((0, define_helpers_1.pkg)("conflicted" /* PkgName.Conflicted */, 'conflict_prefer', 'conflicts_prefer'), built_in_proc_name_1.BuiltInProcName.Prefer, { libFn: true, ambient: (0, shared_configs_1.SetsEntry)(ambient_state_name_1.KeyedState.SearchPath, '.conflicts'), props: built_in_props_1.CallProp.Invisible | built_in_props_1.CallProp.Configures, tags: [built_in_props_1.SemanticCallTag.AttachesPackage], sig: (0, shared_signatures_1.sig)({ '...': built_in_props_1.ArgProp.NoDefault }) }),
|
|
32
32
|
(0, define_helpers_1.fn)((0, define_helpers_1.pkg)("conflicted" /* PkgName.Conflicted */, 'conflict_prefer_all', 'conflict_prefer_matching'), built_in_proc_name_1.BuiltInProcName.Default, { libFn: true, hasUnknownSideEffects: true, props: built_in_props_1.CallProp.Invisible | built_in_props_1.CallProp.Configures, sig: (0, shared_signatures_1.sig)({ '...': shared_signatures_1.Forced.Value }) }),
|
|
33
33
|
(0, define_helpers_1.fn)((0, define_helpers_1.pkg)("needs" /* PkgName.Needs */, 'needs', 'prioritize'), built_in_proc_name_1.BuiltInProcName.Library, { libFn: true, packagesInDots: true, namesInDots: true, ambient: (0, shared_configs_1.LoaderSearchPath)(true), props: built_in_props_1.CallProp.Invisible | built_in_props_1.CallProp.Scope, tags: [built_in_props_1.SemanticCallTag.LoadsPackage, built_in_props_1.SemanticCallTag.AttachesPackage] }),
|
|
34
34
|
(0, define_helpers_1.fn)((0, define_helpers_1.pkg)("groundhog" /* PkgName.Groundhog */, 'groundhog.library'), built_in_proc_name_1.BuiltInProcName.Library, { libFn: true, formals: ['pkg', 'date'], ambient: (0, shared_configs_1.LoaderSearchPath)(true), props: built_in_props_1.CallProp.Invisible | built_in_props_1.CallProp.Scope, tags: [built_in_props_1.SemanticCallTag.LoadsPackage, built_in_props_1.SemanticCallTag.AttachesPackage] }),
|