Question aboutthe use of an inner forall
Sun, 18 Aug 2002 20:48:44 -0500
"Scott J." <firstname.lastname@example.org> wrote:
> A question: s is not a type variable as a isn't it? I mean a can be
> of type Integer while s cannot.
Guessing at your question:
a has no type (and neither does s); it /is/ a type. In Haskell, types
have kinds. And, both a and s have kind *.
Now then, the user can instantiate a to Integer, yes. And the user
cannot instantiate s to anything---that's what the `forall' is for.
runST will (theoretically) instantiate s to something. That could be
Integer if the language implementors felt like it. The user of runST
certainly has to be prepared for the possibility.
Does that come close to answering your question?