Marc Weber wrote:
Should this be rejected?

You can put this into a .ur file top level and still compile it!?

type type_int = int
val y:type_int = 2
type type_int = string
val x:type_int = "o"

type_int is assigned int and string!

Or am I totally missunderstanding something here?

This behavior is just as in ML or Haskell. You are shadowing a definition, but the old definition doesn't "go away," it just becomes impossible to reference. At the end of the file, [y] has a type that refers to an out-of-scope identifier, but that isn't problematic semantically.

_______________________________________________
Ur mailing list
[email protected]
http://www.impredicative.com/cgi-bin/mailman/listinfo/ur

Reply via email to