[CST-2] Types: Ex 4.3.2
Jamie Shotton
jdjs2@cam.ac.uk
Fri, 31 May 2002 14:02:38 +0100
How about simply:
let x = ((\x.x) (\x.x)) in (x 5)
Since A != {} and M1 is an application...
J
> 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
> >
>
>
>
> _______________________________________________
> CST-2 mailing list
> CST-2@srcf.ucam.org http://www.srcf.ucam.org/mailman/listinfo/cst-2
>