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 mail3-relais-sop.national.inria.fr (mail3-relais-sop.national.inria.fr [192.134.164.104]) by sympa.inria.fr (Postfix) with ESMTPS id A49958239C for ; Thu, 23 Nov 2017 13:52:28 +0100 (CET) Authentication-Results: mail3-smtp-sop.national.inria.fr; spf=None smtp.pra=ssp.mryau@gmail.com; spf=Pass smtp.mailfrom=ssp.mryau@gmail.com; spf=None smtp.helo=postmaster@mail-qk0-f173.google.com Received-SPF: None (mail3-smtp-sop.national.inria.fr: no sender authenticity information available from domain of ssp.mryau@gmail.com) identity=pra; client-ip=209.85.220.173; receiver=mail3-smtp-sop.national.inria.fr; envelope-from="ssp.mryau@gmail.com"; x-sender="ssp.mryau@gmail.com"; x-conformance=sidf_compatible Received-SPF: Pass (mail3-smtp-sop.national.inria.fr: domain of ssp.mryau@gmail.com designates 209.85.220.173 as permitted sender) identity=mailfrom; client-ip=209.85.220.173; receiver=mail3-smtp-sop.national.inria.fr; envelope-from="ssp.mryau@gmail.com"; x-sender="ssp.mryau@gmail.com"; x-conformance=sidf_compatible; x-record-type="v=spf1" Received-SPF: None (mail3-smtp-sop.national.inria.fr: no sender authenticity information available from domain of postmaster@mail-qk0-f173.google.com) identity=helo; client-ip=209.85.220.173; receiver=mail3-smtp-sop.national.inria.fr; envelope-from="ssp.mryau@gmail.com"; x-sender="postmaster@mail-qk0-f173.google.com"; x-conformance=sidf_compatible IronPort-PHdr: =?us-ascii?q?9a23=3A4RG4eRCtVd+masgaUpDvUyQJP3N1i/DPJgcQr6Af?= =?us-ascii?q?oPdwSP3+ocbcNUDSrc9gkEXOFd2Crakb26yL6+jJYi8p39WoiDg6aptCVhsI24?= =?us-ascii?q?09vjcLJ4q7M3D9N+PgdCcgHc5PBxdP9nC/NlVJSo6lPwWB6i760TlHERz6MU9x?= =?us-ascii?q?J//pMo/UlcW+ke6oqLPJZAAdvzenbr46FxSorgLP/p0NmpMkL7wgwwbhrX5Beu?= =?us-ascii?q?AQzmRtcwHA1y3g79u9qcYwux9bvOgsopZN?= X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: =?us-ascii?q?A0BrAwAuxBZahq3cVdFcHQEBHQEGAYR9J?= =?us-ascii?q?weDeIE2l39EAQEGiwePJwoFigYHQxQBAQEBAQEBAQEBEgEBAQgLCwgoL4I4IoI?= =?us-ascii?q?8MwQZARseAxIDBQEHNwIkAREBBQEWiigBAwgNiwGNVoNFQIwQgW0YBQEcgwoFg?= =?us-ascii?q?1sKGScNWIMRAgYSgyiCB4EOi0OCSYJjBYo+hziBE489lQyEEo88liYUBR+BFja?= =?us-ascii?q?BcjIaI4EAgXeCYoF6OjaLZwEBAQ?= X-IPAS-Result: =?us-ascii?q?A0BrAwAuxBZahq3cVdFcHQEBHQEGAYR9JweDeIE2l39EAQE?= =?us-ascii?q?GiwePJwoFigYHQxQBAQEBAQEBAQEBEgEBAQgLCwgoL4I4IoI8MwQZARseAxIDB?= =?us-ascii?q?QEHNwIkAREBBQEWiigBAwgNiwGNVoNFQIwQgW0YBQEcgwoFg1sKGScNWIMRAgY?= =?us-ascii?q?SgyiCB4EOi0OCSYJjBYo+hziBE489lQyEEo88liYUBR+BFjaBcjIaI4EAgXeCY?= =?us-ascii?q?oF6OjaLZwEBAQ?= X-IronPort-AV: E=Sophos;i="5.44,441,1505772000"; d="scan'208,217";a="245759955" Received: from mail-qk0-f173.google.com ([209.85.220.173]) by mail3-smtp-sop.national.inria.fr with ESMTP/TLS/AES128-GCM-SHA256; 23 Nov 2017 13:52:06 +0100 Received: by mail-qk0-f173.google.com with SMTP id c123so10441514qkf.7 for ; Thu, 23 Nov 2017 04:52:06 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:from:date:message-id:subject:to; bh=wJno5+DkTj8DeJaj/ZF+7gRQsmCSi5QeX/MW5YrsAuc=; b=nj6pidxDFiu5/rhWa2SfdPEmE/HvyfBQudGvqZGOtgaY6mYlg4xbrzm1CHPbdOrr85 L/QocNeYLZWZ/keaPl6A106EEcxzGZ+tt09YSsunPohGRY9PWznf/gD/4DZP9LDnAhTz h5GUrFhSFVfn8rtg3jKrKmcUVHAp5FjRFsNaTp46pEMIJu9B6A+ThiWIMjP6ijANixvl GIPl2UBfUzIDg0+pteIFw3w2HuXndd/tdDcSAbKrX1rAxmwz0+dQgaD2L5Iq5rnhk3kG UrmZyU7qC0LbhPOxAp37PwyUT/KPZvPyJ01wxHFaZtA6Oi4BxjQcRoXKBA1Afa2Rk23Z 8l0w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:from:date:message-id:subject:to; bh=wJno5+DkTj8DeJaj/ZF+7gRQsmCSi5QeX/MW5YrsAuc=; b=OK9eVzObJIkKnMF3uoi3+t46GkdduevxLCBqkUNsLPj3B91E5lPrSsEnbZtZu84My/ /3BYWLbdJzFI7EByx2WWjAlnuj1e/SGfy/xh4RxCGgR4NpyQba2MO2cqwWDa3fxQXwQO wWTJSJtIna9Bti9uCN0o7Yp75Bg8Hzik8UgjBSObx9oK7RPtmG4iB+8JybUFxWU12qMC R/F+1CTJzaxXYC5sFBSOC1d7uZqpJhv6rxSgQT7zJE8ko/Hlx3V8xZAins03a/ICH196 Z4hJRgBFsEPLameJjpMJORlLv9KhmXLx1AwsgeWuAdSSPsVj1Ch8wNyNMLEN2c+CWnzB veJQ== X-Gm-Message-State: AJaThX5RyPOTj+uBOEGx5KolbS1eZv/4lzIRS7YAHxoEYh0B8eXnvfjB QCsO5I0szkjdNUYa8N68eBfTXOt7W7col3o4Y22DbA== X-Google-Smtp-Source: AGs4zMY+tsfT7JEJdqr9iWFRy/UNtvblBz2HYUxkO4Y2rxjRuyfp/PFeyLGNmnBxpLogyNUb8UMDrIyLSuktBvU4PjY= X-Received: by 10.55.167.139 with SMTP id q133mr14028371qke.328.1511441524379; Thu, 23 Nov 2017 04:52:04 -0800 (PST) MIME-Version: 1.0 Received: by 10.140.40.209 with HTTP; Thu, 23 Nov 2017 04:52:04 -0800 (PST) From: Serge Sivkov Date: Thu, 23 Nov 2017 17:52:04 +0500 Message-ID: To: caml-list@inria.fr Content-Type: multipart/alternative; boundary="94eb2c06b93028d3f0055ea5e756" Subject: [Caml-list] module and it's types as function parameters --94eb2c06b93028d3f0055ea5e756 Content-Type: text/plain; charset="UTF-8" Hello, is there way to define module with similar interface: module R = struct type topicf = (module F : I) -> F.message -> F.message and topic = { func: topicf; name: string } ... end it is possible in case I want to define function with similar signature I can declare used types by: let test (type message') (module M : I with type message = message') (v: message') : message' = ... But how should I create such type in module? WBR, ssp --94eb2c06b93028d3f0055ea5e756 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Hello,

is there way to define modul= e with similar interface:

module R =3D struct
=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0 type topicf =3D (module F : I) -> F.message -&g= t; F.message
=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 and topic =3D { = func: topicf; name: string }
=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0 ...
end

it is possible in case I want to define= function with similar signature I can declare used types by:
let t= est (type message') (module M : I with type message =3D message') (= v: message') : message' =3D ...

But how should I = create such type in module?

WBR, ssp
--94eb2c06b93028d3f0055ea5e756--