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=1.1 required=5.0 tests=AWL,SPF_NEUTRAL autolearn=disabled version=3.1.3 X-Original-To: caml-list@yquem.inria.fr Delivered-To: caml-list@yquem.inria.fr Received: from mail4-relais-sop.national.inria.fr (mail4-relais-sop.national.inria.fr [192.134.164.105]) by yquem.inria.fr (Postfix) with ESMTP id 734A2BC69 for ; Wed, 24 Oct 2007 19:43:26 +0200 (CEST) X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AgAAAD8hH0dA6aLmkmdsb2JhbACOWgIBAQcEBBMWgSk X-IronPort-AV: E=Sophos;i="4.21,325,1188770400"; d="scan'208";a="18569016" Received: from nz-out-0506.google.com ([64.233.162.230]) by mail4-smtp-sop.national.inria.fr with ESMTP; 24 Oct 2007 19:41:03 +0200 Received: by nz-out-0506.google.com with SMTP id x7so237006nzc for ; Wed, 24 Oct 2007 10:40:58 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=beta; h=domainkey-signature:received:received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; bh=YeSgk0QaVYuQiXGDZRHCD17uPliArHA6cTiABP1PYEQ=; b=AkUcZp2Ut7wbENf98dZ2y691nWnntXC5adJZAEDzx8TUBCaQTRgowkMDO/0jyZl7uTQGwzuNy9h6GgmPRYrkJC4mVb1OFeY5oYXok2kC8TuMknbSWlslhZv8oOvnLd91uXTwnacF4GVsuFEGA0U87NAJXrinDVo/IklkfLKzPeY= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=ALxtmCUMVZw4fRXPyS01b22U+xsjElyl3FKAETpTIXyuyP5oaGPYeD3dzsw5mfIOSEcohS3UfW3HWugPC32bBv559xYBWKloiS0cmdsnxc0p6+62QY3B8twz4BnAVMwWu2wVsShFN3hx56MDWNoKChgwrdV5Pz2Tnq1nV4I7134= Received: by 10.142.157.15 with SMTP id f15mr281922wfe.1193247657153; Wed, 24 Oct 2007 10:40:57 -0700 (PDT) Received: by 10.143.168.5 with HTTP; Wed, 24 Oct 2007 10:40:57 -0700 (PDT) Message-ID: <9d3ec8300710241040i618b5f32ka0d7d29e107534ec@mail.gmail.com> Date: Wed, 24 Oct 2007 13:40:57 -0400 From: "Till Varoquaux" To: "William W Smith" Subject: Re: [Caml-list] type abbreviation is cyclic Cc: caml-list@yquem.inria.fr In-Reply-To: <344522.90449.qm@web82102.mail.mud.yahoo.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <344522.90449.qm@web82102.mail.mud.yahoo.com> X-Spam: no; 0.00; abbreviation:01 abbreviation:01 beginner's:01 ocaml:01 bug:01 sbcglobal:98 beginners:01 wrote:01 caml-list:01 caml-list:01 functions:01 cyclic:01 cyclic:01 int:01 int:01 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 > > -- http://till-varoquaux.blogspot.com/