caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
* Re:  Why is this not allowed?
@ 1999-12-02 11:13 Damien Doligez
  1999-12-02 18:40 ` John Prevost
  0 siblings, 1 reply; 4+ messages in thread
From: Damien Doligez @ 1999-12-02 11:13 UTC (permalink / raw)
  To: caml-list

>From: Claudio Sacerdoti Coen <sacerdot@students.cs.unibo.it>
[...]
>can you explain me why is this not allowed?
>I can't see a problematic counterexample.
[...]
># let rec id'' = id;;
>This kind of expression is not allowed as right-hand side of `let rec'

Because we don't know how to compile "let rec x = x" or
  let rec x = y
  and y = x

Moreover, you can just remove the "rec" and it works.  It is possible
to implement "let rec var1 = var2", but the usefulness is quite small
compared to the amount of code we would need to write.

-- Damien




^ permalink raw reply	[flat|nested] 4+ messages in thread
* Why is this not allowed?
@ 1999-11-30 16:07 Claudio Sacerdoti Coen
  0 siblings, 0 replies; 4+ messages in thread
From: Claudio Sacerdoti Coen @ 1999-11-30 16:07 UTC (permalink / raw)
  To: caml-list

Hi,

can you explain me why is this not allowed?
I can't see a problematic counterexample.

        Objective Caml version 2.04

# let id x = x;;
val id : 'a -> 'a = <fun>
# let rec id' x = id x;;
val id' : 'a -> 'a = <fun>
# let rec id'' = id;;
This kind of expression is not allowed as right-hand side of `let rec'

							T.I.A.
							C.S.C.

-- 
-----------------------------------------
Real Name: Claudio Sacerdoti Coen
Address: via del Colle n.6
	 S. Lazzaro di Savena (BO)
	 Italy
e-mail:  sacerdot@cs.unibo.it
-----------------------------------------




^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~1999-12-03 13:55 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1999-12-02 11:13 Why is this not allowed? Damien Doligez
1999-12-02 18:40 ` John Prevost
1999-12-03 13:50   ` Pierre Weis
  -- strict thread matches above, loose matches on Subject: below --
1999-11-30 16:07 Claudio Sacerdoti Coen

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).