[CST-2] Types: Restoring Type Soundness

Ewan Mellor eem21@cam.ac.uk
Sat, 12 May 2001 07:26:15 +0100 (BST)


On Sat, 12 May 2001, Mo wrote:

> 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.

SML-NJ rejects the code

let val f = (fn x => x)(fn x => x) in (f true) :: (f nil) end;

as being mistyped (what it calls a "tycon mismatch").

HTH,

Ewan.