Add named type wildcards - #3500
Conversation
|
One UX consideration is should |
|
I'd prefer if both type-level and term-level holes behaved the same, so if term holes error then so should type holes. |
|
To add to that - I feel like |
|
Currently we warn if you leave off a type signature for module-level declarations, which is why I preserved the |
And they should be called kinded holes and report only the kind. 😅 |
|
This is ready for review again. I've addressed the UX concerns.
|
hdgarrood
left a comment
There was a problem hiding this comment.
LGTM. Both of the discussed behaviours re erroring vs warning seem sensible to me; I don't have a preference either way.
* Add named type wildcards * Remove debug * Use HoleInferredType for named type wildcards
Implements #715 #1228
This is a slight UX breaking change. This adds
?foosyntax for types, which act as named wildcards which always warn. The previous_syntax acts as a partial type signature, which does not warn unless it's part of a module-level type signature.I didn't change the warning (
WildcardInferredType) except to add the name, but maybe it warrants a separate warning.