Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rename Map to Dictionary and Set to Hashset. #10474

Merged
merged 22 commits into from
Jul 9, 2024
Merged
Show file tree
Hide file tree
Changes from 14 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions distribution/lib/Standard/AWS/0.0.0-dev/src/S3/S3.enso
Original file line number Diff line number Diff line change
Expand Up @@ -96,11 +96,11 @@ read_bucket bucket prefix="" credentials:AWS_Credential=AWS_Credential.Default d
- key: the key of the object.
- credentials: AWS credentials. If not provided, the default credentials will
be used.
head : Text -> Text -> AWS_Credential -> Map Text Any ! S3_Error
head : Text -> Text -> AWS_Credential -> Dictionary Text Any ! S3_Error
head bucket key="" credentials:AWS_Credential=AWS_Credential.Default =
response = raw_head bucket key credentials
pairs = response.sdkFields.map f-> [f.memberName, f.getValueOrDefault response]
Map.from_vector pairs
Dictionary.from_vector pairs

## PRIVATE
Gets the raw metadata of a bucket or object.
Expand All @@ -109,7 +109,7 @@ head bucket key="" credentials:AWS_Credential=AWS_Credential.Default =
- bucket: the name of the bucket.
- key: the key of the object.
- credentials: AWS credentials.
raw_head : Text -> Text -> AWS_Credential -> Map Text Any ! S3_Error
raw_head : Text -> Text -> AWS_Credential -> Dictionary Text Any ! S3_Error
raw_head bucket key credentials =
client = make_client_for_bucket bucket credentials
case key == "" of
Expand Down
4 changes: 2 additions & 2 deletions distribution/lib/Standard/Base/0.0.0-dev/src/Any.enso
Original file line number Diff line number Diff line change
Expand Up @@ -392,8 +392,8 @@ type Any
from Standard.Examples import Example_Error_Type

example_map_error =
my_map = Map.empty
error = my_map.at "x"
my_dictionary = Dictionary.empty
error = my_dictionary.at "x"
error.map_error (_ -> Example_Error_Type "x is missing")
map_error : (Error -> Error) -> Any
map_error self ~f =
Expand Down
4 changes: 2 additions & 2 deletions distribution/lib/Standard/Base/0.0.0-dev/src/Data.enso
Original file line number Diff line number Diff line change
Expand Up @@ -310,15 +310,15 @@ fetch (uri:(URI | Text)) (method:HTTP_Method=HTTP_Method.Get) (headers:(Vector (

import Standard.Base.Data
test_file = enso_project.data / "sample.png"
form_data = Map.from_vector [["key", "val"], ["a_file", test_file]]
form_data = Dictionary.from_vector [["key", "val"], ["a_file", test_file]]
response = Data.post url_post (Request_Body.Form_Data form_data)

> Example
Write a URL-encoded form to an HTTP endpoint.

import Standard.Base.Data
test_file = enso_project.data / "sample.txt"
form_data = Map.from_vector [["key", "val"], ["a_file", test_file]]
form_data = Dictionary.from_vector [["key", "val"], ["a_file", test_file]]
response = Data.post url_post (Request_Body.Form_Data form_data url_encoded=True)
@uri Text_Input
@response_format Data_Read_Helpers.format_widget_with_raw_response
Expand Down
Loading
Loading