We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
The type inference rules for list literals states
Note that the above rules forbid List elements that are Types. More generally, if the element type is not a Type then that is a type error.
Is there a good reason to have this restriction? What is the problem of changing
Γ ⊢ t : T₀ Γ ⊢ T₀ : Type Γ ⊢ [ ts… ] : List T₁ T₀ ≡ T₁ ──────────────────────────────────────────────────────────── Γ ⊢ [ t, ts… ] : List T₀
to
Γ ⊢ t : T₀ Γ ⊢ [ ts… ] : List T₁ T₀ ≡ T₁ ──────────────────────────────────────────────────────────── Γ ⊢ [ t, ts… ] : List T₀
?
The text was updated successfully, but these errors were encountered:
I suppose one follow-on complication is:
List is a function from a Type to another Type:
────────────────────── Γ ⊢ List : Type → Type
Would no longer be true. Perhaps at this point we're stuck.
Sorry, something went wrong.
@ocharles: Yeah, the only way this would work is if List became a keyword that had to be saturated with the element type instead of a built-in
List
Well, that, or implicit arguments to specify the type of the type being applied to the list
what we need is ✨ universe polymorphism ✨
No branches or pull requests
The type inference rules for list literals states
Is there a good reason to have this restriction? What is the problem of changing
to
?
The text was updated successfully, but these errors were encountered: