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

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: -- (:)
From: Jerome Vouillon <Jerome.Vouillon@i...>
Subject: Re: Typing question

Hello,

On Mon, Oct 25, 1999 at 05:07:58PM +0200, Sylvain wrote:
> I tried to compile this file "foobar.ml" issuing 
> 
> ocamlc -c -i foobar.ml > foobar.mli
> ocamlc -c -i foobar.mli
> ocamlc -c foobar.ml
> 
> But at the third stage of the process, it answers me that the
> implementation doesn't match the interface ...

The type of a class in not always printed correctly.
In your case, the type of the first class should be :
    class nameTable :
      'a ->
      object
        constraint 'a = #answerToIsNewName
        val fatherContext : 'a
        val table : (string, nameInfo) Hashtbl.t
        method addName : string -> nameType -> unit
        method delName : string -> unit
        method isNewName : string -> bool
        method newName : nameType -> string
      end

-- Jérôme