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

TraitAsType support #52

Merged
merged 3 commits into from
Jan 28, 2025
Merged

TraitAsType support #52

merged 3 commits into from
Jan 28, 2025

Conversation

utkn
Copy link
Contributor

@utkn utkn commented Jan 24, 2025

This PR aims to add TraitAsType support. They are handled purely at the extractor side.

If they occur in parameter types, they are replaced by type variables. If they occur in the return type, they are replaced by the concrete type that the function body returns.

I also added a placeholder type at the Lean side, which can be invoked with _ in the Lean definitions. This might be useful in the future.

@utkn utkn mentioned this pull request Jan 24, 2025
7 tasks
@utkn utkn added this to the Milestone 1 milestone Jan 24, 2025
@utkn utkn requested a review from mpenciak January 24, 2025 18:18
@utkn utkn marked this pull request as ready for review January 24, 2025 18:21
@utkn utkn requested a review from kustosz January 24, 2025 18:21
Copy link
Contributor

@mpenciak mpenciak left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks like a much simpler solution than #39!

@utkn utkn merged commit f76b5f7 into main Jan 28, 2025
6 checks passed
@utkn utkn deleted the us/trait-as-type-2 branch January 28, 2025 08:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants