caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: Christophe Raffalli <Christophe.Raffalli@univ-savoie.fr>
To: Julien Moutinho <julien.moutinho@gmail.com>
Cc: caml-list@yquem.inria.fr
Subject: Re: [Caml-list] How to expose sum type constructors to an interface
Date: Thu, 18 Oct 2007 07:48:03 +0200	[thread overview]
Message-ID: <4716F393.8030902@univ-savoie.fr> (raw)
In-Reply-To: <20071018004506.GA17963@localhost>


[-- Attachment #1.1: Type: text/plain, Size: 1136 bytes --]

Julien Moutinho a écrit :
> On Thu, Oct 18, 2007 at 02:16:50AM +0200, Felix Dorner wrote:
>   
>> In my implementation file module.ml I define: type aType = A | B
>> How I now need to expose this Type and its constructors to the interface  
>> module.mli, because some of the functions declared in the interface take a 
>> parameter of type "aType". How can I do this?
>>     
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,

-- 
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 
can check this signature. The public key is
stored on www.keyserver.net
---------------------------------------------


[-- Attachment #1.2: Christophe.Raffalli.vcf --]
[-- Type: text/x-vcard, Size: 310 bytes --]

begin:vcard
fn:Christophe Raffalli
n:Raffalli;Christophe
org:LAMA (UMR 5127)
email;internet:christophe.raffalli@univ-savoie.fr
title;quoted-printable:Ma=C3=AEtre de conf=C3=A9rences
tel;work:+33 4 79 75 81 03
note:http://www.lama.univ-savoie.fr/~raffalli
x-mozilla-html:TRUE
version:2.1
end:vcard


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 249 bytes --]

      reply	other threads:[~2007-10-18  5:48 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-10-18  0:16 Felix Dorner
2007-10-18  0:41 ` [Caml-list] " Chris King
2007-10-18  0:45 ` Julien Moutinho
2007-10-18  5:48   ` Christophe Raffalli [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4716F393.8030902@univ-savoie.fr \
    --to=christophe.raffalli@univ-savoie.fr \
    --cc=caml-list@yquem.inria.fr \
    --cc=julien.moutinho@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).