From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.1.3 (2006-06-01) on yquem.inria.fr X-Spam-Level: ** X-Spam-Status: No, score=2.8 required=5.0 tests=AWL,DATE_IN_FUTURE_03_06, MISSING_HEADERS,SPF_FAIL autolearn=disabled version=3.1.3 X-Original-To: caml-list@yquem.inria.fr Delivered-To: caml-list@yquem.inria.fr Received: from mail2-relais-roc.national.inria.fr (mail2-relais-roc.national.inria.fr [192.134.164.83]) by yquem.inria.fr (Postfix) with ESMTP id 87EB5BC69 for ; Wed, 24 Oct 2007 20:00:26 +0200 (CEST) X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: Ah4FADslH0dSs6cFnWdsb2JhbAA6gSCNAAIBAQsPCIE/ X-IronPort-AV: E=Sophos;i="4.21,325,1188770400"; d="scan'208";a="3565434" Received: from mail-ilca.tepkom.ru (HELO mail.tepkom.ru) ([82.179.167.5]) by mail2-smtp-roc.national.inria.fr with ESMTP; 24 Oct 2007 20:00:26 +0200 Received: from localhost (localhost [127.0.0.1]) by mail.tepkom.ru (Postfix) with ESMTP id CC708580C70F for ; Wed, 24 Oct 2007 21:55:23 +0400 (MSD) X-Virus-Scanned: by amavisd-new-2.4.2 (20060627) (Debian) at tepkom.ru with clamav Received: from mail.tepkom.ru ([127.0.0.1]) by localhost (mail.tepkom.ru [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id Yh6BKpy42K0r for ; Wed, 24 Oct 2007 21:55:23 +0400 (MSD) Received: from [192.168.1.7] (ppp91-122-104-125.pppoe.avangard-dsl.ru [91.122.104.125]) by mail.tepkom.ru (Postfix) with ESMTP id 3A063580C700 for ; Wed, 24 Oct 2007 21:55:23 +0400 (MSD) Message-ID: <471FC0AB.2020408@tepkom.ru> Date: Wed, 24 Oct 2007 22:01:15 +0000 From: Dmitri Boulytchev User-Agent: Mozilla Thunderbird 1.0.6 (X11/20050905) X-Accept-Language: ru-ru, ru MIME-Version: 1.0 Cc: caml-list@yquem.inria.fr Subject: Re: [Caml-list] type abbreviation is cyclic References: <344522.90449.qm@web82102.mail.mud.yahoo.com> <9d3ec8300710241040i618b5f32ka0d7d29e107534ec@mail.gmail.com> In-Reply-To: <9d3ec8300710241040i618b5f32ka0d7d29e107534ec@mail.gmail.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Spam: no; 0.00; abbreviation:01 abbreviation:01 beginner's:01 ocaml:01 bug:01 sbcglobal:98 beginners:01 wrote:01 rec:01 caml-list:01 caml-list:01 functions:01 cyclic:01 cyclic:01 int:01 Atleast one value of that type exists :) let rec x y n = (n (y+1) x) + 1 >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 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 >> >> >> >> > > > >