caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: Florian Hars <florian@hars.de>
To: JayR <jcriddle4@home.com>
Cc: caml-list@inria.fr
Subject: Re: [Caml-list] native code debugging
Date: Thu, 9 Aug 2001 09:08:05 +0200	[thread overview]
Message-ID: <20010809090805.B6270@hars> (raw)
In-Reply-To: <3B71E904.4016B6E7@home.com>; from jcriddle4@home.com on Wed, Aug 08, 2001 at 07:36:04PM -0600

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 = <fun>

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 = <fun>

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


  reply	other threads:[~2001-08-09  7:09 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-08-08 18:35 Chris Hecker
2001-08-09  1:36 ` JayR
2001-08-09  7:08   ` Florian Hars [this message]
2001-08-09  7:10   ` False polymorphic (was: Re: [Caml-list] native code debugging) David Mentre

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20010809090805.B6270@hars \
    --to=florian@hars.de \
    --cc=caml-list@inria.fr \
    --cc=jcriddle4@home.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).