@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.
Files changed (357) hide show
  1. package/README.md +13 -51
  2. package/abstract-interpretation/absint-inference.d.ts +4 -4
  3. package/abstract-interpretation/absint-inference.js +11 -11
  4. package/abstract-interpretation/abstract-semantics.d.ts +2 -1
  5. package/abstract-interpretation/branch-paths-interpreter.d.ts +1 -0
  6. package/abstract-interpretation/branch-paths-interpreter.js +60 -0
  7. package/abstract-interpretation/branch-paths.d.ts +60 -0
  8. package/abstract-interpretation/branch-paths.js +120 -0
  9. package/abstract-interpretation/data-frame/dataframe-semantics.d.ts +6 -1
  10. package/abstract-interpretation/data-frame/dataframe-semantics.js +60 -1
  11. package/abstract-interpretation/data-frame/semantics.js +4 -10
  12. package/abstract-interpretation/domains/bounded-set-domain.d.ts +1 -1
  13. package/cli/repl/core.js +51 -0
  14. package/control-flow/cfg-dead-code.js +12 -7
  15. package/data/packed.d.ts +10 -0
  16. package/data/packed.js +33 -0
  17. package/data/r-base-guards.generated.d.ts +7 -0
  18. package/data/r-base-guards.generated.js +12 -0
  19. package/data/r-datasets.generated.d.ts +4 -0
  20. package/data/r-datasets.generated.js +10 -0
  21. package/data/r-formals.generated.d.ts +4 -0
  22. package/data/r-formals.generated.js +10 -0
  23. package/data/r-group-method-guards.generated.d.ts +3 -0
  24. package/data/r-group-method-guards.generated.js +8 -0
  25. package/dataflow/environments/ambient-effect.d.ts +1000 -0
  26. package/dataflow/environments/ambient-effect.js +234 -0
  27. package/dataflow/environments/ambient-state-name.d.ts +45 -2
  28. package/dataflow/environments/ambient-state-name.js +61 -3
  29. package/dataflow/environments/apply-kill.js +11 -4
  30. package/dataflow/environments/built-in-kinds.d.ts +4 -46
  31. package/dataflow/environments/built-in-kinds.js +6 -2
  32. package/dataflow/environments/built-in-props.d.ts +16 -4
  33. package/dataflow/environments/built-in-props.js +11 -3
  34. package/dataflow/environments/built-in.d.ts +6 -1
  35. package/dataflow/environments/built-in.js +13 -36
  36. package/dataflow/environments/default-builtin-config/base-functions.d.ts +1 -1
  37. package/dataflow/environments/default-builtin-config/base-functions.js +110 -52
  38. package/dataflow/environments/default-builtin-config/base-language.d.ts +1 -1
  39. package/dataflow/environments/default-builtin-config/base-language.js +11 -8
  40. package/dataflow/environments/default-builtin-config/dev-tooling.js +1 -1
  41. package/dataflow/environments/default-builtin-config/file-io.js +6 -4
  42. package/dataflow/environments/default-builtin-config/graphics-devices.d.ts +1 -1
  43. package/dataflow/environments/default-builtin-config/graphics-devices.js +24 -14
  44. package/dataflow/environments/default-builtin-config/guard-builders.d.ts +16 -0
  45. package/dataflow/environments/default-builtin-config/guard-builders.js +29 -0
  46. package/dataflow/environments/default-builtin-config/guards-primitive-lang.d.ts +15 -0
  47. package/dataflow/environments/default-builtin-config/guards-primitive-lang.js +228 -0
  48. package/dataflow/environments/default-builtin-config/guards-primitive-ops.d.ts +11 -0
  49. package/dataflow/environments/default-builtin-config/guards-primitive-ops.js +154 -0
  50. package/dataflow/environments/default-builtin-config/guards.d.ts +9 -0
  51. package/dataflow/environments/default-builtin-config/guards.js +211 -0
  52. package/dataflow/environments/default-builtin-config/index.d.ts +3 -3
  53. package/dataflow/environments/default-builtin-config/index.js +22 -7
  54. package/dataflow/environments/default-builtin-config/media-formats.js +4 -4
  55. package/dataflow/environments/default-builtin-config/package-spatial.js +2 -1
  56. package/dataflow/environments/default-builtin-config/package-tidyverse.js +3 -2
  57. package/dataflow/environments/default-builtin-config/package-utils.d.ts +1 -1
  58. package/dataflow/environments/default-builtin-config/package-utils.js +5 -2
  59. package/dataflow/environments/default-builtin-config/parallel-execution.d.ts +1 -1
  60. package/dataflow/environments/default-builtin-config/parallel-execution.js +3 -1
  61. package/dataflow/environments/default-builtin-config/r-formals.d.ts +13 -0
  62. package/dataflow/environments/default-builtin-config/r-formals.js +110 -0
  63. package/dataflow/environments/default-builtin-config/shared-configs.d.ts +138 -77
  64. package/dataflow/environments/default-builtin-config/shared-configs.js +52 -88
  65. package/dataflow/environments/default-builtin-config/statistics.d.ts +1 -1
  66. package/dataflow/environments/default-builtin-config/statistics.js +4 -1
  67. package/dataflow/environments/diff.js +5 -2
  68. package/dataflow/environments/environment.d.ts +20 -0
  69. package/dataflow/environments/environment.js +39 -4
  70. package/dataflow/environments/group-generics.d.ts +5 -1
  71. package/dataflow/environments/group-generics.js +13 -3
  72. package/dataflow/environments/guard-facts.d.ts +169 -0
  73. package/dataflow/environments/guard-facts.js +26 -0
  74. package/dataflow/environments/identifier.d.ts +9 -1
  75. package/dataflow/environments/identifier.js +5 -0
  76. package/dataflow/environments/pkg-name.d.ts +1 -0
  77. package/dataflow/environments/query-fn-props.d.ts +3 -5
  78. package/dataflow/environments/query-fn-props.js +44 -21
  79. package/dataflow/environments/removal-marker.d.ts +2 -0
  80. package/dataflow/environments/removal-marker.js +5 -0
  81. package/dataflow/eval/resolve/resolve-strings.d.ts +2 -5
  82. package/dataflow/eval/resolve/resolve-strings.js +2 -2
  83. package/dataflow/extractor.js +24 -15
  84. package/dataflow/fn/condition-handlers.d.ts +2 -0
  85. package/dataflow/fn/condition-handlers.js +3 -1
  86. package/dataflow/fn/frame-reflection.d.ts +4 -2
  87. package/dataflow/fn/frame-reflection.js +16 -0
  88. package/dataflow/fn/function-props.js +15 -22
  89. package/dataflow/fn/function-semantics.d.ts +31 -1
  90. package/dataflow/fn/function-semantics.js +15 -0
  91. package/dataflow/fn/guards/built-in-guards.d.ts +112 -0
  92. package/dataflow/fn/guards/built-in-guards.js +199 -0
  93. package/dataflow/fn/guards/call-contracts.d.ts +97 -0
  94. package/dataflow/fn/guards/call-contracts.js +331 -0
  95. package/dataflow/fn/guards/condition-grouping.d.ts +20 -0
  96. package/dataflow/fn/guards/condition-grouping.js +135 -0
  97. package/dataflow/fn/guards/function-guards.d.ts +112 -0
  98. package/dataflow/fn/guards/function-guards.js +1549 -0
  99. package/dataflow/fn/guards/group-method-guards.d.ts +28 -0
  100. package/dataflow/fn/guards/group-method-guards.js +56 -0
  101. package/dataflow/fn/guards/guard-claims.d.ts +125 -0
  102. package/dataflow/fn/guards/guard-claims.js +678 -0
  103. package/dataflow/fn/guards/guard-knowledge.d.ts +41 -0
  104. package/dataflow/fn/guards/guard-knowledge.js +180 -0
  105. package/dataflow/fn/guards/guard-term-syntax.d.ts +9 -0
  106. package/dataflow/fn/guards/guard-term-syntax.js +210 -0
  107. package/dataflow/fn/guards/guard-term.d.ts +136 -0
  108. package/dataflow/fn/guards/guard-term.js +550 -0
  109. package/dataflow/fn/guards/stated-guards.d.ts +13 -0
  110. package/dataflow/fn/guards/stated-guards.js +35 -0
  111. package/dataflow/fn/higher-order-function.d.ts +2 -0
  112. package/dataflow/fn/higher-order-function.js +1 -0
  113. package/dataflow/fn/strict-function.d.ts +4 -0
  114. package/dataflow/fn/strict-function.js +66 -17
  115. package/dataflow/graph/ambient-access.d.ts +4 -1
  116. package/dataflow/graph/ambient-access.js +8 -2
  117. package/dataflow/graph/closure-frames.js +1 -1
  118. package/dataflow/graph/dataflowgraph-builder.d.ts +1 -1
  119. package/dataflow/graph/dataflowgraph-builder.js +2 -2
  120. package/dataflow/graph/df-helper.d.ts +6 -0
  121. package/dataflow/graph/df-helper.js +15 -0
  122. package/dataflow/graph/graph.d.ts +12 -6
  123. package/dataflow/graph/graph.js +21 -28
  124. package/dataflow/info.d.ts +2 -1
  125. package/dataflow/info.js +3 -1
  126. package/dataflow/internal/dispatch-linking.d.ts +3 -1
  127. package/dataflow/internal/dispatch-linking.js +1 -0
  128. package/dataflow/internal/linker.d.ts +2 -0
  129. package/dataflow/internal/linker.js +115 -6
  130. package/dataflow/internal/process/functions/call/built-in/built-in-access.js +2 -1
  131. package/dataflow/internal/process/functions/call/built-in/built-in-ambient-keys.d.ts +5 -2
  132. package/dataflow/internal/process/functions/call/built-in/built-in-ambient-keys.js +2 -1
  133. package/dataflow/internal/process/functions/call/built-in/built-in-ambient-state.d.ts +19 -57
  134. package/dataflow/internal/process/functions/call/built-in/built-in-ambient-state.js +471 -295
  135. package/dataflow/internal/process/functions/call/built-in/built-in-apply.js +13 -1
  136. package/dataflow/internal/process/functions/call/built-in/built-in-assignment.d.ts +2 -0
  137. package/dataflow/internal/process/functions/call/built-in/built-in-assignment.js +106 -19
  138. package/dataflow/internal/process/functions/call/built-in/built-in-attach.d.ts +1 -1
  139. package/dataflow/internal/process/functions/call/built-in/built-in-attach.js +24 -3
  140. package/dataflow/internal/process/functions/call/built-in/built-in-deferred-env-ops.d.ts +1 -1
  141. package/dataflow/internal/process/functions/call/built-in/built-in-deferred-env-ops.js +33 -11
  142. package/dataflow/internal/process/functions/call/built-in/built-in-env-contents.js +4 -0
  143. package/dataflow/internal/process/functions/call/built-in/built-in-envir-utils.d.ts +4 -4
  144. package/dataflow/internal/process/functions/call/built-in/built-in-envir-utils.js +23 -7
  145. package/dataflow/internal/process/functions/call/built-in/built-in-eval.js +14 -4
  146. package/dataflow/internal/process/functions/call/built-in/built-in-expression-list.d.ts +19 -2
  147. package/dataflow/internal/process/functions/call/built-in/built-in-expression-list.js +347 -46
  148. package/dataflow/internal/process/functions/call/built-in/built-in-for-loop.js +2 -1
  149. package/dataflow/internal/process/functions/call/built-in/built-in-function-definition.d.ts +5 -0
  150. package/dataflow/internal/process/functions/call/built-in/built-in-function-definition.js +110 -16
  151. package/dataflow/internal/process/functions/call/built-in/built-in-get.d.ts +2 -0
  152. package/dataflow/internal/process/functions/call/built-in/built-in-get.js +9 -2
  153. package/dataflow/internal/process/functions/call/built-in/built-in-if-then-else.d.ts +1 -1
  154. package/dataflow/internal/process/functions/call/built-in/built-in-if-then-else.js +4 -2
  155. package/dataflow/internal/process/functions/call/built-in/built-in-library.d.ts +5 -0
  156. package/dataflow/internal/process/functions/call/built-in/built-in-library.js +28 -0
  157. package/dataflow/internal/process/functions/call/built-in/built-in-load.js +16 -6
  158. package/dataflow/internal/process/functions/call/built-in/built-in-local.d.ts +6 -1
  159. package/dataflow/internal/process/functions/call/built-in/built-in-local.js +37 -2
  160. package/dataflow/internal/process/functions/call/built-in/built-in-recall.js +4 -0
  161. package/dataflow/internal/process/functions/call/built-in/built-in-replacement.js +19 -1
  162. package/dataflow/internal/process/functions/call/built-in/built-in-rm.d.ts +1 -1
  163. package/dataflow/internal/process/functions/call/built-in/built-in-rm.js +55 -11
  164. package/dataflow/internal/process/functions/call/built-in/built-in-source.d.ts +2 -2
  165. package/dataflow/internal/process/functions/call/built-in/built-in-source.js +11 -10
  166. package/dataflow/internal/process/functions/call/built-in/built-in-special-bin-op.js +3 -1
  167. package/dataflow/internal/process/functions/call/built-in/built-in-stack-env.d.ts +8 -0
  168. package/dataflow/internal/process/functions/call/built-in/built-in-stack-env.js +64 -7
  169. package/dataflow/internal/process/functions/call/built-in/built-in-try-catch.d.ts +1 -1
  170. package/dataflow/internal/process/functions/call/built-in/built-in-try-catch.js +160 -20
  171. package/dataflow/internal/process/functions/call/built-in/built-in-while-loop.js +5 -3
  172. package/dataflow/internal/process/functions/call/built-in/transitive-side-effects.d.ts +6 -0
  173. package/dataflow/internal/process/functions/call/built-in/transitive-side-effects.js +142 -4
  174. package/dataflow/internal/process/functions/call/quoted.d.ts +2 -0
  175. package/dataflow/internal/process/functions/call/quoted.js +23 -4
  176. package/dataflow/processor.d.ts +2 -0
  177. package/documentation/data/dfg/doc-ambient.d.ts +4 -0
  178. package/documentation/data/dfg/doc-ambient.js +74 -0
  179. package/documentation/wiki-dataflow-graph.js +10 -4
  180. package/documentation/wiki-linter.js +12 -0
  181. package/documentation/wiki-query.js +112 -1
  182. package/linter/linter-rules.d.ts +41 -1
  183. package/linter/linter-rules.js +5 -1
  184. package/linter/rules/call-contracts.d.ts +40 -0
  185. package/linter/rules/call-contracts.js +56 -0
  186. package/linter/rules/cmd-check/bogus-return.js +1 -1
  187. package/linter/rules/cmd-check/call-arguments.js +5 -6
  188. package/linter/rules/cmd-check/cmd-check-util.d.ts +0 -6
  189. package/linter/rules/cmd-check/cmd-check-util.js +0 -28
  190. package/linter/rules/cmd-check/package-hooks.js +2 -1
  191. package/linter/rules/cmd-check/s-three-method-consistency.js +1 -1
  192. package/linter/rules/interactive-functions.d.ts +30 -0
  193. package/linter/rules/interactive-functions.js +87 -0
  194. package/linter/rules/process-state-in-session.js +1 -1
  195. package/linter/rules/undefined-symbol-util.d.ts +1 -1
  196. package/linter/rules/undefined-symbol-util.js +8 -2
  197. package/linter/rules/undefined-symbol.js +18 -7
  198. package/linter/rules/useless-loop.d.ts +1 -1
  199. package/package.json +1 -1
  200. package/project/context/flowr-analyzer-dependencies-context.js +2 -1
  201. package/project/flowr-analyzer.d.ts +1 -0
  202. package/project/flowr-analyzer.js +5 -5
  203. package/project/sigdb/build.js +14 -4
  204. package/project/sigdb/decode.d.ts +3 -0
  205. package/project/sigdb/decode.js +10 -1
  206. package/project/sigdb/guarded-source.d.ts +6 -0
  207. package/project/sigdb/guarded-source.js +29 -0
  208. package/project/sigdb/reader.d.ts +5 -0
  209. package/project/sigdb/reader.js +27 -1
  210. package/project/sigdb/schema.d.ts +24 -2
  211. package/queries/catalog/absint-query/absint-query-format.d.ts +6 -3
  212. package/queries/catalog/absint-query/absint-query-format.js +57 -2
  213. package/queries/catalog/ambient-access-query/ambient-access-query-format.d.ts +6 -2
  214. package/queries/catalog/ambient-access-query/ambient-access-query-format.js +48 -3
  215. package/queries/catalog/cluster-query/cluster-query-format.d.ts +5 -2
  216. package/queries/catalog/cluster-query/cluster-query-format.js +19 -2
  217. package/queries/catalog/code-clones-query/code-clones-query-format.d.ts +5 -2
  218. package/queries/catalog/code-clones-query/code-clones-query-format.js +34 -2
  219. package/queries/catalog/config-query/config-query-format.d.ts +5 -2
  220. package/queries/catalog/config-query/config-query-format.js +41 -2
  221. package/queries/catalog/control-flow-query/control-flow-query-format.d.ts +5 -2
  222. package/queries/catalog/control-flow-query/control-flow-query-format.js +19 -2
  223. package/queries/catalog/data-columns-query/data-columns-query-format.d.ts +72 -0
  224. package/queries/catalog/data-columns-query/data-columns-query-format.js +215 -0
  225. package/queries/catalog/dataflow-lens-query/dataflow-lens-query-format.d.ts +5 -2
  226. package/queries/catalog/dataflow-lens-query/dataflow-lens-query-format.js +38 -2
  227. package/queries/catalog/dataflow-query/dataflow-query-format.d.ts +5 -2
  228. package/queries/catalog/dataflow-query/dataflow-query-format.js +18 -2
  229. package/queries/catalog/dependencies-query/dependencies-query-format.d.ts +1 -1
  230. package/queries/catalog/dependencies-query/dependencies-query-format.js +8 -3
  231. package/queries/catalog/dependencies-query/function-info/other-path-functions.js +1 -1
  232. package/queries/catalog/dependencies-query/function-info/tagged-functions.d.ts +11 -0
  233. package/queries/catalog/dependencies-query/function-info/tagged-functions.js +18 -0
  234. package/queries/catalog/dice-query/dice-query-format.d.ts +7 -2
  235. package/queries/catalog/dice-query/dice-query-format.js +34 -2
  236. package/queries/catalog/does-call-query/does-call-query-format.d.ts +7 -4
  237. package/queries/catalog/does-call-query/does-call-query-format.js +114 -2
  238. package/queries/catalog/files-query/files-query-format.d.ts +5 -2
  239. package/queries/catalog/files-query/files-query-format.js +45 -2
  240. package/queries/catalog/guess-dep-versions-query/guess-dep-versions-query-format.d.ts +6 -3
  241. package/queries/catalog/guess-dep-versions-query/guess-dep-versions-query-format.js +303 -2
  242. package/queries/catalog/happens-before-query/happens-before-query-format.d.ts +8 -4
  243. package/queries/catalog/happens-before-query/happens-before-query-format.js +37 -2
  244. package/queries/catalog/id-map-query/id-map-query-format.d.ts +5 -2
  245. package/queries/catalog/id-map-query/id-map-query-format.js +18 -2
  246. package/queries/catalog/inspect-exceptions-query/inspect-exception-query-format.d.ts +5 -2
  247. package/queries/catalog/inspect-exceptions-query/inspect-exception-query-format.js +29 -2
  248. package/queries/catalog/inspect-fn-guards-query/inspect-fn-guards-query-format.d.ts +37 -0
  249. package/queries/catalog/inspect-fn-guards-query/inspect-fn-guards-query-format.js +125 -0
  250. package/queries/catalog/inspect-fn-props-query/inspect-fn-props-query-format.d.ts +3 -2
  251. package/queries/catalog/inspect-fn-props-query/inspect-fn-props-query-format.js +54 -2
  252. package/queries/catalog/inspect-higher-order-query/inspect-higher-order-query-format.d.ts +6 -2
  253. package/queries/catalog/inspect-higher-order-query/inspect-higher-order-query-format.js +23 -2
  254. package/queries/catalog/inspect-recursion-query/inspect-recursion-query-format.d.ts +6 -2
  255. package/queries/catalog/inspect-recursion-query/inspect-recursion-query-format.js +15 -2
  256. package/queries/catalog/linter-query/linter-query-format.d.ts +8 -2
  257. package/queries/catalog/linter-query/linter-query-format.js +69 -4
  258. package/queries/catalog/location-map-query/location-map-query-format.d.ts +7 -3
  259. package/queries/catalog/location-map-query/location-map-query-format.js +70 -2
  260. package/queries/catalog/normalized-ast-query/normalized-ast-query-format.d.ts +5 -2
  261. package/queries/catalog/normalized-ast-query/normalized-ast-query-format.js +18 -2
  262. package/queries/catalog/origin-query/origin-query-format.d.ts +6 -3
  263. package/queries/catalog/origin-query/origin-query-format.js +29 -2
  264. package/queries/catalog/project-query/project-query-format.d.ts +6 -3
  265. package/queries/catalog/project-query/project-query-format.js +98 -2
  266. package/queries/catalog/provenance-query/provenance-query-format.d.ts +6 -3
  267. package/queries/catalog/provenance-query/provenance-query-format.js +30 -2
  268. package/queries/catalog/resolve-value-query/resolve-value-query-format.d.ts +9 -2
  269. package/queries/catalog/resolve-value-query/resolve-value-query-format.js +38 -2
  270. package/queries/catalog/search-query/search-query-format.d.ts +5 -2
  271. package/queries/catalog/search-query/search-query-format.js +23 -2
  272. package/queries/catalog/signature-query/signature-query-executor.js +3 -1
  273. package/queries/catalog/signature-query/signature-query-format.d.ts +3 -0
  274. package/queries/catalog/signature-query/signature-query-render.js +23 -0
  275. package/queries/catalog/static-slice-query/static-slice-query-format.d.ts +13 -2
  276. package/queries/catalog/static-slice-query/static-slice-query-format.js +55 -2
  277. package/queries/catalog/taint-query/taint-query-format.d.ts +6 -3
  278. package/queries/catalog/taint-query/taint-query-format.js +28 -2
  279. package/queries/query.d.ts +48 -27
  280. package/queries/query.js +6 -4
  281. package/r-bridge/lang-4.x/ast/model/processing/node-id.d.ts +2 -0
  282. package/r-bridge/lang-4.x/ast/model/processing/node-id.js +4 -0
  283. package/r-bridge/shell.js +7 -2
  284. package/reconstruct/reconstruct.js +18 -3
  285. package/slicing/static/removal-slice.js +4 -3
  286. package/slicing/static/slice-call.d.ts +11 -0
  287. package/slicing/static/slice-call.js +43 -2
  288. package/slicing/static/static-slicer.d.ts +2 -0
  289. package/slicing/static/static-slicer.js +137 -21
  290. package/slicing/static/visiting-queue.d.ts +2 -0
  291. package/slicing/static/visiting-queue.js +4 -0
  292. package/util/flowr-version.d.ts +1 -1
  293. package/util/flowr-version.js +2 -2
  294. package/util/objects.d.ts +2 -0
  295. package/util/objects.js +5 -0
  296. package/util/r-datasets.d.ts +27 -0
  297. package/util/r-datasets.js +45 -0
  298. package/util/text/playground-link.d.ts +2 -0
  299. package/util/text/playground-link.js +2 -0
  300. package/queries/catalog/absint-query/absint-query-executor.d.ts +0 -6
  301. package/queries/catalog/absint-query/absint-query-executor.js +0 -61
  302. package/queries/catalog/ambient-access-query/ambient-access-query-executor.d.ts +0 -6
  303. package/queries/catalog/ambient-access-query/ambient-access-query-executor.js +0 -50
  304. package/queries/catalog/cluster-query/cluster-query-executor.d.ts +0 -6
  305. package/queries/catalog/cluster-query/cluster-query-executor.js +0 -21
  306. package/queries/catalog/code-clones-query/code-clones-query-executor.d.ts +0 -6
  307. package/queries/catalog/code-clones-query/code-clones-query-executor.js +0 -38
  308. package/queries/catalog/config-query/config-query-executor.d.ts +0 -6
  309. package/queries/catalog/config-query/config-query-executor.js +0 -45
  310. package/queries/catalog/control-flow-query/control-flow-query-executor.d.ts +0 -6
  311. package/queries/catalog/control-flow-query/control-flow-query-executor.js +0 -21
  312. package/queries/catalog/dataflow-lens-query/dataflow-lens-query-executor.d.ts +0 -6
  313. package/queries/catalog/dataflow-lens-query/dataflow-lens-query-executor.js +0 -40
  314. package/queries/catalog/dataflow-query/dataflow-query-executor.d.ts +0 -6
  315. package/queries/catalog/dataflow-query/dataflow-query-executor.js +0 -20
  316. package/queries/catalog/dependencies-query/function-info/statistics-functions.d.ts +0 -9
  317. package/queries/catalog/dependencies-query/function-info/statistics-functions.js +0 -18
  318. package/queries/catalog/dice-query/dice-query-executor.d.ts +0 -8
  319. package/queries/catalog/dice-query/dice-query-executor.js +0 -37
  320. package/queries/catalog/does-call-query/does-call-query-executor.d.ts +0 -6
  321. package/queries/catalog/does-call-query/does-call-query-executor.js +0 -116
  322. package/queries/catalog/files-query/files-query-executor.d.ts +0 -6
  323. package/queries/catalog/files-query/files-query-executor.js +0 -47
  324. package/queries/catalog/guess-dep-versions-query/guess-dep-versions-query-executor.d.ts +0 -6
  325. package/queries/catalog/guess-dep-versions-query/guess-dep-versions-query-executor.js +0 -307
  326. package/queries/catalog/happens-before-query/happens-before-query-executor.d.ts +0 -7
  327. package/queries/catalog/happens-before-query/happens-before-query-executor.js +0 -40
  328. package/queries/catalog/id-map-query/id-map-query-executor.d.ts +0 -6
  329. package/queries/catalog/id-map-query/id-map-query-executor.js +0 -20
  330. package/queries/catalog/inspect-exceptions-query/inspect-exception-query-executor.d.ts +0 -6
  331. package/queries/catalog/inspect-exceptions-query/inspect-exception-query-executor.js +0 -31
  332. package/queries/catalog/inspect-fn-props-query/inspect-fn-props-query-executor.d.ts +0 -4
  333. package/queries/catalog/inspect-fn-props-query/inspect-fn-props-query-executor.js +0 -58
  334. package/queries/catalog/inspect-higher-order-query/inspect-higher-order-query-executor.d.ts +0 -7
  335. package/queries/catalog/inspect-higher-order-query/inspect-higher-order-query-executor.js +0 -25
  336. package/queries/catalog/inspect-recursion-query/inspect-recursion-query-executor.d.ts +0 -7
  337. package/queries/catalog/inspect-recursion-query/inspect-recursion-query-executor.js +0 -17
  338. package/queries/catalog/linter-query/linter-query-executor.d.ts +0 -9
  339. package/queries/catalog/linter-query/linter-query-executor.js +0 -62
  340. package/queries/catalog/location-map-query/location-map-query-executor.d.ts +0 -7
  341. package/queries/catalog/location-map-query/location-map-query-executor.js +0 -73
  342. package/queries/catalog/normalized-ast-query/normalized-ast-query-executor.d.ts +0 -6
  343. package/queries/catalog/normalized-ast-query/normalized-ast-query-executor.js +0 -20
  344. package/queries/catalog/origin-query/origin-query-executor.d.ts +0 -6
  345. package/queries/catalog/origin-query/origin-query-executor.js +0 -31
  346. package/queries/catalog/project-query/project-query-executor.d.ts +0 -6
  347. package/queries/catalog/project-query/project-query-executor.js +0 -103
  348. package/queries/catalog/provenance-query/provenance-query-executor.d.ts +0 -6
  349. package/queries/catalog/provenance-query/provenance-query-executor.js +0 -33
  350. package/queries/catalog/resolve-value-query/resolve-value-query-executor.d.ts +0 -10
  351. package/queries/catalog/resolve-value-query/resolve-value-query-executor.js +0 -40
  352. package/queries/catalog/search-query/search-query-executor.d.ts +0 -6
  353. package/queries/catalog/search-query/search-query-executor.js +0 -25
  354. package/queries/catalog/static-slice-query/static-slice-query-executor.d.ts +0 -14
  355. package/queries/catalog/static-slice-query/static-slice-query-executor.js +0 -59
  356. package/queries/catalog/taint-query/taint-query-executor.d.ts +0 -7
  357. 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
- sig: (0, shared_signatures_1.sig)({ '...': built_in_props_1.ArgProp.Alias | built_in_props_1.ArgProp.Forced })
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
- (0, define_helpers_1.fn)((0, define_helpers_1.base)('length', 'lengths', 'nrow', 'ncol', 'NROW', 'NCOL', '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),
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.character', '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),
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
- 'formatC', /* 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),
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
- (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] }, define_helpers_1.Primitive),
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
- (0, define_helpers_1.fn)((0, define_helpers_1.base)('textConnection'), built_in_proc_name_1.BuiltInProcName.DefaultReadAllArgs, { ambient: { type: "open-text-connection" /* AmbientStateAccessType.OpenTextConnection */ }, tags: [built_in_props_1.SemanticCallTag.Opens], sig: (0, shared_signatures_1.sig)({ object: shared_signatures_1.Forced.Value }) }),
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: { type: "write-files" /* AmbientStateAccessType.WriteFiles */ }, tags: [built_in_props_1.SemanticCallTag.Closes], sig: (0, shared_signatures_1.sig)({ con: shared_signatures_1.Forced.Handle, '...': shared_signatures_1.Forced.Value }) }),
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: { type: "write-files" /* AmbientStateAccessType.WriteFiles */ }, 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 }) }),
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: { type: "write-files" /* AmbientStateAccessType.WriteFiles */ }, sig: (0, shared_signatures_1.sig)({ con: shared_signatures_1.Forced.Handle }) }),
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)({ path: shared_signatures_1.Forced.Resource }) }),
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: { type: "get-working-directory" /* AmbientStateAccessType.GetWorkingDirectory */ }, 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 }) }),
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: { type: "draw-rng" /* AmbientStateAccessType.DrawRng */ }, 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),
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: { type: "draw-rng" /* AmbientStateAccessType.DrawRng */ }, tags: [built_in_props_1.SemanticCallTag.Random] }),
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: { type: "register-finalizer" /* AmbientStateAccessType.RegisterFinalizer */ }, 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 }) }),
136
- (0, define_helpers_1.fn)((0, define_helpers_1.base)('gc'), built_in_proc_name_1.BuiltInProcName.Default, { ambient: { type: "run-finalizers" /* AmbientStateAccessType.RunFinalizers */ }, sig: (0, shared_signatures_1.sig)({ verbose: shared_signatures_1.Forced.Flag, reset: shared_signatures_1.Forced.Flag, full: shared_signatures_1.Forced.Flag }) }),
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: { type: "set-options" /* AmbientStateAccessType.SetOptions */ }, 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 }) }),
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: { type: "set-keyed" /* AmbientStateAccessType.SetKeyed */, state: ambient_state_name_1.KeyedState.Env, keys: { 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 }) }),
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
- (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 }) }),
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, hasUnknownSideEffects: { type: 'link-to-last-call', callName: /^sink$/ }, 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'] }),
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', 'suppressMessages', 'suppressPackageStartupMessages'), built_in_proc_name_1.BuiltInProcName.Default, { 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 }) }),
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: { type: "set-working-directory" /* AmbientStateAccessType.SetWorkingDirectory */ }, 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 }) }),
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: { type: "set-state" /* AmbientStateAccessType.SetState */, state: ambient_state_name_1.AmbientStateName.umask, queryWithoutArguments: true }, 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 }) }),
170
- (0, define_helpers_1.fn)((0, define_helpers_1.base)('set.seed'), built_in_proc_name_1.BuiltInProcName.Default, { ambient: { type: "set-rng" /* AmbientStateAccessType.SetRng */ }, 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 }) }),
171
- (0, define_helpers_1.fn)((0, define_helpers_1.base)('RNGversion'), built_in_proc_name_1.BuiltInProcName.Default, { ambient: { type: "set-rng" /* AmbientStateAccessType.SetRng */, kindFrom: 0 }, 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 }) }),
172
- (0, define_helpers_1.fn)((0, define_helpers_1.base)('RNGkind'), built_in_proc_name_1.BuiltInProcName.Default, { ambient: { type: "set-rng" /* AmbientStateAccessType.SetRng */, kindFrom: 0 }, 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 }) }),
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: { type: "set-state" /* AmbientStateAccessType.SetState */, state: ambient_state_name_1.AmbientStateName.libPaths, queryWithoutArguments: true }, sig: (0, shared_signatures_1.sig)({ new: shared_signatures_1.Forced.Value, 'include.site': shared_signatures_1.Forced.Flag }) }),
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, { hasUnknownSideEffects: { type: 'link-to-last-call', callName: /^sink$/ }, ambient: shared_configs_1.ReadPrintingOptions, 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 }) }),
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
- (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' }, 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),
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
- (0, define_helpers_1.fn)((0, define_helpers_1.base)('invokeRestart'), built_in_proc_name_1.BuiltInProcName.Default, { sig: (0, shared_signatures_1.sig)({ r: shared_signatures_1.Forced.Value, '...': shared_signatures_1.Forced.Value }) }, define_helpers_1.Primitive),
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, tags: [built_in_props_1.SemanticCallTag.File, built_in_props_1.SemanticCallTag.Writes], sig: (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 }) }),
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)([...(0, define_helpers_1.base)('file.remove', 'Sys.junction'), ...(0, define_helpers_1.pkg)("fs" /* PkgName.Fs */, 'file_delete', 'dir_delete', 'link_delete')], built_in_proc_name_1.BuiltInProcName.Default, { hasUnknownSideEffects: true, tags: [built_in_props_1.SemanticCallTag.File, built_in_props_1.SemanticCallTag.Writes] }),
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, { ambient: { type: "set-state" /* AmbientStateAccessType.SetState */, state: ambient_state_name_1.AmbientStateName.sink }, 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: built_in_props_1.ArgProp.Resource }) }),
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: { type: "read-keyed" /* AmbientStateAccessType.ReadKeyed */, state: ambient_state_name_1.KeyedState.Env, keys: { from: 'parameter', signature: ['x', 'unset', 'names', 'allowEmpty'], names: ['x'] } }, sig: (0, shared_signatures_1.sig)({ '...': built_in_props_1.ArgProp.Forced }) }),
291
- (0, define_helpers_1.fn)((0, define_helpers_1.base)('Sys.info', 'Sys.getpid', 'getRversion', 'R.Version', 'Sys.time', 'Sys.Date', 'Sys.timezone', 'date', '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 }) }),
292
- (0, define_helpers_1.fn)((0, define_helpers_1.base)('getwd'), built_in_proc_name_1.BuiltInProcName.Default, { ambient: { type: "get-working-directory" /* AmbientStateAccessType.GetWorkingDirectory */ }, props: built_in_props_1.CallProp.Ambient, sig: (0, shared_signatures_1.sig)({ '...': built_in_props_1.ArgProp.Forced }) }),
293
- (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: { type: "read-state" /* AmbientStateAccessType.ReadState */, state: ambient_state_name_1.AmbientStateName.allOf(ambient_state_name_1.KeyedState.SearchPath) }, props: built_in_props_1.CallProp.Ambient, sig: (0, shared_signatures_1.sig)({ '...': built_in_props_1.ArgProp.Forced }) }),
294
- (0, define_helpers_1.fn)((0, define_helpers_1.base)('getOption'), built_in_proc_name_1.BuiltInProcName.Default, { ambient: { type: "get-option" /* AmbientStateAccessType.GetOption */ }, props: built_in_props_1.CallProp.Ambient, sig: (0, shared_signatures_1.sig)({ '...': built_in_props_1.ArgProp.Forced }) }),
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.ReadGraphicsState }, define_helpers_1.Primitive),
25
- (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.ReadGraphicsState }, define_helpers_1.Primitive),
26
- /* grid-based plots ignore the base graphics parameters */
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.concat(...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.ReadGraphicsState }, { overrides: true, assumePrimitive: true }),
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
- (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 }, define_helpers_1.Primitive),
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, hasUnknownSideEffects: { type: 'link-to-last-call', callName: (0, shared_configs_1.toRegex)(shared_configs_1.GgPlotCreate.concat(shared_configs_1.GgPlotAddons)) }, tags: [built_in_props_1.SemanticCallTag.Graphics], sig: (0, shared_signatures_1.sig)({ '...': built_in_props_1.ArgProp.Forced }) }, define_helpers_1.Primitive),
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: { type: "set-keyed" /* AmbientStateAccessType.SetKeyed */, state: ambient_state_name_1.KeyedState.SearchPath, keys: { from: 'constant', key: '.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 }) }),
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] }),