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

Map type #822

Merged
merged 83 commits into from
Mar 13, 2022
Merged

Map type #822

merged 83 commits into from
Mar 13, 2022

Conversation

raviqqe
Copy link
Contributor

@raviqqe raviqqe commented Mar 5, 2022

Description

Part of #634.

Todo

  • Add a Map module in a Prelude package.
  • Compile map contexts.
    • Implement record hash functions.

Literals

  • Parse map literals and types.
  • Compile map literals from HIR to MIR.
  • Merging
    • Implement a _mergeMaps function.

Indexing

  • Parse map index expressions.
  • Compile map index expressions from HIR to MIR.
  • Implement a _getMap function.

Others (post MVP)

  • Equality
    • Implement a _equalMaps function.
  • Comparability (maps as keys in maps)
    • Implement a _hashMap function.
  • Subtyping for values in merging
  • List comprehension
    • Implement a _iterateMap function.
  • Size operator/function
  • Remove a Map module in a Core package.

Unit tests?

  • hash_calculation_transformer
  • map_literal_transformer
  • record_hash_function_transformer

@codecov-commenter
Copy link

codecov-commenter commented Mar 6, 2022

Codecov Report

Merging #822 (5d302c7) into main (6ff68cc) will increase coverage by 0.39%.
The diff coverage is 84.40%.

Impacted file tree graph

@@            Coverage Diff             @@
##             main     #822      +/-   ##
==========================================
+ Coverage   81.27%   81.66%   +0.39%     
==========================================
  Files         348      362      +14     
  Lines       31200    33884    +2684     
==========================================
+ Hits        25358    27672    +2314     
- Misses       5842     6212     +370     
Impacted Files Coverage Δ
cmd/pen/src/compile_configuration.rs 0.00% <0.00%> (ø)
lib/app/src/module_compiler.rs 0.00% <ø> (ø)
...e_compiler/prelude_type_configuration_qualifier.rs 0.00% <0.00%> (ø)
lib/ast-hir/src/module_compiler.rs 38.79% <0.00%> (-3.41%) ⬇️
lib/hir-mir/src/error.rs 13.33% <ø> (+3.80%) ⬆️
lib/hir-mir/src/type_compiler.rs 73.86% <0.00%> (-24.63%) ⬇️
lib/hir/src/analysis/error.rs 1.04% <0.00%> (-0.03%) ⬇️
lib/hir/src/analysis/expression_visitor.rs 67.28% <0.00%> (-5.54%) ⬇️
lib/hir/src/analysis/try_operation_validator.rs 84.43% <0.00%> (-2.90%) ⬇️
lib/hir/src/analysis/type_comparability_checker.rs 93.07% <0.00%> (-2.20%) ⬇️
... and 44 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 6ff68cc...5d302c7. Read the comment docs.

@raviqqe raviqqe added the merge label Mar 13, 2022
@raviqqe raviqqe mentioned this pull request Mar 13, 2022
10 tasks
@mergify mergify bot merged commit 5e0d705 into main Mar 13, 2022
@mergify mergify bot deleted the feature/map-type branch March 13, 2022 21:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants