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 mail1-relais-roc.national.inria.fr (mail1-relais-roc.national.inria.fr [192.134.164.82]) by sympa.inria.fr (Postfix) with ESMTPS id 74B017EE73 for ; Mon, 5 Nov 2012 12:23:34 +0100 (CET) Received-SPF: None (mail1-smtp-roc.national.inria.fr: no sender authenticity information available from domain of info@gerd-stolpmann.de) identity=pra; client-ip=212.227.126.186; receiver=mail1-smtp-roc.national.inria.fr; envelope-from="info@gerd-stolpmann.de"; x-sender="info@gerd-stolpmann.de"; x-conformance=sidf_compatible Received-SPF: None (mail1-smtp-roc.national.inria.fr: no sender authenticity information available from domain of info@gerd-stolpmann.de) identity=mailfrom; client-ip=212.227.126.186; receiver=mail1-smtp-roc.national.inria.fr; envelope-from="info@gerd-stolpmann.de"; x-sender="info@gerd-stolpmann.de"; x-conformance=sidf_compatible Received-SPF: Pass (mail1-smtp-roc.national.inria.fr: domain of postmaster@moutng.kundenserver.de designates 212.227.126.186 as permitted sender) identity=helo; client-ip=212.227.126.186; receiver=mail1-smtp-roc.national.inria.fr; envelope-from="info@gerd-stolpmann.de"; x-sender="postmaster@moutng.kundenserver.de"; x-conformance=sidf_compatible; x-record-type="v=spf1" X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AgkBALagl1DU4366jmdsb2JhbABEsRaSLCMBAQEBCQsJCRIFJIIfAQVuCxAwITwJEgYTCQmHZgMTB7ATA4leFItthjwDjV2JOpIY X-IronPort-AV: E=Sophos;i="4.80,714,1344204000"; d="scan'208";a="180169435" Received: from moutng.kundenserver.de ([212.227.126.186]) by mail1-smtp-roc.national.inria.fr with ESMTP/TLS/RC4-SHA; 05 Nov 2012 12:23:33 +0100 Received: from office1.lan.sumadev.de (dslb-188-097-000-221.pools.arcor-ip.net [188.97.0.221]) by mrelayeu.kundenserver.de (node=mreu3) with ESMTP (Nemesis) id 0MTact-1TtqbL1yxr-00SSVx; Mon, 05 Nov 2012 12:23:33 +0100 Received: from samsung (ip-5-146-55-186.unitymediagroup.de [5.146.55.186]) by office1.lan.sumadev.de (Postfix) with ESMTPSA id 07F21C00CF; Mon, 5 Nov 2012 12:23:32 +0100 (CET) Date: Mon, 05 Nov 2012 12:23:31 +0100 From: Gerd Stolpmann To: =?iso-8859-1?q?Gr=E9goire?= Henry Cc: Alain Coste , caml-list@inria.fr References: <1351958190.8536.17@samsung> <20121105023055.GA26666@mlqds.hnr.gr> In-Reply-To: <20121105023055.GA26666@mlqds.hnr.gr> (from henry@pps.univ-paris-diderot.fr on Mon Nov 5 03:30:55 2012) X-Mailer: Balsa 2.4.11 Message-Id: <1352114611.8536.18@samsung> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-15; DelSp=Yes; Format=Flowed Content-Disposition: inline Content-Transfer-Encoding: quoted-printable X-Provags-ID: V02:K0:XR3YcsayBf0Q2Ng/xgblPe0QVKNy+bjycFL5LUSRt8a WzdmG9L1V48D1uHHgkmq1OQ6z3LDJZScCDKSoM4FEJ/qM9RLR3 4aJnaAcoBwzw7pNXNmK3jHJHoMDr4YDNyDYaf5zNyyyBjY8A05 gKzJgJTz+8+4AimfWmUF4dLT5OAmcUZ/aKtRZncqBma921k285 w4TPr4Pf9vbVfTw8F7McqWi10KIxF0xze4Q6NT/ASMhVLlGEzQ guTqTe1TTuqWRe47nFH8f+sXbjUPVbNHi2Z5f6DJVEipMdDWaP /aJWCRE8mE6xaHq/SKYq8wYup098NB4cMEjXKFvW5Ejc9GxaaP +qSaZRCJgs9HZtYuS+6U= Subject: AW: [Caml-list] Why are modules handled differently by the interpreter and the compiler Cool. I suggest you submit this as a patch. One minor error, though: In case of an exception Toploop.parse_use_file=20= =20 should also be reset. Gerd Am 05.11.2012 03:30:55 schrieb(en) Gr=E9goire Henry: > > What could be implemented as an extension is a #use_as_module > > directive that adds the implicit module. This could be in deed > > useful for debugging, especially when it overlooks the mli file if > > present - if you #load, the definition hiding of the mli file takes > > place, and you cannot see unexported definitions anymore. Of course, > > this is sometimes in the way when you test things out. > > > > Now that compiler-libs is installed this extension could probably > > even be implemented outside the compiler. Anyone up for it? >=20 > Well, here it is: >=20 > $ ocamlmktop -o myocaml mod_use.ml > $ cat test.ml > let x =3D 53 > $ ./myocaml > OCaml version 4.00.1 >=20 > # #mod_use "test.ml";; > module Test : sig val x : int end > # Test.x;; > - : int =3D 53 >=20 > Regards, > Gr=E9goire >=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 --=20 ------------------------------------------------------------ Gerd Stolpmann, Darmstadt, Germany gerd@gerd-stolpmann.de Creator of GODI and camlcity.org. Contact details: http://www.camlcity.org/contact.html Company homepage: http://www.gerd-stolpmann.de ------------------------------------------------------------=