From mboxrd@z Thu Jan 1 00:00:00 1970 Received: (from majordomo@localhost) by pauillac.inria.fr (8.7.6/8.7.3) id PAA06774; Tue, 17 Jun 2003 15:28:00 +0200 (MET DST) X-Authentication-Warning: pauillac.inria.fr: majordomo set sender to owner-caml-list@pauillac.inria.fr using -f Received: from concorde.inria.fr (concorde.inria.fr [192.93.2.39]) by pauillac.inria.fr (8.7.6/8.7.3) with ESMTP id PAA02617 for ; Tue, 17 Jun 2003 15:27:58 +0200 (MET DST) Received: from axiom.anu.edu.au (axiom.anu.edu.au [150.203.127.200]) by concorde.inria.fr (8.11.1/8.11.1) with ESMTP id h5HDRvH06882 for ; Tue, 17 Jun 2003 15:27:57 +0200 (MET DST) Received: from pulp.anu.edu.au (pulp.anu.edu.au [150.203.126.25]) by axiom.anu.edu.au (8.11.2/8.11.2/SuSE Linux 8.11.1-0.5) with ESMTP id h5HDRsG26882 (using TLSv1/SSLv3 with cipher EDH-RSA-DES-CBC3-SHA (168 bits) verified NO) for ; Tue, 17 Jun 2003 23:27:54 +1000 Received: from pulp.anu.edu.au (localhost [127.0.0.1]) by pulp.anu.edu.au (8.12.9/8.12.9/Debian-3) with ESMTP id h5HDRrB6020893 for ; Tue, 17 Jun 2003 23:27:53 +1000 Received: (from abate@localhost) by pulp.anu.edu.au (8.12.9/8.12.9/Debian-3) id h5HDRrHB020890 for caml-list@inria.fr; Tue, 17 Jun 2003 23:27:53 +1000 Date: Tue, 17 Jun 2003 23:27:53 +1000 From: Pietro Abate To: caml-list@inria.fr Subject: [Caml-list] signature mismatch Message-ID: <20030617132753.GA20764@anu.edu.au> Mail-Followup-To: Pietro Abate , caml-list@inria.fr Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline X-Operating-System: GNU/Linux X-Organization: Research School of Information Science and Engineering (Australian National University) User-Agent: Mutt/1.5.4i X-Spam: no; 0.00; pietro:01 abate:01 mismatch:01 val:01 enforced:01 functor:01 struct:01 bool:01 sig:01 int:01 match:02 compile:02 modules:02 module:03 let:04 Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk Hi all, I get this error trying to compile the file below: File "pp.ml", line 28, characters 22-24: Signature mismatch: Modules do not match: sig type t = BB.t val toast : t -> t -> bool end is not included in sig type t = AA.t val toast : t -> t -> bool end Type declarations do not match: type t = BB.t is not included in type t = AA.t how can I force BB.t to be the same as AA.t ? why it's not enforced by the functor declaration (with type...) ? tnx, p file : ----------------- module type A1 = sig type t val test : t -> t -> bool end module type A2 = sig type t val toast : t -> t -> bool end module Make (A : A1 ) (B : A2 with type t = A.t) = struct let fifi a b c = if c > 1 then A.test a b else B.toast b a end module AA : A1 = struct type t = int let test f1 f2 = true end module BB : A2 = struct type t = int let toast f1 f2 = false end module C = Make (AA) (BB) --------------------- -- Civilization advances by extending the number of important operations which we can perform without thinking. (Alfred North Whitehead) ------------------- 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