[CST-2] Types: Ex 4.3.2

Sam Staton ss368@cam.ac.uk
Fri, 31 May 2002 13:57:46 +0100 (BST)


He is a bit brief about what constitutes a value on slide 34 -- he doesnt
include lists, so perhaps we can say

let l = \x.x :: nil in
case l of nil => nil
    | f::tail => if (f true) then (f nil) else (f nil)

which has type 'a list (I think!) but wouldn't be allowed in (\x.x)::nil
isnt a value.

-- 
sam

On Fri, 31 May 2002, R. Bansal wrote:

> 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 ML+ref of
> section 4.2??
>
> Can't figure out the right example.
>
> Reena
> ----
>
>
>
> _______________________________________________
> CST-2 mailing list
> CST-2@srcf.ucam.org
> http://www.srcf.ucam.org/mailman/listinfo/cst-2
>