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 mail3-relais-sop.national.inria.fr (mail3-relais-sop.national.inria.fr [192.134.164.104]) by sympa.inria.fr (Postfix) with ESMTPS id 55F5C8239C for ; Mon, 12 Mar 2018 09:50:34 +0100 (CET) Authentication-Results: mail3-smtp-sop.national.inria.fr; spf=None smtp.pra=garrigue@math.nagoya-u.ac.jp; spf=None smtp.mailfrom=garrigue@math.nagoya-u.ac.jp; spf=None smtp.helo=postmaster@ms.math.nagoya-u.ac.jp Received-SPF: None (mail3-smtp-sop.national.inria.fr: no sender authenticity information available from domain of garrigue@math.nagoya-u.ac.jp) identity=pra; client-ip=133.6.130.11; receiver=mail3-smtp-sop.national.inria.fr; envelope-from="garrigue@math.nagoya-u.ac.jp"; x-sender="garrigue@math.nagoya-u.ac.jp"; x-conformance=sidf_compatible Received-SPF: None (mail3-smtp-sop.national.inria.fr: no sender authenticity information available from domain of garrigue@math.nagoya-u.ac.jp) identity=mailfrom; client-ip=133.6.130.11; receiver=mail3-smtp-sop.national.inria.fr; envelope-from="garrigue@math.nagoya-u.ac.jp"; x-sender="garrigue@math.nagoya-u.ac.jp"; x-conformance=sidf_compatible Received-SPF: None (mail3-smtp-sop.national.inria.fr: no sender authenticity information available from domain of postmaster@ms.math.nagoya-u.ac.jp) identity=helo; client-ip=133.6.130.11; receiver=mail3-smtp-sop.national.inria.fr; envelope-from="garrigue@math.nagoya-u.ac.jp"; x-sender="postmaster@ms.math.nagoya-u.ac.jp"; x-conformance=sidf_compatible IronPort-PHdr: =?us-ascii?q?9a23=3AEPBFphAtjUVl71KquhAKUyQJP3N1i/DPJgcQr6Af?= =?us-ascii?q?oPdwSPX/p8bcNUDSrc9gkEXOFd2Cra4c0KyO6+jJYi8p2d65qncMcZhBBVcuqP?= =?us-ascii?q?49uEgeOvODElDxN/XwbiY3T4xoXV5h+GynYwAOQJ6tL1LdrWev4jEMBx7xKRR6?= =?us-ascii?q?JvjvGo7Vks+7y/2+94fcbglUijexe69+IAmrpgjNq8cahpdvJLwswRXTuHtIfO?= =?us-ascii?q?pWxWJsJV2Nmhv3+9m98p1+/SlOovwt78FPX7n0cKQ+VrxYES8pM3sp683xtBnM?= =?us-ascii?q?VhWA630BWWgLiBVIAgzF7BbnXpfttybxq+Rw1DWGMcDwULs5Qiqp4bt1RxD0iS?= =?us-ascii?q?cHLz85/3/Risxsl6JQvRatqwViz4LIfI2ZMfxzcaTAc9MHXmpBRtheWDBdAo2y?= =?us-ascii?q?aIsPCvAOPeder4Lgo1cDoh+zCQyqCejyyDFHm2X20LUm3OsuDA/I3A4vEdwBvn?= =?us-ascii?q?rXotX7KqAcXPupzKnRyDXPc/NW1Sv/5YXObxsvoeuMXbV1ccfJzUcgDR/KjkyN?= =?us-ascii?q?qYP7JDOey+UDvHKB7+p6VOKvhHMnpB9sqTWoyccjkJPJhpgUylDL6CV23p04Jd?= =?us-ascii?q?iiR05nYd6oCp1QuDuVN4txQsItWXhkuDsgxrIcpZG3ZioKyIw+yhPZdveJfY+I?= =?us-ascii?q?4hf5W+aQJzd1nHNleLSlhxaz60es0OP8VtOs3FdKtCVFkt7MtncX2xPP7ciHT/?= =?us-ascii?q?1w9Vqi1zaXzw3f9+9JLE4umafaMZIt37A9moYJvUjeAyP6gEX7gayMekk5+uWl?= =?us-ascii?q?6P7rbqj4qpKfLYN4lwHzP6Yol8eiG+o3KBIOUHKe+emk1L3s40n5QLJSg/0zia?= =?us-ascii?q?nVqpXaKt4Hpq65GQNV1Jws6xm4DzamytsUhGQHIEhfdx2blYTpOUnOLOj5Dfe5?= =?us-ascii?q?nVusjC9my+3IM7DvGJnAL2LPnKrvcLph8UJQ1Rc/wcha551OC7EBJPzzWlX2tN?= =?us-ascii?q?zdFhI5PBa7w/z9CNV82YMeRHyAD7ScMKzIrV+I5vgjI++Wa48avzb8K+Iq6+fz?= =?us-ascii?q?jXMjg1ASYbOl3ZkPaHygBPRpP12ZYWbwgtcGCWoFohAxTOnuiFGbVT5TZm2yX7?= =?us-ascii?q?4n6zEgCIOmCJ/DSZq3jLyA2ie7BJxWaXpcBlCCC3e7P7mDDtENYyWWq9RWtT4J?= =?us-ascii?q?WbGWYQM7nUWotQT9z7N8aO3W9yER85jqzvBx6v3SmxB0/jtxWZezyWaIGkN9lX?= =?us-ascii?q?oVSiR+86llu01y11rLhadxmeZZGsFez/ZATgd8M5fTyP1zTs20UwmHfM/fGwXu?= =?us-ascii?q?ecmvHTxkFoF5+NQJeUsoXoj710GR72+RG7YQ0oezKtkx+6PY0WL2IpwkmXPPyK?= =?us-ascii?q?lniVApRdpGcHDgj6U59RCBX9eVwXXcrL6jcOEn5ACI7H2KlzPcuUhEUEh2WKrC?= =?us-ascii?q?THlaew3fppL7/hGaFuL8OfEcKgJEjPW6BO5KZ9nu1wkUQeylPd3CYyS3kmi3FB?= =?us-ascii?q?/N2/WFZ8zoYzdF0Q=3D=3D?= X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: =?us-ascii?q?A0BQAACfPqZalwuCBoVdGQEBAQEBAQEBA?= =?us-ascii?q?QEBAQcBAQEBAYQ2A2wog1CKH3OOWSmBFoFTkl+CFQEJI4UCAoMtBgYwGAECAQE?= =?us-ascii?q?BAQEBAQEBEgEBAQEBCBYGVoI4JIJIAQUjHQEBLAsBDwkCGAICCR0CAkUSBhMSh?= =?us-ascii?q?G4DFBCNSJ0AbYImgwEBAQWBZ4IwAzYaaoISCIENhCiGEwyCeYMjgV4BAR6DCDC?= =?us-ascii?q?CMoYzBy4Ih3qLcAmGQ4MQhxCCMYZahVaJeYRlgmqBLB6CCk04OioBghgJNYFlD?= =?us-ascii?q?xAMgghoizuCOgEBAQ?= X-IPAS-Result: =?us-ascii?q?A0BQAACfPqZalwuCBoVdGQEBAQEBAQEBAQEBAQcBAQEBAYQ?= =?us-ascii?q?2A2wog1CKH3OOWSmBFoFTkl+CFQEJI4UCAoMtBgYwGAECAQEBAQEBAQEBEgEBA?= =?us-ascii?q?QEBCBYGVoI4JIJIAQUjHQEBLAsBDwkCGAICCR0CAkUSBhMShG4DFBCNSJ0AbYI?= =?us-ascii?q?mgwEBAQWBZ4IwAzYaaoISCIENhCiGEwyCeYMjgV4BAR6DCDCCMoYzBy4Ih3qLc?= =?us-ascii?q?AmGQ4MQhxCCMYZahVaJeYRlgmqBLB6CCk04OioBghgJNYFlDxAMgghoizuCOgE?= =?us-ascii?q?BAQ?= X-IronPort-AV: E=Sophos;i="5.47,460,1515452400"; d="scan'208";a="257838593" Received: from bsd20.math.nagoya-u.ac.jp (HELO ms.math.nagoya-u.ac.jp) ([133.6.130.11]) by mail3-smtp-sop.national.inria.fr with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 12 Mar 2018 09:50:32 +0100 Received: from [192.168.0.13] (58x158x128x157.ap58.ftth.ucom.ne.jp [58.158.128.157]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ms.math.nagoya-u.ac.jp (Postfix) with ESMTPSA id 63A356DFAF6; Mon, 12 Mar 2018 17:50:28 +0900 (JST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=math.nagoya-u.ac.jp; s=20160220; t=1520844628; bh=fDh6He7YxN+vVMPDsyLJVNvIqgl7C4HRLN3Db/Z+J3A=; h=Subject:From:In-Reply-To:Date:Cc:References:To; b=GcGKWH2ESCXJEQUZwdayr1nm0jsCivhOpCqzIDTLtYavFNWoNDGbiPCfB8WBzY5M0 b4rYqWk/PU96aQd4N0ayiR58n2UpAPcmKZ4QdcP4Aap8i4ZY6pl4muhBeJZKbBhCNB 8Lgm1PnGhju+8rOXge0u61zNeucfafbOqw95AQ38= Content-Type: text/plain; charset=utf-8 Mime-Version: 1.0 (Mac OS X Mail 11.2 \(3445.5.20\)) From: Jacques Garrigue In-Reply-To: Date: Mon, 12 Mar 2018 17:50:26 +0900 Cc: =?utf-8?B?TWF0ZWogS2/FocOtaw==?= , Mailing List OCaml Content-Transfer-Encoding: quoted-printable Message-Id: <80BFB738-5A8C-4009-8EBC-5C2EB0B742B6@math.nagoya-u.ac.jp> References: <97fc418b-c016-7a7f-77ae-3823bf4b8a12@matej-kosik.net> To: =?utf-8?Q?Nicol=C3=A1s_Ojeda_B=C3=A4r?= X-Mailer: Apple Mail (2.3445.5.20) X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.6.2 (ms.math.nagoya-u.ac.jp [0.0.0.0]); Mon, 12 Mar 2018 17:50:28 +0900 (JST) X-Virus-Scanned: clamav-milter 0.99.2 at bsdserver20 X-Virus-Status: Clean X-Spam-Checker-Version: SpamAssassin 3.4.1 (2015-04-28) on bsdserver20.math.nagoya-u.ac.jp Subject: Re: [Caml-list] a question about Ocaml toplevel behavior This actually looks like a bug. Printing a value falls in the category where type information is "asbolutely necessary=E2=80=9D, so it should open the cmi. Looking at the code, I do not see any immediate reason it wouldn=E2=80=99t = work. Well, it could happen if location.cmi is not available, but then I don=E2= =80=99t see how doing so extra stuff would help. Can somebody open a PR on Mantis? Jacques Garrigue On 2018/03/12 00:06, Nicol=C3=A1s Ojeda B=C3=A4r wrote: >=20 > Hello Matej, >=20 > My understanding is that the compiler will delay opening a .cmi file > until absolutely necessary. > Since it does not need to look into Location 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. >=20 > For example, evaluating Location.none as in you did in your previous > message in one thing that will cause the compiler to load the > corresponding .cmi file thereby making Location.t concrete. >=20 > Best wishes, > Nicol=C3=A1s >=20 >=20 > On Sun, Mar 11, 2018 at 2:30 PM, Matej Ko=C5=A1=C3=ADk wrote: >> Here is ta simplified version of the original question: >>=20 >> If I do: >>=20 >> #use "topfind";; >> #require "compiler-libs.common";; >> Parse.implementation (Lexing.from_string "foo");; >>=20 >> What I see is this: >>=20 >> - : Parsetree.structure =3D >> [{Parsetree.pstr_desc =3D >> Parsetree.Pstr_eval >> ({Parsetree.pexp_desc =3D Parsetree.Pexp_ident ; pexp_loc = =3D ; >> pexp_attributes =3D []}, >> []); >> pstr_loc =3D }] >>=20 >> What confuses me is the presence of "" stuff. >> Why are they there? >> Why don't I see the actual Ocaml terms (which do not belong to abstract = types)? >>=20 >> -- >> Caml-list mailing list. Subscription management and archives: >> https://sympa.inria.fr/sympa/arc/caml-list >> Beginner's list: http://groups.yahoo.com/group/ocaml_beginners >> Bug reports: http://caml.inria.fr/bin/caml-bugs