From: "Sami Mäkelä" <sajuma@utu.fi>
To: Frederic Tronel <Frederic.Tronel@inrialpes.fr>
Cc: caml-list@inria.fr
Subject: Re: [Caml-list] Problem with parametric classes
Date: Mon, 22 Apr 2002 13:10:33 +0300 [thread overview]
Message-ID: <3CC3E199.F6142F60@utu.fi> (raw)
In-Reply-To: <3CC3CD45.E6D6E166@inrialpes.fr>
Frederic Tronel wrote:
> I'm using Ocaml 3.04 (plus a patch applied to circumvent a
> problem with parametric classes bug id 841).
>
> I'm trying to compile the following piece of code (more
> precisely, this is a significant excerpt of the faulty code).
> which fails with the following error:
>
> File "essai.ml", line 71, characters 5-491:
> The abbreviation specElement expands to type
> < get_ident : int; get_name : string; mytype : specelement;
> recv : string * comm list -> string * string list -> unit;
> send : comm -> string -> unit; set_ident : int -> unit;
> set_name : string -> unit >
> but is used with type < get_ident : int; set_ident : int -> unit; .. >
[...]
>
> What is the problem ???
> It does compile if I comment out send and recv methods of class
> specElement.
> Any help would be really appreciated.
>
This is the same problem as "What does this mean?" thread last week.
The type of "countingObjects" would become
< get_ident : int; get_name : string; mytype : specelement;
recv : string * comm list -> string * string list -> unit;
send : comm -> string -> unit; set_ident : int -> unit;
set_name : string -> unit > countingObjects,
but type comm is defined after countingObjects.
The solution is to move the definition of countingObjects.
-------------------
To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr
Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/
Beginner's list: http://groups.yahoo.com/group/ocaml_beginners
next prev parent reply other threads:[~2002-04-22 10:10 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-04-22 8:43 Frederic Tronel
2002-04-22 10:10 ` Sami Mäkelä [this message]
2002-04-22 21:05 ` John Max Skaller
2002-04-23 7:40 ` Frederic Tronel
2002-04-24 0:36 ` John Max Skaller
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=3CC3E199.F6142F60@utu.fi \
--to=sajuma@utu.fi \
--cc=Frederic.Tronel@inrialpes.fr \
--cc=caml-list@inria.fr \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox