enso/distribution/lib/Standard/Visualization/0.0.0-dev/src
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
..
Sql Remove 'here' and make method name resolution case-sensitive (#3538) 2022-07-07 10:31:06 +00:00
Table Improved Vector/Array interop (#3667) 2022-09-13 03:07:17 +00:00
File_Upload.enso Get rid of free-floating atoms. Everything has a type now! (#3671) 2022-08-30 22:54:53 +00:00
Geo_Map.enso Get rid of free-floating atoms. Everything has a type now! (#3671) 2022-08-30 22:54:53 +00:00
Helpers.enso Improved Vector/Array interop (#3667) 2022-09-13 03:07:17 +00:00
Histogram.enso Improved Vector/Array interop (#3667) 2022-09-13 03:07:17 +00:00
Id.enso Get rid of free-floating atoms. Everything has a type now! (#3671) 2022-08-30 22:54:53 +00:00
Main.enso IDE uses new visualization API (#3661) 2022-09-01 15:33:46 +03:00
Preprocessor.enso IDE uses new visualization API (#3661) 2022-09-01 15:33:46 +03:00
Scatter_Plot.enso Improved Vector/Array interop (#3667) 2022-09-13 03:07:17 +00:00