Closed barrucadu closed 3 years ago
A monomorphic type signature may occur in any pattern
I’m surprised to read this. I thought this was not part of Haskell, but enabled via scoped type variables?
polymorphic types
I think this should be parametric. id
is polymorphic (can be instantiated at different types) because its type ∀a. a -> a
is parametric (takes a parameter a
). A “polymorphic type” would be what we call poly-kinded, e.g. Proxy
is poly-kinded (can be instantiated at different kinds) because its type ∀k. k -> *
is parametric (takes a parameter k
).
I’m surprised to read this. I thought this was not part of Haskell, but enabled via scoped type variables?
Sorry, I wrote that from the perspective of the proposal having been accepted. I'll revise that, and also change polymrophic to parametric.
I took “polymorphic type” to mean “polytype”, in the Hindley–Milner sense of “has top-level foralls”.
As for the “unresolved questions”, changing ScopedTypeVariables
to allow implicit quantification seems like it could cause mistyping to lead to mis-typing.
https://github.com/barrucadu/rfcs/blob/patternsignatures/texts/0000-patternsignatures.rst