All this serves to turn val id = fn x => x into val id = Λα fn x:α => x within the complier, and turn id 3 into id[int] 3, et cetera.
Sadly, a lot of church encodings that we like aren't really workable - we can describe the church encodings, but we can't do anything with them.
There's also an important misunderstanding involving the interaction of references and polymorphism. If we tried to make some val r = ref NONE, it seems like it should have type 'a option ref. However, if that was the case, we should be able to assign SOME 12 to the reference and then run
case !r of NONE => 0 | SOME f => f 0... which treats the number 12 as a function! If this was allowed, it would break the type safety property of the language.
Looking at the underlying polymorphism tells us what's going on. We should have val r = Λα. ref(NONE: α option), and the assignment becomes r[int] := SOME 12, and then the dereference becomes
case !(r[int]) of NONE => 0 | SOME f => f 0... which is not a problem, because it just creates two different references. However, this is really not obvious from the original code, and it is a problem if some code that we meant to be a value is suddenly a funciton that spawns new references - the issue is that side effects that we expected to happen can happen different numbers of times.