Version française
Home     About     Download     Resources     Contact us    
Browse thread
ocamlc freezes
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: -- (:)
From: Richard Jones <rich@a...>
Subject: Re: [Caml-list] ocamlc freezes
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