enso/test
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
..
Benchmarks Tidy up type signatures and error types (#3693) 2022-09-09 11:11:46 +00:00
Examples_Tests Get rid of free-floating atoms. Everything has a type now! (#3671) 2022-08-30 22:54:53 +00:00
Geo_Tests Get rid of free-floating atoms. Everything has a type now! (#3671) 2022-08-30 22:54:53 +00:00
Google_Api_Test Tidying up what is in Standard.Base (#3603) 2022-07-27 13:28:00 +00:00
Image_Tests Tidy up the default imports for Standard.Table (#3660) 2022-08-22 19:21:54 +00:00
micro-distribution Get rid of free-floating atoms. Everything has a type now! (#3671) 2022-08-30 22:54:53 +00:00
Table_Tests Restructuring Database.Connection to allow for database specific types. (#3632) 2022-09-07 17:32:28 +00:00
Tests Improved Vector/Array interop (#3667) 2022-09-13 03:07:17 +00:00
Visualization_Tests Improved Vector/Array interop (#3667) 2022-09-13 03:07:17 +00:00