From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail3-relais-sop.national.inria.fr (mail3-relais-sop.national.inria.fr [192.134.164.104]) by sympa.inria.fr (Postfix) with ESMTPS id 3085A8239C for ; Sun, 11 Mar 2018 20:17:38 +0100 (CET) Authentication-Results: mail3-smtp-sop.national.inria.fr; spf=None smtp.pra=nicolas.ojeda.bar@lexifi.com; spf=SoftFail smtp.mailfrom=nicolas.ojeda.bar@lexifi.com; spf=None smtp.helo=postmaster@vrout30.yaziba.net Received-SPF: None (mail3-smtp-sop.national.inria.fr: no sender authenticity information available from domain of nicolas.ojeda.bar@lexifi.com) identity=pra; client-ip=185.56.204.33; receiver=mail3-smtp-sop.national.inria.fr; envelope-from="nicolas.ojeda.bar@lexifi.com"; x-sender="nicolas.ojeda.bar@lexifi.com"; x-conformance=sidf_compatible Received-SPF: SoftFail (mail3-smtp-sop.national.inria.fr: domain of nicolas.ojeda.bar@lexifi.com is inclined to not designate 185.56.204.33 as permitted sender) identity=mailfrom; client-ip=185.56.204.33; receiver=mail3-smtp-sop.national.inria.fr; envelope-from="nicolas.ojeda.bar@lexifi.com"; x-sender="nicolas.ojeda.bar@lexifi.com"; x-conformance=sidf_compatible; x-record-type="v=spf1" Received-SPF: None (mail3-smtp-sop.national.inria.fr: no sender authenticity information available from domain of postmaster@vrout30.yaziba.net) identity=helo; client-ip=185.56.204.33; receiver=mail3-smtp-sop.national.inria.fr; envelope-from="nicolas.ojeda.bar@lexifi.com"; x-sender="postmaster@vrout30.yaziba.net"; x-conformance=sidf_compatible IronPort-PHdr: =?us-ascii?q?9a23=3AVPJypxVfYSlOAvkw11pEVyRlpY3V8LGtZVwlr6E/?= =?us-ascii?q?grcLSJyIuqrYbBGFt8tkgFKBZ4jH8fUM07OQ7/i7HzRYqb+681k6OKRWUBEEjc?= =?us-ascii?q?hE1ycBO+WiTXPBEfjxciYhF95DXlI2t1uyMExSBdqsLwaK+i764jEdAAjwOhRo?= =?us-ascii?q?LerpBIHSk9631+ev8JHPfglEnjWwba98IRmssQndqtQdjJd/JKo21hbHuGZDdf?= =?us-ascii?q?5MxWNvK1KTnhL86dm18ZV+7SleuO8v+tBZX6nicKs2UbJXDDI9M2Ao/8LrrgXM?= =?us-ascii?q?TRGO5nQHTGoblAdDDhXf4xH7WpfxtTb6tvZ41SKHM8D6Uaw4VDK/5KpwVhTmlD?= =?us-ascii?q?kIOCI48GHPi8x/kqRboA66pxdix4LYeZyZOOZicq/Ye94RWGhPUdtLVyFZAIy8?= =?us-ascii?q?YYsBAeQCM+hFsYfyu1QAoACiBQm1Hu7j1iNEimP00KA8zu8vERvG3AslH98WqH?= =?us-ascii?q?rUrcn6NKAWUee316nH1SzNb/FI1jjg8ofHag0spvSWXbltdsfRz0gvGB/CjlWU?= =?us-ascii?q?s4PlJCmZ1uMPs2eF8uVvT/ijhHU9pAFruTWvwtkji4bIhoIby1DI7zl2wIEwJd?= =?us-ascii?q?ChTkNwfN2qEINIui2HNIZ7QtkuTmFptSog1LEKpZG2cDIExZkp3xLSafOKf5KV?= =?us-ascii?q?7h79VOudOzR1iGx/dL6ihRu+706twfDmWMauylZFtC9Fn8HMtn8T0xzT7dCKSu?= =?us-ascii?q?Vn/kemxDaPyw7e5v1eLUE0j6XaKp8hzaUqmZYJt0TMADP2lF33jK+QaEok5vCl?= =?us-ascii?q?5/nkb7jmvJORN455hhvgPqgylcGzG+o1PwYWU2ie4+u81bnj/UPjQLVNi/07iq?= =?us-ascii?q?/ZsJHGKsQcoq62GRRV3pwk6xa9ETipzc4XkWMcI11fYhKKlIzpNE/BIfD5A/e/?= =?us-ascii?q?gk6gnytsx/DDJrHhGInCLmDfkLf9erZw81JTxxA2zdBb/p5UDrABIOnvWkLqr9?= =?us-ascii?q?zZDho5MxSuzOr9CdV90JkeWWOVDaODPqPSq0eE5ucoI+aReoAYoC39K/055/72?= =?us-ascii?q?in85hEMdLuGV2s4yYWy1HLxFJLccYjK4h94AFU8PtxYzTqnpj0aDUnhVamrkDI?= =?us-ascii?q?wm4TRuLoOtCoNKXbeKgrGN1RCRkoceMmZHAVeIGGyucIeJV/5KYiuICstsgj0K?= =?us-ascii?q?VP6qTIp3hkLmjxPz17cydrmcwSYfr5+2kYEtv7SCxyF3ziR9CoGm60/ISmh1mm?= =?us-ascii?q?0SQDpvhvJ7rFx8xFbF2q990acBSY5joshRWwJ/DqbyivRgAomoCAbMbtaHSRCt?= =?us-ascii?q?RdD0WWhsHOJ0+McHZgNGI/vnjh3H2HDyUaEPkKGXX8Ry46vO3nL4YcBw1ySe2Q?= =?us-ascii?q?=3D=3D?= X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: =?us-ascii?q?A0BGAADyf6VahyHMOLldGgEBAQEBAgEBA?= =?us-ascii?q?QEIAQEBAYUlKAqDRoofjXCCBBOBA5QyghUKhSUCgwoHGQwFKxgBAgEBAQEBAQE?= =?us-ascii?q?BARIBAQEKCwkIKC6COCQBgkcBBSNJCgMQCQILDQICJgICIhIBBQEcBhOFGAQBj?= =?us-ascii?q?DaRG0CMEoImiDQmghqBDYQogi6GaoUBAQEegwiCYgSIIpI0CYlThxCDIYtAkTk?= =?us-ascii?q?PAyCBBwIeggpwTzEGggyCQoIGdolZgjoBAQE?= X-IPAS-Result: =?us-ascii?q?A0BGAADyf6VahyHMOLldGgEBAQEBAgEBAQEIAQEBAYUlKAq?= =?us-ascii?q?DRoofjXCCBBOBA5QyghUKhSUCgwoHGQwFKxgBAgEBAQEBAQEBARIBAQEKCwkIK?= =?us-ascii?q?C6COCQBgkcBBSNJCgMQCQILDQICJgICIhIBBQEcBhOFGAQBjDaRG0CMEoImiDQ?= =?us-ascii?q?mghqBDYQogi6GaoUBAQEegwiCYgSIIpI0CYlThxCDIYtAkTkPAyCBBwIeggpwT?= =?us-ascii?q?zEGggyCQoIGdolZgjoBAQE?= X-IronPort-AV: E=Sophos;i="5.47,457,1515452400"; d="scan'208";a="257784995" Received: from vrout30.yaziba.net ([185.56.204.33]) by mail3-smtp-sop.national.inria.fr with ESMTP/TLS/DHE-RSA-AES256-SHA; 11 Mar 2018 20:17:37 +0100 Received: from mtaout20.int.yaziba.net (mtaout20.int.yaziba.net [10.4.20.37]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by vrout30.yaziba.net (mx10.yaziba.net) with ESMTPS id 52C4051F90 for ; Sun, 11 Mar 2018 20:17:36 +0100 (CET) Received: from localhost (localhost [127.0.0.1]) by mtaout20.int.yaziba.net (Postfix) with ESMTP id 42242160337 for ; Sun, 11 Mar 2018 20:17:36 +0100 (CET) X-Virus-Scanned: amavisd-new at mtaout20.int.yaziba.net Received: from mtaout20.int.yaziba.net ([127.0.0.1]) by localhost (mtaout20.int.yaziba.net [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id 5naClqfBNVtE for ; Sun, 11 Mar 2018 20:17:36 +0100 (CET) Received: from mail-ot0-f172.google.com (mail-ot0-f172.google.com [74.125.82.172]) by mtaout20.int.yaziba.net (Postfix) with ESMTPSA id EBD3D1602D6 for ; Sun, 11 Mar 2018 20:17:35 +0100 (CET) Received: by mail-ot0-f172.google.com with SMTP id 95so13280902ote.5 for ; Sun, 11 Mar 2018 12:17:35 -0700 (PDT) X-Gm-Message-State: AElRT7E9jY36AYc0QdyWyVzb/5jtwB8zSEruN6wFi6p4NZXFxzyKEyPQ 7cOVk8/G5qHOqdCOWi8je6OzVvWZ93lN7r7D8l8= X-Google-Smtp-Source: AG47ELtiTjJY9S5wMoo3UJXZbccZh5SLjqY1ktvh3crNM2ehBPcwJOICSR+jcb6GX3Q9ZxrFPKfsrG3j0d9rFyQTOJM= X-Received: by 10.157.33.165 with SMTP id s34mr3611914otb.385.1520795854695; Sun, 11 Mar 2018 12:17:34 -0700 (PDT) MIME-Version: 1.0 Received: by 10.74.139.125 with HTTP; Sun, 11 Mar 2018 12:17:14 -0700 (PDT) In-Reply-To: <81818a99-0a21-f5b3-8708-7a4c99d13935@matej-kosik.net> References: <97fc418b-c016-7a7f-77ae-3823bf4b8a12@matej-kosik.net> <81818a99-0a21-f5b3-8708-7a4c99d13935@matej-kosik.net> From: =?UTF-8?Q?Nicol=C3=A1s_Ojeda_B=C3=A4r?= Date: Sun, 11 Mar 2018 20:17:14 +0100 X-Gmail-Original-Message-ID: Message-ID: To: =?UTF-8?B?TWF0ZWogS2/FocOtaw==?= Cc: OCaml Mailing List Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-DRWEB-SCAN: ok X-VRSPAM-SCORE: -100 X-VRSPAM-STATE: legit X-VRSPAM-CAUSE: gggruggvucftvghtrhhoucdtuddrgedtfedrledugdduvdehucetufdoteggodetrfcurfhrohhfihhlvgemucggtfgfnhhsuhgsshgtrhhisggvnecuuegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenucfjughrpegjfhfhfffkuffvtgfgsehtqhertddttdejnecuhfhrohhmpefpihgtohhljohspgfqjhgvuggrpgeumohruceonhhitgholhgrshdrohhjvggurgdrsggrrheslhgvgihifhhirdgtohhmqeenucfkphepjeegrdduvdehrdekvddrudejvdenucfrrghrrghmpehmohguvgepshhmthhpohhuth X-VRSPAM-EXTCAUSE: mhhouggvpehsmhhtphhouhht Subject: Re: [Caml-list] a question about Ocaml toplevel behavior Hello, I don't know if there is any deep design reason for this behaviour, but for one it enables a kind of information hiding: in order to hide modules which are private to a library and should not be exposed to the client code, simply do not install the corresponding .cmi files. Best wishes, Nicol=C3=A1s On Sun, Mar 11, 2018 at 4:51 PM, Matej Ko=C5=A1=C3=ADk wrote: > Hi Nicol=C3=A1s, > > Thank you for the reply. > > On 03/11/18 16:06, Nicol=C3=A1s Ojeda B=C3=A4r wrote: >> Hello Matej, >> >> My understanding is that the compiler will delay opening a .cmi file >> until absolutely necessary.> Since it does not need to look into Locatio= n in order to compile the >> given phrase, the .cmi is not opened and the type Location.t remains >> abstract. But if you give the compiler an excuse to open location.cmi >> then the definition of the type Location.t will become known to the >> compiler and the toplevel will be able to print the values concretely. > I see some of the disadvantages of this behavior: > > (0) I have lost time wondering why things are printed as "" inst= ead of the real thing. > > (1) "" may (confusingly) mean something else than "a value of an= abstract type". > It may mean that "toplevel has find an excuse not to load a relevan= t *.cmi file some so it does not know (yet) how to print a given value. > (this is very unintuitive) > > (2) #install_printer directive may have no effect if toplevel has find = an excuse not to load relevant *.cmi file. > (this is very unintuitive) > > Was this done on purpose? What do we gain from this behavior? > (considering that computer time (as opposed to human time) has ~zero valu= e).