[CST-2] Types: Restoring Type Soundness
M.Y.W.Y. Becker
mywyb2@cam.ac.uk
Sat, 12 May 2001 00:10:07 +0100
Has anyone done Exercise 4.3.2 page 48?
"Give an example of a let-expression not involving references which is
typeable in the ML type system of Section 2.3 but not in the type system
ML+ref of Section 4.2."
My answer is
let f = (fn x.x)(fn x.x) in (f true)::(f nil)
which (I believe) has type "bool list" in the ML type system and no type in
ML+ref.
Surprisingly, Cambridge ML accepts the expression and returns the type
"bool list" although I thought it is based on ML+ref.
Is the expression not a suitable example?
I suspect that C-ML does not conform to the 1996 Standard ML
specification...
Mo