enso/lib/scala
Hubert Plociniczak fba5047acc
Improved Vector/Array interop (#3667)
`Vector` type is now a builtin type. This requires a bunch of additional builtin methods for its creation:
- Use `Vector.from_array` to convert any array-like structure into a `Vector` [by copy](f628b28f5f)
- Use (already existing) `Vector.from_polyglot_array` to convert any array-like structure into a `Vector` **without** copying
- Use (already existing) `Vector.fill 1 item` to create a singleton `Vector`

Additional, for pattern matching purposes, we had to implement a `VectorBranchNode`. Use following to match on `x` being an instance of `Vector` type:
```
import Standard.Base.Data.Vector

size = case x of
Vector.Vector -> x.length
_ -> 0
```

Finally, `VectorLiterals` pass that transforms `[1,2,3]` to (roughly)
```
a1 = 1
a2 = 2
a3 = 3
Vector (Array (a1,a2, a3))
```
had to be modified to generate
```
a1 = 1
a2 = 2
a3 = 3
Vector.from_array (Array (a1, a2, a3))
```
instead to accomodate to the API changes. As of 025acaa676 all the known CI checks passes. Let's start the review.

# Important Notes
Matching in `case` statement is currently done via `Vector_Data`. Use:
```
case x of
Vector.Vector_Data -> True
```
until a better alternative is found.
2022-09-13 03:07:17 +00:00
..
akka-native/src/main Project Manager Native Image (#1318) 2020-12-09 14:58:11 +01:00
cli/src Getting and Setting Library Metadata (#1967) 2021-08-20 10:23:05 +02:00
connected-lock-manager/src Make Library-Related Operations Not Block the Actor System (#1975) 2021-08-30 15:51:38 +02:00
distribution-manager/src/main/scala/org/enso/distribution Implement library/preinstall (Without Dependencies Yet) (#1972) 2021-08-27 14:01:13 +02:00
docs-generator Fix multiline code docparser (#3379) 2022-04-06 04:39:58 +00:00
downloader/src Revert "Revert "Library Publishing MVP (#1898)"" (#1933) 2021-08-09 16:00:04 +02:00
edition-updater/src Update the Language Server API (#3308) 2022-03-03 16:28:04 +03:00
edition-uploader/src/main/scala/org/enso/build Updating Editions (#1944) 2021-08-12 16:55:23 +02:00
editions/src Update the Language Server API (#3308) 2022-03-03 16:28:04 +03:00
flexer Bump scalac to 2.13.5 (#1531) 2021-03-01 16:35:57 +00:00
graph Bump SBT and Scalafmt (#1203) 2020-10-22 16:12:28 +02:00
interpreter-dsl/src/main/java/org/enso/interpreter/dsl Improved Vector/Array interop (#3667) 2022-09-13 03:07:17 +00:00
json-rpc-server Update profiling CLI arguments (#3461) 2022-05-24 16:01:26 +03:00
json-rpc-server-test Implement library/preinstall (Without Dependencies Yet) (#1972) 2021-08-27 14:01:13 +02:00
library-manager/src Add API for component groups (#3286) 2022-02-24 15:41:14 +03:00
library-manager-test/src Disable npm install in tests on CI (#3620) 2022-07-28 10:35:25 +00:00
locking-test-helper/src/main/scala/org/enso/runtimeversionmanager/test Make Locking Thread-Safe (#1267) 2020-11-06 13:53:45 +01:00
logger Add a markdown style guide (#1022) 2020-07-21 13:59:40 +01:00
logging-service/src Update Scala to 2.13.8 (#3631) 2022-08-08 19:32:55 +00:00
logging-truffle-connector/src/main Dynamically Loading Libraries (#1826) 2021-07-06 00:27:14 +02:00
logging-utils/src Apply automatic formatting prior to turning on checks (#3405) 2022-04-19 12:34:34 +02:00
parser/src Bump SBT and Scalafmt (#1203) 2020-10-22 16:12:28 +02:00
parser-service Update Scala to 2.13.7 (#3214) 2021-12-31 17:50:32 +03:00
pkg Support module imports using a qualified name (#3608) 2022-07-29 14:19:07 +00:00
profiling-utils/src/main/scala/org/enso/profiling Update profiling CLI arguments (#3461) 2022-05-24 16:01:26 +03:00
project-manager Update Scala to 2.13.8 (#3631) 2022-08-08 19:32:55 +00:00
runtime-version-manager/src Fix GitHub Releases Lookup (#3550) 2022-06-28 14:18:31 +00:00
runtime-version-manager-test/src Explicit self (#3569) 2022-07-27 17:45:36 +00:00
searcher/src create inmem database (#3690) 2022-09-07 12:59:18 +03:00
syntax Allow for importing methods (#3633) 2022-08-05 16:25:51 +00:00
task-progress-notifications/src/main/scala/org/enso/cli/task/notifications New Language Server API Implementations / Mocks (#1875) 2021-07-17 16:49:51 +02:00
testkit/src/main/scala/org/enso/testkit Fix cleanup in tests (#3195) 2021-12-16 17:15:28 +03:00
text-buffer/src Avoid whole source reparsing when the IDE performs a simple edit (#3508) 2022-06-16 16:02:57 +02:00
version-output/src/main/scala/org/enso/version Bump SBT and Scalafmt (#1203) 2020-10-22 16:12:28 +02:00