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 mail1-relais-roc.national.inria.fr (mail1-relais-roc.national.inria.fr [192.134.164.82]) by yquem.inria.fr (Postfix) with ESMTP id 8C72DBC69 for ; Thu, 18 Oct 2007 02:16:53 +0200 (CEST) X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AgAAANpCFkfZSMDji2dsb2JhbACBWoxzAgEIBAYPGg X-IronPort-AV: E=Sophos;i="4.21,291,1188770400"; d="scan'208";a="3133731" Received: from fmmailgate02.web.de ([217.72.192.227]) by mail1-smtp-roc.national.inria.fr with ESMTP; 18 Oct 2007 02:16:53 +0200 Received: from smtp08.web.de (fmsmtp08.dlan.cinetic.de [172.20.5.216]) by fmmailgate02.web.de (Postfix) with ESMTP id DC6C1A5B99C6 for ; Thu, 18 Oct 2007 02:16:52 +0200 (CEST) Received: from [87.216.180.188] (helo=[192.168.1.130]) by smtp08.web.de with asmtp (TLSv1:AES256-SHA:256) (WEB.DE 4.108 #197) id 1IiJ4G-0000Kw-00 for caml-list@yquem.inria.fr; Thu, 18 Oct 2007 02:16:52 +0200 Message-ID: <4716A5F2.9090708@web.de> Date: Thu, 18 Oct 2007 02:16:50 +0200 From: Felix Dorner User-Agent: Thunderbird 1.5.0.12 (X11/20070604) MIME-Version: 1.0 To: caml-list@yquem.inria.fr Subject: How to expose sum type constructors to an interface Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 8bit Sender: felix_do@web.de X-Sender: felix_do@web.de X-Provags-ID: V01U2FsdGVkX1+0pehFQzjzrM9p5Jo11CJQRLTAeTjPigRZyswV u89rZyqw+3c2SW73kTemPr9iRu0+ArZt69vexPUNGw4FMGJqa8 aFZO6sRm4= X-Spam: no; 0.00; constructors:01 ocaml:01 constructors:01 mli:01 lesson:98 functions:01 interfaces:01 define:02 modules:02 parameter:02 module:03 module:03 expose:04 expose:04 interface:06 Hi, although this might really be a beginner´ s question I´ ll post it here and risk to be eaten by the big fish around here... I am starting to learn ocaml and tonight´ s lesson is how to handle modules/interfaces. I come up with this: 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? Thanks for any help, Felix