From: Wolfgang Lux <lux@heidelbg.ibm.com>
To: caml-list@inria.fr
Subject: Re: Piece composition of signatures (& problems derived from them too!)
Date: Tue, 17 Dec 96 18:49:06 +0100 [thread overview]
Message-ID: <9612171749.AA39644@idse.heidelbg.ibm.com> (raw)
In-Reply-To: (Your message of Tue, 17 Dec 96 12:58:02 PST.) <32B7095A.99A@ing.uc3m.es>
> # module type MIXED =
> sig
> include ORDER
> include TOTAL with type t = t (* THIS IS THE PROBLEM *)
> end;;
>
> module type MIXED =
> sig
> type t
> val <= : t -> t -> bool
> type t = t
> val compare : t -> t -> int
> end
>
> Characters 31-91:
> Signature mismatch:
> Modules do not match:
> sig
> type t = int
> val <= : 'a -> 'a -> bool
> val compare : int -> int -> int
> end
> is not included in
> MIXED
> Type declarations do not match: type t = int is not included in type t =
> t
>
> The problem seems to be that the second "t" hides the first or the type
> equation t = int vanishes.
I suspect neither of your assumptions is correct. The problem is that
your module type MIXED includes two(!) type variables named t (look
carefully at the output of the compiler) while your implementation
only provides one. Probably the compiler should already flag your
definition of MIXED as an error because the name t is defined twice in
the environment. (BTW try to enter the expande of the compiler into the
compiler and it will happily barf on you :-)
Regards
Wolfgang
----
Wolfgang Lux
WZH Heidelberg, IBM Germany Internet: lux@heidelbg.ibm.com
+49-6221-59-4546 VNET: LUX at HEIDELBG
+49-6221-59-3500 (fax) EARN: LUX at DHDIBMIP
prev parent reply other threads:[~1996-12-18 13:40 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
1996-12-17 20:58 Francisco J. Valverde Albacete
1996-12-17 17:49 ` Wolfgang Lux [this message]
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=9612171749.AA39644@idse.heidelbg.ibm.com \
--to=lux@heidelbg.ibm.com \
--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