caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
* type abbreviation is cyclic
@ 2007-10-24 17:27 William W Smith
  2007-10-24 17:40 ` [Caml-list] " Till Varoquaux
                   ` (3 more replies)
  0 siblings, 4 replies; 10+ messages in thread
From: William W Smith @ 2007-10-24 17:27 UTC (permalink / raw)
  To: caml-list

[-- Attachment #1: Type: text/plain, Size: 516 bytes --]

I wonder whether this error is an example of the language being defined more restrictively than required.  What is the reason that I get these results?

type a  = int -> one -> int and one = Unused | One of a;;
type b = int -> b -> int

type a is accepted while type b is not. (b gives "The type abbreviation b is cyclic"  However, in the uses that I intended, there won't be any actual difference between the two.

I'd appreciate an explanation about why there is difference  between a and   b.

Thanks

Bill Smith

[-- Attachment #2: Type: text/html, Size: 594 bytes --]

^ permalink raw reply	[flat|nested] 10+ messages in thread
* Re: type abbreviation is cyclic
@ 2007-10-25 16:56 William W Smith
  0 siblings, 0 replies; 10+ messages in thread
From: William W Smith @ 2007-10-25 16:56 UTC (permalink / raw)
  To: caml-list

[-- Attachment #1: Type: text/plain, Size: 385 bytes --]


I should have checked first.... I don't think what I described here below can work.

I'll  check that I'm making sense first next time.

- Bill

It's the recursion that can happen is related to the technique of 
writing recursive functions without using let rec..

let f1 it a1 b2 = ...
let f2 it a1 b2 = ....
let f3 it a1 b2 = ...

let items = [f1; f2; f3]

let x =  f1 items a b...

[-- Attachment #2: Type: text/html, Size: 457 bytes --]

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

end of thread, other threads:[~2007-10-26  6:36 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-10-24 17:27 type abbreviation is cyclic William W Smith
2007-10-24 17:40 ` [Caml-list] " Till Varoquaux
2007-10-24 22:01   ` Dmitri Boulytchev
2007-10-24 17:44 ` Brian Hurt
2007-10-24 18:09   ` Till Varoquaux
2007-10-24 20:40     ` Jon Harrop
2007-10-25  1:34       ` Dmitri Boulytchev
2007-10-24 21:36 ` Dmitri Boulytchev
2007-10-24 21:38 ` Dmitri Boulytchev
2007-10-25 16:56 William W Smith

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