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=0.2 required=5.0 tests=AWL,HTML_MESSAGE 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 AC198BBCA for ; Mon, 12 May 2008 03:19:29 +0200 (CEST) X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AkEDALQ3J0jRVYT7c2dsb2JhbACCNTaPIgEMAwQECQ+TCYN5 X-IronPort-AV: E=Sophos;i="4.27,470,1204498800"; d="scan'208";a="26061605" Received: from an-out-0708.google.com ([209.85.132.251]) by mail4-smtp-sop.national.inria.fr with ESMTP; 12 May 2008 03:19:29 +0200 Received: by an-out-0708.google.com with SMTP id b2so517204ana.102 for ; Sun, 11 May 2008 18:19:27 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:to:subject:mime-version:content-type; bh=KdxLWipJVrHvtXecOog7iFSQrXJHduDxewFAfh22/Ak=; b=ZH1sP0e0EZXsvZs5A11lJSm/0Y9rzkmPCqQNcwfJRpJpi3SwLf1XCoiE1xpLRhq5YxE8o5LjJ0FfSoDW8Ba4EXaeGKNZXsQE2uUkItHO3fYLiS7XfkCGNkTmItapJquAsjO8YIWlKlKum4/FRaUz1y87bMXuap3Z3yEgcu6n6B0= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:mime-version:content-type; b=sV91oPEF33jSggsG2lxQMeJv5bjpaU9kvwGdt11pSaxCtgvh0MQuTZR4bQh4lHBBx74Nwx0Dr/gBwXGUH1iT5V8dUIdIAs2ehkmDDpm6CykgoH+Xice96dNFxQSYwvm9XX6akV6eZlfLKupCYpGJxMS4C52THtdyieaTPslsYZs= Received: by 10.100.41.9 with SMTP id o9mr7737681ano.42.1210555166976; Sun, 11 May 2008 18:19:26 -0700 (PDT) Received: by 10.100.216.8 with HTTP; Sun, 11 May 2008 18:19:26 -0700 (PDT) Message-ID: Date: Sun, 11 May 2008 21:19:26 -0400 From: "Jacques Le Normand" To: "caml-list caml-list" Subject: ocamlc freezes MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_Part_2838_27024949.1210555166969" X-Spam: no; 0.00; ocamlc:01 freezes:01 node:01 node:01 foo:01 foo:01 ocamlc:01 freezes:01 ocaml:01 ocaml:01 'left:98 'left:98 ubuntu:98 ubuntu:98 compile:01 ------=_Part_2838_27024949.1210555166969 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline hello caml-list when I try to compile class type node = object method get_right_sibling : node option end class type ['top_parent_type,'left_sibling_type,'right_sibling_type] typ = object inherit node method get_left_sibling : 'left_sibling_type option method get_right_sibling : 'right_sibling_type option end type 'p foo_typ = ('p,'p foo_typ,'p foo_typ) typ with ocamlc test.ml ocamlc just freezes; I'm using ocaml 3.09.2 on ubuntu. What should I do? ------=_Part_2838_27024949.1210555166969 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline hello caml-list
when I try to compile

class type node =
object
  method  get_right_sibling : node option
end
class type ['top_parent_type,'left_sibling_type,'right_sibling_type] typ  =
object
  inherit node
  method get_left_sibling : 'left_sibling_type option
  method get_right_sibling : 'right_sibling_type option
end   
type 'p foo_typ = ('p,'p foo_typ,'p foo_typ) typ


with

ocamlc test.ml

ocamlc just freezes; I'm using ocaml 3.09.2 on ubuntu. What should I do?
------=_Part_2838_27024949.1210555166969-- 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=0.0 required=5.0 tests=AWL autolearn=disabled version=3.1.3 X-Original-To: caml-list@yquem.inria.fr Delivered-To: caml-list@yquem.inria.fr Received: from mail3-relais-sop.national.inria.fr (mail3-relais-sop.national.inria.fr [192.134.164.104]) by yquem.inria.fr (Postfix) with ESMTP id F3E25BBCA for ; Mon, 12 May 2008 10:37:46 +0200 (CEST) X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AmwCAA6fJ0hQRFuwiGdsb2JhbACSDwEBAQ8glzs X-IronPort-AV: E=Sophos;i="4.27,472,1204498800"; d="scan'208";a="12487457" Received: from furbychan.cocan.org ([80.68.91.176]) by mail3-smtp-sop.national.inria.fr with ESMTP; 12 May 2008 10:37:46 +0200 Received: from rich by furbychan.cocan.org with local (Exim 4.63) (envelope-from ) id 1JvTXV-000638-Gc; Mon, 12 May 2008 09:37:45 +0100 Date: Mon, 12 May 2008 09:37:45 +0100 To: Jacques Le Normand Cc: caml-list caml-list Subject: Re: [Caml-list] ocamlc freezes Message-ID: <20080512083745.GA23048@annexia.org> References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.13 (2006-08-11) From: Richard Jones X-Spam: no; 0.00; ocamlc:01 freezes:01 node:01 node:01 foo:01 foo:01 ocamlc:01 freezes:01 ocaml:01 'left:98 'left:98 ubuntu:98 wrote:01 compile:01 incompatible:01 On Sun, May 11, 2008 at 09:19:26PM -0400, Jacques Le Normand wrote: > hello caml-list > when I try to compile > > class type node = > object > method get_right_sibling : node option > end > class type ['top_parent_type,'left_sibling_type,'right_sibling_type] typ = > object > inherit node > method get_left_sibling : 'left_sibling_type option > method get_right_sibling : 'right_sibling_type option > end > type 'p foo_typ = ('p,'p foo_typ,'p foo_typ) typ > > with > > ocamlc test.ml > > ocamlc just freezes; I'm using ocaml 3.09.2 on ubuntu. What should I do? Possibly upgrade. With 3.10.0 this gives an error: File "test.ml", line 11, characters 4-48: This type constructor expands to type 'a foo_typ = < get_left_sibling : 'a foo_typ option; get_right_sibling : node option > but is here used with type node = < get_right_sibling : node option > Type node = < get_right_sibling : node option > is not compatible with type < get_right_sibling : node option > Type 'a foo_typ = < get_left_sibling : 'a foo_typ option; get_right_sibling : node option > is not compatible with type < get_left_sibling : 'a foo_typ option; get_right_sibling : node option > Types for method get_left_sibling are incompatible Rich. -- Richard Jones Red Hat 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=0.1 required=5.0 tests=AWL 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 99345BBCA for ; Mon, 12 May 2008 15:38:02 +0200 (CEST) X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: ApoEABblJ0iCNhAB/2dsb2JhbACqRA X-IronPort-AV: E=Sophos;i="4.27,473,1204498800"; d="scan'208";a="26079312" Received: from kurims.kurims.kyoto-u.ac.jp ([130.54.16.1]) by mail4-smtp-sop.national.inria.fr with ESMTP; 12 May 2008 15:38:01 +0200 Received: from localhost (orion [130.54.16.5]) by kurims.kurims.kyoto-u.ac.jp (8.13.8/8.13.8) with ESMTP id m4CDbrde002145; Mon, 12 May 2008 22:37:53 +0900 (JST) Date: Mon, 12 May 2008 22:37:43 +0900 (JST) Message-Id: <20080512.223743.52176750.garrigue@math.nagoya-u.ac.jp> To: rich@annexia.org Cc: rathereasy@gmail.com, caml-list@yquem.inria.fr Subject: Re: [Caml-list] ocamlc freezes From: Jacques Garrigue In-Reply-To: <20080512083745.GA23048@annexia.org> References: <20080512083745.GA23048@annexia.org> X-Mailer: Mew version 4.2 on Emacs 22.1 / Mule 5.0 (SAKAKI) Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Spam: no; 0.00; ocamlc:01 freezes:01 node:01 node:01 foo:01 foo:01 ocamlc:01 freezes:01 ocaml:01 bug:01 type-checker:01 bug:01 cheers:01 'left:98 'left:98 From: Richard Jones > On Sun, May 11, 2008 at 09:19:26PM -0400, Jacques Le Normand wrote: > > hello caml-list > > when I try to compile > > > > class type node = > > object > > method get_right_sibling : node option > > end > > class type ['top_parent_type,'left_sibling_type,'right_sibling_type] typ = > > object > > inherit node > > method get_left_sibling : 'left_sibling_type option > > method get_right_sibling : 'right_sibling_type option > > end > > type 'p foo_typ = ('p,'p foo_typ,'p foo_typ) typ > > > > with > > > > ocamlc test.ml > > > > ocamlc just freezes; I'm using ocaml 3.09.2 on ubuntu. What should I do? > > Possibly upgrade. With 3.10.0 this gives an error: > > File "test.ml", line 11, characters 4-48: > This type constructor expands to type > 'a foo_typ = > < get_left_sibling : 'a foo_typ option; get_right_sibling : node option > > but is here used with type node = < get_right_sibling : node option > > Type node = < get_right_sibling : node option > is not compatible with type > < get_right_sibling : node option > > Type > 'a foo_typ = > < get_left_sibling : 'a foo_typ option; get_right_sibling : node option > > is not compatible with type > < get_left_sibling : 'a foo_typ option; get_right_sibling : node option > > Types for method get_left_sibling are incompatible This probably requires a bit of explanation, as the error message seems to tell that identical types are not so... maybe a bug in the reporting code. Anyway, this is the first line that matters. You cannot change a method's type with method override. So get_right_sibling in typ has still type [node option], which means that in foo_typ, ['p foo_typ] should be a [node option], hence the contradiction. There was a type-checker bug in 3.09.2, but it is now fixed. Cheers, Jacques Garrigue