obj Sex = Male or Female; val Male = "male"; val Female = "female"; val s:Sex = "male"; (* This is fine, since s's secondary type is "(the string \"male\") or (the string \"female\")" which means we can type-safely assign "male" to it. *) val s':Sex = "x"; (* This is not fine, since "x" is not compat with the secondary spelling of s'. *) val s'':Sex = 10; (* This is obviously wrong. *)