From mboxrd@z Thu Jan 1 00:00:00 1970 Received: (from weis@localhost) by pauillac.inria.fr (8.7.6/8.7.3) id IAA26374 for caml-redistribution; Wed, 12 Nov 1997 08:23:26 +0100 (MET) Received: from nez-perce.inria.fr (nez-perce.inria.fr [192.93.2.78]) by pauillac.inria.fr (8.7.6/8.7.3) with ESMTP id RAA15997 for ; Tue, 11 Nov 1997 17:52:06 +0100 (MET) Received: from macon.informatik.uni-tuebingen.de (macon2.Informatik.Uni-Tuebingen.De [134.2.13.2]) by nez-perce.inria.fr (8.8.7/8.8.5) with ESMTP id RAA06735 for ; Tue, 11 Nov 1997 17:52:03 +0100 (MET) Received: from meijin.informatik.uni-tuebingen.de (meijin.Informatik.Uni-Tuebingen.De [134.2.14.232]) by macon.informatik.uni-tuebingen.de (8.8.4/8.8.3/AIX-4.1/WSI-1.0) with SMTP id RAA17242 for ; Tue, 11 Nov 1997 17:51:40 +0100 Received: from localhost by meijin.informatik.uni-tuebingen.de (AIX 4.1/UCB 5.64/4.03) id AA18784; Tue, 11 Nov 1997 17:51:38 +0100 Date: Tue, 11 Nov 1997 17:51:35 +0100 (MET) From: Simon Helsen X-Sender: helsen@meijin To: Caml Mailing-list Subject: recursive datatypes Message-Id: Mime-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: weis 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/ --