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 C52827EE09 for ; Fri, 26 Oct 2012 20:04: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.160.182; 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.160.182 as permitted sender) identity=mailfrom; client-ip=209.85.160.182; 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-gh0-f182.google.com) identity=helo; client-ip=209.85.160.182; receiver=mail4-smtp-sop.national.inria.fr; envelope-from="j.romildo@gmail.com"; x-sender="postmaster@mail-gh0-f182.google.com"; x-conformance=sidf_compatible X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AmgCAEjPilDRVaC2k2dsb2JhbABEhVG8aQgjAQEBAQkJCwkUBCOCHgEBAQQSAh4BDQEbHQEDDAYFDgouFA8JCAEFASI1h1EBAw8CnVBiCQOMMIJ2hHsKGScNWYh1AQUMi2WGDWEDlXKOXj+EKQ X-IronPort-AV: E=Sophos;i="4.80,654,1344204000"; d="scan'208";a="160547533" Received: from mail-gh0-f182.google.com ([209.85.160.182]) by mail4-smtp-sop.national.inria.fr with ESMTP/TLS/RC4-SHA; 26 Oct 2012 20:04:28 +0200 Received: by mail-gh0-f182.google.com with SMTP id r20so713844ghr.27 for ; Fri, 26 Oct 2012 11:04: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=d54Hbe3MviLmRNnAir05Qq/6CUGQwODXSj1ZzIzinak=; b=QpMV+s1yJHVKLc0sqcjxZRKqTVXsdOmOQn3h/4B9shGv4ify9iGRNYHqzcv3jtM5hc 2SF4MYVXS/CKCOnKjJOQ5Hw+Xjf9P9xe3VTLrTGoQEwiDsVyNOV4j7XDoib5NnrA8y+w gXjzqwJz+zBLiZLaRjmpaS9FLQy95VGFVYXPMNmVZ6NsV0BUSMyIIgiUmehkenqUyTXK 6cAMqKT4LRBNsqHN+Rx40NB1xeJ6qYk57eth4pxlMHB1nd5envxVkuJokoQG2OSLz0mO AFNBba8M2ZMVCbwTKqvUavKTr/1DDMi7M7JhABK3CyjrJr4Lh/qnBdiT4bULhMShzmSc WZkg== Received: by 10.236.148.70 with SMTP id u46mr23669604yhj.30.1351274667761; Fri, 26 Oct 2012 11:04:27 -0700 (PDT) Received: from romildo.localdomain ([200.239.128.55]) by mx.google.com with ESMTPS id n13sm1912762ano.20.2012.10.26.11.04.25 (version=TLSv1/SSLv3 cipher=OTHER); Fri, 26 Oct 2012 11:04:27 -0700 (PDT) Received: by romildo.localdomain (Postfix, from userid 1000) id 5037F1F3B9C; Fri, 26 Oct 2012 15:56:21 -0200 (BRST) Date: Fri, 26 Oct 2012 15:56:21 -0200 From: =?iso-8859-1?Q?Jos=E9?= Romildo Malaquias To: Edgar Friendly Cc: caml-list@inria.fr Message-ID: <20121026175621.GC20358@romildo.no-ip.org> Mail-Followup-To: Edgar Friendly , caml-list@inria.fr References: <20121026112602.GA2781@romildo.no-ip.org> <508AA2AB.5040401@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <508AA2AB.5040401@gmail.com> User-Agent: Mutt/1.5.21 (2010-09-15) Subject: Re: [Caml-list] Importing specific names On Fri, Oct 26, 2012 at 10:48:11AM -0400, Edgar Friendly wrote: > On 10/26/2012 7:26 AM, José Romildo Malaquias wrote: > > 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? > > > > Romildo > > > If I want to import only a few values from a module, I often use > something like this: > > let (a,b,c) = Module.(a,b,c) What about importing algebraic types with its constructors or record types with its field names, without repeating the type definition? Would that be possible? For instance, I want to import the record type type position = { pos_fname :string; pos_lnum :int; pos_bol :int; pos_cnum :int; } from the Lexing module. Romildo