Skip to content

(feat) Generic Types #92

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

Merged
merged 10 commits into from
May 1, 2025
Merged

(feat) Generic Types #92

merged 10 commits into from
May 1, 2025

Conversation

AlSchlo
Copy link
Collaborator

@AlSchlo AlSchlo commented Apr 30, 2025

What

Add generic types in the DSL. This continues addressing #81 .

Programs as follows now properly type check.

image

How

Added unique ids to generic types, and instantiated them to unknown ascending or descending types in solver.rs.

Next steps

Continue addressing #81 , specifically map concatenation, as well as generic bounds (useful for Eqhash in maps).

@codecov-commenter
Copy link

codecov-commenter commented Apr 30, 2025

Codecov Report

Attention: Patch coverage is 93.65385% with 33 lines in your changes missing coverage. Please review.

Project coverage is 89.1%. Comparing base (c38a7d8) to head (91414db).

Files with missing lines Patch % Lines
optd/src/dsl/analyzer/type_checks/solver.rs 92.3% 14 Missing ⚠️
optd/src/dsl/analyzer/into_hir/converter.rs 94.7% 8 Missing ⚠️
optd/src/dsl/analyzer/type_checks/registry.rs 82.9% 8 Missing ⚠️
optd/src/dsl/analyzer/from_ast/converter.rs 95.8% 2 Missing ⚠️
optd/src/dsl/analyzer/type_checks/converter.rs 0.0% 1 Missing ⚠️
Additional details and impacted files
Files with missing lines Coverage Δ
optd/src/dsl/analyzer/from_ast/expr.rs 94.8% <100.0%> (+<0.1%) ⬆️
optd/src/dsl/analyzer/from_ast/pattern.rs 94.2% <100.0%> (ø)
optd/src/dsl/analyzer/from_ast/types.rs 97.6% <100.0%> (+<0.1%) ⬆️
optd/src/dsl/analyzer/hir/context.rs 89.8% <ø> (ø)
optd/src/dsl/analyzer/hir/map.rs 96.5% <ø> (ø)
optd/src/dsl/analyzer/hir/mod.rs 77.5% <ø> (ø)
optd/src/dsl/analyzer/into_hir/mod.rs 78.2% <ø> (ø)
optd/src/dsl/analyzer/semantic_checks/adt_check.rs 98.1% <100.0%> (+<0.1%) ⬆️
optd/src/dsl/analyzer/type_checks/generate.rs 93.2% <ø> (+2.3%) ⬆️
optd/src/dsl/analyzer/type_checks/glb.rs 95.7% <100.0%> (+<0.1%) ⬆️
... and 13 more
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@AlSchlo AlSchlo marked this pull request as ready for review May 1, 2025 01:00
@AlSchlo AlSchlo self-assigned this May 1, 2025
@AlSchlo AlSchlo added the dsl label May 1, 2025
@AlSchlo AlSchlo merged commit c77a4b5 into main May 1, 2025
12 checks passed
@AlSchlo AlSchlo deleted the alexis/generic-types branch May 1, 2025 01:01
@AlSchlo AlSchlo changed the title Alexis/generic types (feat) Generic Types May 1, 2025
AlSchlo added a commit that referenced this pull request May 1, 2025
Add generic types in the DSL. This continues addressing #81 .

Programs as follows now properly type check.

![image](https://github.com/user-attachments/assets/a349cc9c-9e6b-40a9-a3fa-414944287143)

Added unique ids to generic types, and instantiated them to unknown
ascending or descending types in `solver.rs`.

Continue addressing #81 , specifically map concatenation, as well as
generic bounds (useful for `Eqhash` in maps).
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.

2 participants