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.0 required=5.0 tests=none autolearn=disabled version=3.1.3 X-Original-To: caml-list@yquem.inria.fr Delivered-To: caml-list@yquem.inria.fr Received: from mail4-relais-sop.national.inria.fr (mail4-relais-sop.national.inria.fr [192.134.164.105]) by yquem.inria.fr (Postfix) with ESMTP id 91C77BC6B for ; Thu, 18 Oct 2007 07:48:40 +0200 (CEST) X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AgAAAG+QFkfUGyodi2dsb2JhbACOTgIBCAQGCQgRBw X-IronPort-AV: E=Sophos;i="4.21,293,1188770400"; d="asc'?vcf'?scan'208";a="18164022" Received: from smtp3-g19.free.fr ([212.27.42.29]) by mail4-smtp-sop.national.inria.fr with ESMTP; 18 Oct 2007 07:48:40 +0200 Received: from smtp3-g19.free.fr (localhost.localdomain [127.0.0.1]) by smtp3-g19.free.fr (Postfix) with ESMTP id C4B4517B541; Thu, 18 Oct 2007 07:48:39 +0200 (CEST) Received: from Tocksi.local (unknown [82.250.163.11]) by smtp3-g19.free.fr (Postfix) with ESMTP id 886CF17B53A; Thu, 18 Oct 2007 07:48:39 +0200 (CEST) Message-ID: <4716F393.8030902@univ-savoie.fr> Date: Thu, 18 Oct 2007 07:48:03 +0200 From: Christophe Raffalli User-Agent: Thunderbird 2.0.0.6 (Macintosh/20070728) MIME-Version: 1.0 To: Julien Moutinho Cc: caml-list@yquem.inria.fr Subject: Re: [Caml-list] How to expose sum type constructors to an interface References: <4716A5F2.9090708@web.de> <20071018004506.GA17963@localhost> In-Reply-To: <20071018004506.GA17963@localhost> X-Enigmail-Version: 0.95.3 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="------------enig634EA41832D27CE42369B3CE" X-Spam: no; 0.00; christophe:01 raffalli:01 christophe:01 raffalli:01 univ-savoie:01 constructors:01 0200,:01 constructors:01 mli:01 mli:01 ocaml:01 cheers:01 chablais:01 73376:01 univ-savoie:01 X-Attachments: cset="UTF-8" cset="utf-8" name="Christophe.Raffalli.vcf" name="Christophe.Raffalli.vcf" type="application/pgp-signature" name="signature.asc" name="signature.asc" This is an OpenPGP/MIME signed message (RFC 2440 and 3156) --------------enig634EA41832D27CE42369B3CE Content-Type: multipart/mixed; boundary="------------000908000409020100010208" This is a multi-part message in MIME format. --------------000908000409020100010208 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Julien Moutinho a =C3=A9crit : > On Thu, Oct 18, 2007 at 02:16:50AM +0200, Felix Dorner wrote: > =20 >> In my implementation file module.ml I define: type aType =3D A | B >> How I now need to expose this Type and its constructors to the interfa= ce =20 >> module.mli, because some of the functions declared in the interface ta= ke a=20 >> parameter of type "aType". How can I do this? >> =20 You may also choose not to have a .mli file at all. This is equivalent to using the result of ocaml -i as mli file. An mli file is needed if you want to make your type abstract or if you want to hide some functions. Cheers, --=20 Christophe Raffalli Universite de Savoie Batiment Le Chablais, bureau 21 73376 Le Bourget-du-Lac Cedex tel: (33) 4 79 75 81 03 fax: (33) 4 79 75 87 42 mail: Christophe.Raffalli@univ-savoie.fr www: http://www.lama.univ-savoie.fr/~RAFFALLI --------------------------------------------- IMPORTANT: this mail is signed using PGP/MIME At least Enigmail/Mozilla, mutt or evolution=20 can check this signature. The public key is stored on www.keyserver.net --------------------------------------------- --------------000908000409020100010208 Content-Type: text/x-vcard; charset=utf-8; name="Christophe.Raffalli.vcf" Content-Transfer-Encoding: base64 Content-Disposition: attachment; filename="Christophe.Raffalli.vcf" YmVnaW46dmNhcmQNCmZuOkNocmlzdG9waGUgUmFmZmFsbGkNCm46UmFmZmFsbGk7Q2hyaXN0 b3BoZQ0Kb3JnOkxBTUEgKFVNUiA1MTI3KQ0KZW1haWw7aW50ZXJuZXQ6Y2hyaXN0b3BoZS5y YWZmYWxsaUB1bml2LXNhdm9pZS5mcg0KdGl0bGU7cXVvdGVkLXByaW50YWJsZTpNYT1DMz1B RXRyZSBkZSBjb25mPUMzPUE5cmVuY2VzDQp0ZWw7d29yazorMzMgNCA3OSA3NSA4MSAwMw0K bm90ZTpodHRwOi8vd3d3LmxhbWEudW5pdi1zYXZvaWUuZnIvfnJhZmZhbGxpDQp4LW1vemls bGEtaHRtbDpUUlVFDQp2ZXJzaW9uOjIuMQ0KZW5kOnZjYXJkDQoNCg== --------------000908000409020100010208-- --------------enig634EA41832D27CE42369B3CE Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.7 (Darwin) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD8DBQFHFvOZi9jr/RgYAS4RAnThAJ0Uj4LM6eJryzkOzNfnPdUYviJQZQCeNz9T DOatCJcpYsssvf1KrdUvpU4= =YG2k -----END PGP SIGNATURE----- --------------enig634EA41832D27CE42369B3CE--