Date: Tue, 11 Nov 1997 17:51:35 +0100 (MET)
From: Simon Helsen <helsen@informatik.uni-tuebingen.de>
To: Caml Mailing-list <caml-list@inria.fr>
Subject: recursive datatypes
Message-Id: <Pine.A32.3.96.971111174455.16668X-100000@meijin>
Why does Caml type-check the following program? It wouldn't in Standard ML
and I don't see the use for it, as it may lead to infinite programs...
(I don't have a french keyboard)
Pourquoi est le programme ci-desous bon type ? C'est ne pas le
cas en Standard ML et je ne comprend pas l'usage pour ca parce que le
programme peut eventuellement cours a l'infini...
type 'a tree = Tree of 'a
let f x = Tree (f x)
----------------------- Simon Helsen ------------------------
-- Wilhelm-Schickard-Institut fuer Informatik --
-- Arbeitsbereich Programmierung (PU) --
-- Universitaet Tuebingen, Germany --
-------------------------------------------------------------
-- http://www-pu.informatik.uni-tuebingen.de/users/helsen/ --
This archive was generated by hypermail 2b29 : Sun Jan 02 2000 - 11:58:12 MET