From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Original-To: caml-list@sympa.inria.fr Delivered-To: caml-list@sympa.inria.fr Received: from mail1-relais-roc.national.inria.fr (mail1-relais-roc.national.inria.fr [192.134.164.82]) by sympa.inria.fr (Postfix) with ESMTPS id 6C9C17ED34 for ; Wed, 18 Jul 2012 09:16:14 +0200 (CEST) Received-SPF: None (mail1-smtp-roc.national.inria.fr: no sender authenticity information available from domain of ivg@ieee.org) identity=pra; client-ip=84.201.187.146; receiver=mail1-smtp-roc.national.inria.fr; envelope-from="lisp-hacker@yandex.ru"; x-sender="ivg@ieee.org"; x-conformance=sidf_compatible Received-SPF: Pass (mail1-smtp-roc.national.inria.fr: domain of lisp-hacker@yandex.ru designates 84.201.187.146 as permitted sender) identity=mailfrom; client-ip=84.201.187.146; receiver=mail1-smtp-roc.national.inria.fr; envelope-from="lisp-hacker@yandex.ru"; x-sender="lisp-hacker@yandex.ru"; x-conformance=sidf_compatible; x-record-type="v=spf1" Received-SPF: None (mail1-smtp-roc.national.inria.fr: no sender authenticity information available from domain of postmaster@forward1h.mail.yandex.net) identity=helo; client-ip=84.201.187.146; receiver=mail1-smtp-roc.national.inria.fr; envelope-from="lisp-hacker@yandex.ru"; x-sender="postmaster@forward1h.mail.yandex.net"; x-conformance=sidf_compatible X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AnsCAHJhBlBUybuSh2dsb2JhbABFigmvISIBAQEIDQkHFieEUgwuh3acMKFKkg8DiEWFJIdUkmw X-IronPort-AV: E=Sophos;i="4.77,606,1336341600"; d="scan'208";a="167272833" Received: from forward1h.mail.yandex.net ([84.201.187.146]) by mail1-smtp-roc.national.inria.fr with ESMTP; 18 Jul 2012 09:16:12 +0200 Received: from web13h.yandex.ru (web13h.yandex.ru [84.201.186.42]) by forward1h.mail.yandex.net (Yandex) with ESMTP id AAFC79E03E2 for ; Wed, 18 Jul 2012 11:16:09 +0400 (MSK) Received: from 127.0.0.1 (localhost.localdomain [127.0.0.1]) by web13h.yandex.ru (Yandex) with ESMTP id 54A7B3D016BC; Wed, 18 Jul 2012 11:16:09 +0400 (MSK) Received: from wimax-client.yota.ru (wimax-client.yota.ru [178.176.46.72]) by web13h.yandex.ru with HTTP; Wed, 18 Jul 2012 11:16:09 +0400 From: Ivan Envelope-From: lisp-hacker@yandex.ru To: "caml-list@inria.fr" MIME-Version: 1.0 Message-Id: <355181342595769@web13h.yandex.ru> Date: Wed, 18 Jul 2012 11:16:09 +0400 X-Mailer: Yamail [ http://yandex.ru ] 5.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain Subject: [Caml-list] parametric modules file layout Hello! I'm creating a functor named Forest that is parametrized by two modules: A - defines operations on assoc pair, and H - defines operations on hierarchical types. So I have three signatures : ASSOC, HIER, FOREST and one module Make. Each signature is rather large and needs to be defined both in mli and ml. I know, that with types the problem of code repetition can be solved by refactoring them in a separate module (a ml file with implicit mli). Is it a valid solution for signatures? Can I put a signature in the sig.ml file and then refer to it with ``Sig.ASSOC?'' Or maybe there're other solutions or common practices to solve such problems? Thanks, in advance.