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=1.1 required=5.0 tests=AWL,SPF_NEUTRAL 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 60F9EBC69 for ; Thu, 18 Oct 2007 02:41:47 +0200 (CEST) X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AgAAAP1IFkdA6aa0i2dsb2JhbACOTQIBCAQEExEF X-IronPort-AV: E=Sophos;i="4.21,291,1188770400"; d="scan'208";a="18158166" Received: from py-out-1112.google.com ([64.233.166.180]) by mail4-smtp-sop.national.inria.fr with ESMTP; 18 Oct 2007 02:41:46 +0200 Received: by py-out-1112.google.com with SMTP id u52so12122pyb for ; Wed, 17 Oct 2007 17:41:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=beta; h=domainkey-signature:received:received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; bh=+V9O0BE7Fpg7uLTCeif2hVGEvKWqem7dgsVwfuwB5xU=; b=GBy7GdnYE43gauJSgnQybWWwxmXlc6hmAx1GrFAfI3Llod7oC4jr5oSv+zJhDYeKpaKkaNWwOY4PMtop9w5ChHXmUkvV5151JU2dVVeP3So+pLcPDAwtxvdHs9Y5e3sR3BznIyqpfZ7UluIXXXCMfMUKivfg6nNSSS9D/PzwnsM= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=CuPv9fj8/nDYt/xAsL12qjubKX5XbbIcUHMp/vXO1dm9IvdCIDeiRryXADDrpkdjdx8IcjSYzqWAS7lOkF24aBc7jdfYRFwZATjO/NojRW4OtCJCKXWybbWxwO6ii9DtfUOahg75ESI2SbGysCHyV/i3Z6sCTCLRY+oCr/UyQBA= Received: by 10.115.14.1 with SMTP id r1mr233097wai.1192668102654; Wed, 17 Oct 2007 17:41:42 -0700 (PDT) Received: by 10.114.235.16 with HTTP; Wed, 17 Oct 2007 17:41:42 -0700 (PDT) Message-ID: <875c7e070710171741k53c0f57due3d84fc3efc33733@mail.gmail.com> Date: Wed, 17 Oct 2007 20:41:42 -0400 From: "Chris King" To: "Felix Dorner" Subject: Re: [Caml-list] How to expose sum type constructors to an interface Cc: caml-list@yquem.inria.fr In-Reply-To: <4716A5F2.9090708@web.de> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline References: <4716A5F2.9090708@web.de> X-Spam: no; 0.00; constructors:01 o'caml:01 ocaml:01 constructors:01 mli:01 mli:01 ocaml:01 beginners:01 beginners:01 wrote:01 caml-list:01 functions:01 define:02 inferred:02 inferred:02 On 10/17/07, Felix Dorner wrote: > although this might really be a beginner=B4 s question I=B4 ll post it he= re > and risk to be eaten by the big fish around here... Well, this small fish is going to nudge you in the direction of the O'Caml beginners list (http://tech.groups.yahoo.com/group/ocaml_beginners/) for future "beginner" questions :) > 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 > interface module.mli, because some of the functions declared in the > interface take a parameter of type "aType". How can I do this? Just add "type aType =3D A | B" to the module.mli file. As a side note, if you ever want to see what the inferred signature (i.e. the signature of a .ml with no .mli) of a module is, run ocaml -i on the .ml file and it will spit the inferred .mli to standard output. HTH, Chris