-
Notifications
You must be signed in to change notification settings - Fork 58
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
CNil::absurd() for producing any type #93
Comments
Hmm; Rather than doing this (and since we introduced some other breaking changes in master), I'd like us to get rid of I'd personally like to have: #[lang_item = "never"]
impl ! {
pub fn absurd<T>(self) -> T {
match self {}
}
} in the standard library tho. |
Okay. Do note that this will prevent inherent method wrappers (#90) on empty coproducts. That said, in most cases not having these methods is not a huge loss (most have no implementations for CNil, and who needs to take a (for instance, it could be an issue for code generated by macros) |
Yeah sounds fine ^,- |
Do you mean that not having the wrappers on CNil sounds fine? Or that keeping CNil around sounds fine? |
Sorry, I meant the former. |
Okay, I'll close this for now. |
Dangit, I'm having too many ideas all at once now!
Bikeshedding for the name is welcome. The name
absurd()
comes from proof solvers. Picture it appearing e.g. at the bottom of this example, or as the body of this impl. (random aside: uh... why is that impl#[doc(hidden)]
?)The text was updated successfully, but these errors were encountered: