From mboxrd@z Thu Jan 1 00:00:00 1970 Received: (from majordomo@localhost) by pauillac.inria.fr (8.7.6/8.7.3) id JAA18244; Thu, 9 Aug 2001 09:09:45 +0200 (MET DST) X-Authentication-Warning: pauillac.inria.fr: majordomo set sender to owner-caml-list@pauillac.inria.fr using -f 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 JAA18301 for ; Thu, 9 Aug 2001 09:09:44 +0200 (MET DST) Received: from quetelet.bik-gmbh.de (quetelet.bik-gmbh.de [194.233.237.132]) by nez-perce.inria.fr (8.11.1/8.10.0) with ESMTP id f7979i510480 for ; Thu, 9 Aug 2001 09:09:44 +0200 (MET DST) Received: from hars by quetelet.bik-gmbh.de with local (Exim 3.12 #1 (Debian)) id 15UjvJ-0001dk-00; Thu, 09 Aug 2001 09:08:05 +0200 Date: Thu, 9 Aug 2001 09:08:05 +0200 From: Florian Hars To: JayR Cc: caml-list@inria.fr Subject: Re: [Caml-list] native code debugging Message-ID: <20010809090805.B6270@hars> References: <4.3.2.7.2.20010808113426.02901510@shell16.ba.best.com> <3B71E904.4016B6E7@home.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5i In-Reply-To: <3B71E904.4016B6E7@home.com>; from jcriddle4@home.com on Wed, Aug 08, 2001 at 07:36:04PM -0600 Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk On Wed, Aug 08, 2001 at 07:36:04PM -0600, JayR wrote: > Is the following a side effect of defining these > at the top level? > # let id2 = id id;; > val id2 : '_a -> '_a = No, its a side-effect of side-effects. It is due to the so-called value restriction, which for some reason beyond my momentary comprehension is needed to be able to type programs with side-effects. Section 5.1.1 of the introduction by Hickey (linked to from the Ocaml homepage under "On-line Tutorials" explains exactly your problem. # let id2 x = (id id) x;; val id2 : 'a -> 'a = should work. Yours, Florian. ------------------- Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/ To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr