-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Realizability: fixes and cleanups of docs #5730
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
Realizability: fixes and cleanups of docs #5730
Conversation
@@ -50,7 +50,15 @@ object CheckRealizable { | |||
private val LateInitialized = Lazy | Erased | |||
} | |||
|
|||
/** Compute realizability status */ | |||
/** Compute realizability status. |
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.
Relevant sections of the Scala spec: https://www.scala-lang.org/files/archive/spec/2.13/03-types.html#paths But Dotty does not strictly follow those definitions. A future PR should describe their relation. |
final def isStable(implicit ctx: Context): Boolean = { | ||
/** Is this a denotation of a stable term (or an arbitrary type)? | ||
* Terms are stable if they are idempotent (as in TreeInfo.Idempotent): that is, they always return the same value, | ||
* if any. |
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.
The relation between stable and idempotent was a bit surprising to me and @odersky, but I think I just convinced him (in a quick chat) this makes sense. Counterexamples welcome!
c05e58b
to
b0c8e68
Compare
@odersky This is the documentation/refactoring PR I mentioned... Merged since it got approved (and it's only comments and refactorings), tho we can revisit this if needed. |
This is my attempt at documenting realizability and stability. If this makes enough sense, I think one turn this into documentation.
There's also a behavior change, but I moved that in ##5726. I'll probably rebase this once that's merged.