From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Original-To: caml-list@sympa.inria.fr Delivered-To: caml-list@sympa.inria.fr Received: from mail4-relais-sop.national.inria.fr (mail4-relais-sop.national.inria.fr [192.134.164.105]) by sympa.inria.fr (Postfix) with ESMTPS id 409447EE09 for ; Fri, 26 Oct 2012 19:59:29 +0200 (CEST) Received-SPF: None (mail4-smtp-sop.national.inria.fr: no sender authenticity information available from domain of j.romildo@gmail.com) identity=pra; client-ip=209.85.213.54; receiver=mail4-smtp-sop.national.inria.fr; envelope-from="j.romildo@gmail.com"; x-sender="j.romildo@gmail.com"; x-conformance=sidf_compatible Received-SPF: Pass (mail4-smtp-sop.national.inria.fr: domain of j.romildo@gmail.com designates 209.85.213.54 as permitted sender) identity=mailfrom; client-ip=209.85.213.54; receiver=mail4-smtp-sop.national.inria.fr; envelope-from="j.romildo@gmail.com"; x-sender="j.romildo@gmail.com"; x-conformance=sidf_compatible; x-record-type="v=spf1" Received-SPF: None (mail4-smtp-sop.national.inria.fr: no sender authenticity information available from domain of postmaster@mail-yh0-f54.google.com) identity=helo; client-ip=209.85.213.54; receiver=mail4-smtp-sop.national.inria.fr; envelope-from="j.romildo@gmail.com"; x-sender="postmaster@mail-yh0-f54.google.com"; x-conformance=sidf_compatible X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AmgCAOPNilDRVdU2k2dsb2JhbABEhVG8aQgjAQEBAQkJCwkUBCOCHgEBAQQSAhMLAQ0BGx0BAwwGBRguFA8JCAEFASI1h1EBAw8CnVhiCQOMMIJ2hHsKGScNWYh1AQUMi2WGDWEDlXKOXj+EKQ X-IronPort-AV: E=Sophos;i="4.80,654,1344204000"; d="scan'208";a="160547189" Received: from mail-yh0-f54.google.com ([209.85.213.54]) by mail4-smtp-sop.national.inria.fr with ESMTP/TLS/RC4-SHA; 26 Oct 2012 19:59:28 +0200 Received: by mail-yh0-f54.google.com with SMTP id s35so702158yhf.27 for ; Fri, 26 Oct 2012 10:59:27 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=date:from:to:cc:subject:message-id:mail-followup-to:references :mime-version:content-type:content-disposition :content-transfer-encoding:in-reply-to:user-agent; bh=6BDrAn0NbYdIADxf4OQvFCv4XMoG5dPfbk9aXssalOw=; b=BPcrOaP9uIW8V6KBMFhfQaSkiAQ98TMFJqkYWiTMcGf3V5HbvqJHooem5BNOHgVBY9 PDypWqWsZOZEswhcEhGs/udHaosHaBaLFupWtqKW54TX4/xrsEKmecO6xcNOZfNu5k/0 zHdJ6q52fv5bpq0BuMDZ8pYdQany+0JjzhE+RN3hoqqpXJO59lePXCC6raHwA4MsP92/ yHytJAdnP4cmjWak6ZmBqJAKkSmabB2QYGsKcAe+a9eCE0jECsyVnCZeJBUb53YgVGGa 1qHT6ZV6IxsZWxjXBbEXUCiWGxf0cBp/J/5vnG+rFsOjxc9s3XcS1BCldmPQypZsbVIg UtqA== Received: by 10.236.92.172 with SMTP id j32mr22952192yhf.37.1351274367343; Fri, 26 Oct 2012 10:59:27 -0700 (PDT) Received: from romildo.localdomain ([200.239.128.55]) by mx.google.com with ESMTPS id o66sm2065615yhi.19.2012.10.26.10.59.25 (version=TLSv1/SSLv3 cipher=OTHER); Fri, 26 Oct 2012 10:59:26 -0700 (PDT) Received: by romildo.localdomain (Postfix, from userid 1000) id EC0051F3B95; Fri, 26 Oct 2012 15:51:03 -0200 (BRST) Date: Fri, 26 Oct 2012 15:51:03 -0200 From: =?iso-8859-1?Q?Jos=E9?= Romildo Malaquias To: Matthieu Dubuget Cc: caml-list@inria.fr Message-ID: <20121026175103.GB20358@romildo.no-ip.org> Mail-Followup-To: Matthieu Dubuget , caml-list@inria.fr References: <20121026112602.GA2781@romildo.no-ip.org> <508A965F.3000205@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <508A965F.3000205@gmail.com> User-Agent: Mutt/1.5.21 (2010-09-15) Subject: Re: [Caml-list] Importing specific names On Fri, Oct 26, 2012 at 03:55:43PM +0200, Matthieu Dubuget wrote: > Le 26/10/2012 13:26, José Romildo Malaquias a écrit : > > Hello. > > > > It seems that the expression ocaml "open module-path" exposes all names > > exported by module-path. > > > > Is there any way of exposing only a restrict set of names from a > > module-path, instead of all names? > > Is this what you are looking for? > > # module type RS = sig > val length : string -> int > end;; > module type RS = sig val length : string -> int end > # module ReducedString:RS = String;; > module ReducedString : RS > # ReducedString.length "coco";; > - : int = 4 > # ReducedString.uppercase "coco";; > Error: Unbound value ReducedString.uppercase This has the disadvantage to explicitly include the type signature of values, and probably the type definition of types. There sould be easier ways, where only the relevant names would have to be mentioned. Romildo