From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Original-To: caml-list@yquem.inria.fr Delivered-To: caml-list@yquem.inria.fr Received: from concorde.inria.fr (concorde.inria.fr [192.93.2.39]) by yquem.inria.fr (Postfix) with ESMTP id 25F99BBBB for ; Mon, 27 Feb 2006 16:04:56 +0100 (CET) Received: from ext.lri.fr (ext.lri.fr [129.175.15.4]) by concorde.inria.fr (8.13.0/8.13.0) with ESMTP id k1RF4tea006788 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for ; Mon, 27 Feb 2006 16:04:55 +0100 Received: from smtp.lri.fr (serveur3-5 [129.175.3.5]) by ext.lri.fr (Postfix) with ESMTP id 4871A2024B0; Mon, 27 Feb 2006 16:04:55 +0100 (CET) Received: from pc9-159 (pc9-159 [129.175.9.159]) by smtp.lri.fr (Postfix) with ESMTP id 42031CED98; Mon, 27 Feb 2006 16:04:54 +0100 (CET) Date: Mon, 27 Feb 2006 16:04:53 +0100 (CET) From: Julien Signoles X-X-Sender: signoles@pc9-159 To: Merijn de Jonge Cc: caml-list@yquem.inria.fr Subject: Re: [Caml-list] Writing Identity Functors (or Wrapper modules) in OCAML In-Reply-To: Message-ID: References: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Virus-Scanned: by amavisd-new at lri.fr X-Miltered: at concorde with ID 44031517.000 by Joe's j-chkmail (http://j-chkmail.ensmp.fr)! X-Spam: no; 0.00; signoles:01 signoles:01 lri:01 caml-list:01 functors:01 ocaml:01 sig:01 val:01 struct:01 explicitely:01 struct:01 lri:01 define:01 modules:01 unit:03 X-Spam-Checker-Version: SpamAssassin 3.0.3 (2005-04-27) on yquem.inria.fr X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=none autolearn=disabled version=3.0.3 > > module type IHelloWorld = > sig > type helloWorldType = Hello | World > val hello : unit -> helloWorldType > end > > module Wrapper (X: IHelloWorld) : IHelloWorld = > struct > type helloWorldType = X.helloWorldType > let hello = X.hello > end You have to explicitely define Hello and World in the wrapper. Try this : module Wrapper(X:IHelloWorld): IHelloWorld = struct type helloWorldType = X.helloWorldType = Hello | Word let hello = X.hello end Hope this helps, Julien Signoles -- mailto:Julien.Signoles@lri.fr ; http://www.lri.fr/~signoles "In theory, practice and theory are the same, but in practice they are different" (Larry McVoy)