From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: 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 5A60B7F0BA for ; Thu, 9 Feb 2017 11:04:28 +0100 (CET) Authentication-Results: mail3-smtp-sop.national.inria.fr; spf=None smtp.pra=martindemello@gmail.com; spf=Pass smtp.mailfrom=martindemello@gmail.com; spf=None smtp.helo=postmaster@mail-qt0-f171.google.com Received-SPF: None (mail3-smtp-sop.national.inria.fr: no sender authenticity information available from domain of martindemello@gmail.com) identity=pra; client-ip=209.85.216.171; receiver=mail3-smtp-sop.national.inria.fr; envelope-from="martindemello@gmail.com"; x-sender="martindemello@gmail.com"; x-conformance=sidf_compatible Received-SPF: Pass (mail3-smtp-sop.national.inria.fr: domain of martindemello@gmail.com designates 209.85.216.171 as permitted sender) identity=mailfrom; client-ip=209.85.216.171; receiver=mail3-smtp-sop.national.inria.fr; envelope-from="martindemello@gmail.com"; x-sender="martindemello@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-qt0-f171.google.com) identity=helo; client-ip=209.85.216.171; receiver=mail3-smtp-sop.national.inria.fr; envelope-from="martindemello@gmail.com"; x-sender="postmaster@mail-qt0-f171.google.com"; x-conformance=sidf_compatible IronPort-PHdr: =?us-ascii?q?9a23=3AFn5f/x+Q3u9oIv9uRHKM819IXTAuvvDOBiVQ1KB2?= =?us-ascii?q?1u4cTK2v8tzYMVDF4r011RmSDNmdu64P07aempujcFRI2YyGvnEGfc4EfD4+ou?= =?us-ascii?q?JSoTYdBtWYA1bwNv/gYn9yNs1DUFh44yPzahANS47xaFLIv3K98yMZFAnhOgpp?= =?us-ascii?q?POT1HZPZg9iq2+yo9ZDeZwpFiCC+bL59Ixm6sQrcvdQKjIV/Lao81gHHqWZSde?= =?us-ascii?q?RMwmNoK1OTnxLi6cq14Z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bjiSIs57nTAe?= =?us-ascii?q?W7ihUdxp6Rb7mhXzzTVgL/HjwioEqZPuzpAh6ffakxo19CcyF8OBz2CAVUl1mH?= =?us-ascii?q?kJTnk4xvYsj1Z6zwKm2LJkgvoQOdF26vdNVU9uMJfG0+18B933VwbFef+GTV+n?= =?us-ascii?q?RpOtBjRnHYF5+MMHf0soQ4bqtRvExSf/RuJMmg=3D=3D?= X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: =?us-ascii?q?A0BHAwB9PZxYf6vYVdFdFgUBAQEDAQEBC?= =?us-ascii?q?QEBARYBAQEDAQEBCQEBAYNIP4EJB4NSnBGCOoZCjkYqhXgCgnQHQxQBAQEBAQE?= =?us-ascii?q?BAQEBARIBAQkLCwobMUIQAYFgG4IcAQQBIx0BGxILAQMBCwYFBAcaHQICIgERA?= =?us-ascii?q?QUBChIGExKJSQEDDQgOoy4/jAKCAwUBHIMJBYNcChknAwpVgzUBAQEBAQEBAwE?= =?us-ascii?q?BAQEBAQEZAgYShjqEb4UBglmCXwWHMwyJAosvhm2LJYJOjjeRTBQegRUPJ4EfT?= =?us-ascii?q?1EXg3Qqgi4fNYJAhj4BAQE?= X-IPAS-Result: =?us-ascii?q?A0BHAwB9PZxYf6vYVdFdFgUBAQEDAQEBCQEBARYBAQEDAQE?= =?us-ascii?q?BCQEBAYNIP4EJB4NSnBGCOoZCjkYqhXgCgnQHQxQBAQEBAQEBAQEBARIBAQkLC?= =?us-ascii?q?wobMUIQAYFgG4IcAQQBIx0BGxILAQMBCwYFBAcaHQICIgERAQUBChIGExKJSQE?= =?us-ascii?q?DDQgOoy4/jAKCAwUBHIMJBYNcChknAwpVgzUBAQEBAQEBAwEBAQEBAQEZAgYSh?= =?us-ascii?q?jqEb4UBglmCXwWHMwyJAosvhm2LJYJOjjeRTBQegRUPJ4EfT1EXg3Qqgi4fNYJ?= =?us-ascii?q?Ahj4BAQE?= X-IronPort-AV: E=Sophos;i="5.35,349,1484002800"; d="scan'208,217";a="212608327" Received: from mail-qt0-f171.google.com ([209.85.216.171]) by mail3-smtp-sop.national.inria.fr with ESMTP/TLS/AES128-GCM-SHA256; 09 Feb 2017 11:04:27 +0100 Received: by mail-qt0-f171.google.com with SMTP id v23so191821207qtb.0; Thu, 09 Feb 2017 02:04:27 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=3oGvAQAFdeab9LoNIGhx6WeKPLMMhwEdOk2ZIL4oBeA=; b=RQM8a4fawyNDKOmWdLWcOIo7cXXHVla7QezrVv1MOWwo8i8U01U2l+v/VA+WyQ1Edz FHvalpxv0QdJ+BG/lCpnZV5MYHsvVI5Mjcad5RYODePxlo5o8f2OMLIxGxfm8GMsZ5m7 Bu/5Lrnl4eAmcwLW11r+E1g6Wbct9xlUZt67R4JuNE6l0MnMTUpUquEDV96hHVo9wfdP fqSL/U7cAVgfHjotAohFHKWirEJJPZBEbdQDRuRDGaofFZQIvMUzwZCQWghs1iJNqhT0 tPUzQRFmCPu8s2Uq1W+O98AQXPMeDFZZfKqD6glWnlLh6ADbmvkNLSK6JvwkyMY2Zvm6 D/RQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=3oGvAQAFdeab9LoNIGhx6WeKPLMMhwEdOk2ZIL4oBeA=; b=i7gYlPL60d6CL818MIAG3FcXRP9IjdinwHdjby4/TLPVsu5Zoubkf/Wqf1xmlHkK3e zOo9CRZF5EriVhpcg9bCZ/1rvnCnwCLY1JN1fYzTVVvSDlc1/HTHhQPdIbFBwEzQdv/B RCOAdobWWV5zzGwj/a6TOBDpr8JlaIBg3lKrnONbq4i/hKB6lo1crhJsVBCHMf3qhZxk rUTfypzubDS4psLKC0HIBH91cf5GOXRh77ZKFHBGw/tkvBE1QMHfcp5LL/xQYibjftL7 6T7ncE5Zr7gfZuWDdwjVsC7ijvbtsNm1bZx6Rx0JrwKiLw9usrbo5AJOxv+/Ynjgnd1h dG1w== X-Gm-Message-State: AMke39ljUsPR/euexHmilS7RxZx6dhmbGtMk5SdTon75LpgF63EhYkLLfzFrSES7iempywTkM7hpOlAUYgqyxg== X-Received: by 10.200.42.227 with SMTP id c32mr1929987qta.70.1486634666022; Thu, 09 Feb 2017 02:04:26 -0800 (PST) MIME-Version: 1.0 Received: by 10.237.62.246 with HTTP; Thu, 9 Feb 2017 02:04:25 -0800 (PST) In-Reply-To: <589C1079.1040704@inria.fr> References: <589C1079.1040704@inria.fr> From: Martin DeMello Date: Thu, 9 Feb 2017 02:04:25 -0800 Message-ID: To: =?UTF-8?Q?Fran=C3=A7ois_Pottier?= Cc: "caml-list@inria.fr" Content-Type: multipart/alternative; boundary=001a11404b3a2dde850548161bdf Subject: Re: [Caml-list] opening a module within a class definition --001a11404b3a2dde850548161bdf Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Thanks, I'll play with that. martin On Wed, Feb 8, 2017 at 10:47 PM, Fran=C3=A7ois Pottier wrote: > Le 09/02/2017 02:57, Martin DeMello a =C3=A9crit : > >> Is this possible? I couldn't find the right syntax to do it if so. >> > > I don't think so. The best workaround I can think of is to wrap > your class in an "include struct", like this: > > include struct > open My_module > class foo =3D > ... > end > end > > I hope this helps, > > -- > Fran=C3=A7ois Pottier > francois.pottier@inria.fr > http://gallium.inria.fr/~fpottier/ > > -- > Caml-list mailing list. Subscription management and archives: > https://sympa.inria.fr/sympa/arc/caml-list > Beginner's list: http://groups.yahoo.com/group/ocaml_beginners > Bug reports: http://caml.inria.fr/bin/caml-bugs > --001a11404b3a2dde850548161bdf Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
Thanks, I'll play with that.

martin=

On We= d, Feb 8, 2017 at 10:47 PM, Fran=C3=A7ois Pottier <francois.pottie= r@inria.fr> wrote:
Le 09/02/2017 02:57, Martin DeMello a =C3=A9crit :
Is this possible? I couldn't find the right syntax to do it if so.

I don't think so. The best workaround I can think of is to wrap
your class in an "include struct", like this:

include struct
=C2=A0 open My_module
=C2=A0 class foo =3D
=C2=A0 =C2=A0 ...
=C2=A0 end
end

I hope this helps,

--
Fran=C3=A7ois Pottier
francois.pot= tier@inria.fr
http://gallium.inria.fr/~fpottier/=

--
Caml-list mailing list.=C2=A0 Subscription management and archives:
https://sympa.inria.fr/sympa/arc/caml-list
Beginner's list: http://groups.yahoo.com/group/ocaml_beginners
Bug reports: http://caml.inria.fr/bin/caml-bugs

--001a11404b3a2dde850548161bdf--