-
Notifications
You must be signed in to change notification settings - Fork 40
WIP: const effect #194
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
base: main
Are you sure you want to change the base?
WIP: const effect #194
Conversation
use formality_prove::Env; | ||
use formality_rust::{ | ||
grammar::{Fn, FnBoundData}, | ||
grammar::{Fn, FnBody, FnBoundData, MaybeFnBody}, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ignore this, I'm making a test :)
Revisited this, I think there are still more stuff needed to properly model this. It might be ok to just rebase and land this, but the syntax we use here is definitely not the friendliest to the reader >:) This has happened a while ago, so to recap, we defined the subset relationship between How the test currently looks like for const fn foo<T>()
where
T: Default,
{
<T as Default>::default();
} is fn foo() -> () random_keyword do const {
(AssociatedEffect(Default()))
} Improvements
const fn default<T: [const] Default>() -> T {
T::default()
} but we might need to do a small refactoring to make this happen. |
Opened a draft so it is easier to fetch and push to this branch.