make it possible to a type variable introduced in the type specification of a surrounding function in the specification for local functions
This is not possible (see "3.7 Typing Functions" of the language report). The example given is:
f:: a -> (a,a)
f x = g x
where
// g:: b -> (a^,b)
g y = (x,y)
This feature would be highly desirable to:
- improve readability of the code
- improve performance (e.g. the tuple returned by
g
in the example above cannot be made strict without type annotation)