Version française
Home     About     Download     Resources     Contact us    
Browse thread
type abbreviation is cyclic
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: -- (:)
From: Till Varoquaux <till.varoquaux@g...>
Subject: Re: [Caml-list] type abbreviation is cyclic
Type b doesn't exactly make much sens to me.
While I could easilly define a value of type b (fun x:int _ -> x ) I
really don't see the point. I'm gessing you'r trying to pass a chain
of alternative functions (In which case this seems to be the  wrong
way).
Could you give an exemple (without using Obj.magic) were you'd
actually need such a type.
On 10/24/07, William W Smith <sesquized@sbcglobal.net> wrote:
> 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
>
> _______________________________________________
> Caml-list mailing list. Subscription management:
> http://yquem.inria.fr/cgi-bin/mailman/listinfo/caml-list
> Archives: http://caml.inria.fr
> Beginner's list:
> http://groups.yahoo.com/group/ocaml_beginners
> Bug reports: http://caml.inria.fr/bin/caml-bugs
>
>


-- 
http://till-varoquaux.blogspot.com/