[Types-sig] how to do a typecase? (was: Static typing: Towards closure?)

skaller skaller@maxtal.com.au
Tue, 25 Jan 2000 00:38:27 +1100


Jeremy Hylton wrote:

>   JS> previous ones] but it isn't clear how to detect this in general
>   JS> -- without eliminating useful (tractable) use of type recursion
>   JS> such as:
> 
>   JS>   type node = Node of node | Int of int
> 
> It isn't clear to me either, but I see that in Ocaml I can
> successfully evaluate:
>     "type node = Node of node | Int of int"
> but not
>     "let rec f () = f".
> This suggests to me that it is possible to allow recursive types
> without having a solution to latter problem.

	The thing here is to observe that none of us are
type theorists. Well, amateur ones perhaps :-)

	So we should not byte off more than we can Choo. :-)

-- 
John (Max) Skaller, mailto:skaller@maxtal.com.au
10/1 Toxteth Rd Glebe NSW 2037 Australia voice: 61-2-9660-0850
homepage: http://www.maxtal.com.au/~skaller
download: ftp://ftp.cs.usyd.edu/au/jskaller