[clean-list] a local function typing question in function
composition
Edsko de Vries
devriese at cs.tcd.ie
Thu Apr 12 18:38:38 MEST 2007
Hey,
> This modified example helps a lot! It makes it clear that practical
> expressions can also have multiple types. Thank you for taking the
> time to explain this.
You're welcome :) It is a confusing issue; I only really understood it
when I wrote a typechecker myself :)
> In fact, how about changing Clean to disallow the use of a type
> variable name in an inner type declaration if the same name appears in
> an outer type declaration? This would prevent people from doing silly
> things.
That may be a good temporary fix. A better solution would be to allow
for scoped type variables, so that they'll do what the programmer
expects. In fact, I have a uniqueness type system that does have scoped
type variables; see
http://www.cs.tcd.ie/~devriese/pub/tfp07-paper.pdf
Edsko
More information about the clean-list
mailing list