From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.1.3 (2006-06-01) on yquem.inria.fr X-Spam-Level: X-Spam-Status: No, score=0.3 required=5.0 tests=AWL,HTML_MESSAGE autolearn=disabled version=3.1.3 X-Original-To: caml-list@yquem.inria.fr Delivered-To: caml-list@yquem.inria.fr Received: from mail3-relais-sop.national.inria.fr (mail3-relais-sop.national.inria.fr [192.134.164.104]) by yquem.inria.fr (Postfix) with ESMTP id 291C8BB84 for ; Thu, 25 Sep 2008 15:02:11 +0200 (CEST) X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AiwBAKYo20jRVciqk2dsb2JhbACCMC+Cbo0UPgEBAQEJCQoJEQOeY2uHXAEChQI X-IronPort-AV: E=Sophos;i="4.33,308,1220220000"; d="scan'208";a="17340841" Received: from wf-out-1314.google.com ([209.85.200.170]) by mail3-smtp-sop.national.inria.fr with ESMTP; 25 Sep 2008 15:02:09 +0200 Received: by wf-out-1314.google.com with SMTP id 24so506619wfg.15 for ; Thu, 25 Sep 2008 06:02:08 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:to :subject:cc:in-reply-to:mime-version:content-type:references; bh=Pf5+i7eFwaP0LaUOkW3MoTPANb78BFVPQFAQcjefVTo=; b=xfKbJtL62EKdN/08GnucMR/5ifD3mh22CgrQcbcf0BJtkXmsIpGKt50Kd1CAqMTXua YhWIsnGSslyBSUoLSxB8BESeGjzj6+wOvEKwM6QPk+XEgYF6AJLHR745nbrstqLJCiaS 1MA6RK2f/GJb944AXlfUhOIIxQX3NXer7zHIQ= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:cc:in-reply-to:mime-version :content-type:references; b=AlKTsRNJnoINFbnK6wiKYAxRkDeK4hprycgTw2wgiYzkRPlxIKU1lq6fTkh+CJT2cL wsaYViwrYSbig50ZILDIvLqyouglK4pqFUfErRG7Bv1/ihKMvaVSW0L8C4lb8nd5Hydw SFYWNRdABL6AgklKHXgZYMNrkKaeRH/aUmVs8= Received: by 10.142.48.14 with SMTP id v14mr3120534wfv.14.1222347727299; Thu, 25 Sep 2008 06:02:07 -0700 (PDT) Received: by 10.142.90.10 with HTTP; Thu, 25 Sep 2008 06:02:07 -0700 (PDT) Message-ID: Date: Thu, 25 Sep 2008 09:02:07 -0400 From: "Ashish Agarwal" To: "Christian Sternagel" Subject: Re: [Caml-list] Default module type? Cc: caml-list@yquem.inria.fr In-Reply-To: <48DB81D8.1080101@uibk.ac.at> MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_Part_138088_22531747.1222347727309" References: <48DB81D8.1080101@uibk.ac.at> X-Spam: no; 0.00; beginner's:01 ocaml:01 compiler:01 mli:01 mli:01 cheers:01 beginner's:01 ocaml:01 bug:01 compiler:01 cheers:01 bug:01 1975:98 beginners:01 beginners:01 ------=_Part_138088_22531747.1222347727309 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline That is correct. You have to define a module type within an ml file, and then include that. See the following thread on the beginner's list. http://tech.groups.yahoo.com/group/ocaml_beginners/message/8992 However, I never did find out why. Why does the compiler not create a module type MySig from an mli file mySig.mli? This would be very convenient. On Thu, Sep 25, 2008 at 8:19 AM, Christian Sternagel < christian.sternagel@uibk.ac.at> wrote: > Hi there, > > when I have a file m.ml I can use > > include M > > in other *.ml files to include the content of m.ml. However, the same > functionality for module types seems not to exist. I have an interface file > m.mli and want to use > > include M > > within another *.mli file (so that I only have to write the documentation > for module M once, namely in m.mli). But there is no > module type M. Does anyone have the same problem and/or have a solution? > > cheers > > christian sternagel > > _______________________________________________ > Caml-list mailing list. Subscription management: > http://yquem.inria.fr/cgi-bin/mailman/listinfo/caml-list > Archives: http://caml.inria.fr > Beginner's list: http://groups.yahoo.com/group/ocaml_beginners > Bug reports: http://caml.inria.fr/bin/caml-bugs > ------=_Part_138088_22531747.1222347727309 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline
That is correct. You have to define a module type within an ml file, and then include that. See the following thread on the beginner's list.

However, I never did find out why. Why does the compiler not create a module type MySig from an mli file mySig.mli? This would be very convenient.



On Thu, Sep 25, 2008 at 8:19 AM, Christian Sternagel <christian.sternagel@uibk.ac.at> wrote:
Hi there,

when I have a file m.ml I can use

include M

in other *.ml files to include the content of m.ml. However, the same functionality for module types seems not to exist. I have an interface file m.mli and want to use

include M

within another *.mli file (so that I only have to write the documentation for module M once, namely in m.mli). But there is no
module type M. Does anyone have the same problem and/or have a solution?

cheers

christian sternagel

_______________________________________________
Caml-list mailing list. Subscription management:
http://yquem.inria.fr/cgi-bin/mailman/listinfo/caml-list
Archives: http://caml.inria.fr
Beginner's list: http://groups.yahoo.com/group/ocaml_beginners
Bug reports: http://caml.inria.fr/bin/caml-bugs

------=_Part_138088_22531747.1222347727309--