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 983157EE73 for ; Mon, 5 Nov 2012 20:53:08 +0100 (CET) Received-SPF: None (mail1-smtp-roc.national.inria.fr: no sender authenticity information available from domain of alaincoste@club-internet.fr) identity=pra; client-ip=93.17.128.21; receiver=mail1-smtp-roc.national.inria.fr; envelope-from="alaincoste@club-internet.fr"; x-sender="alaincoste@club-internet.fr"; x-conformance=sidf_compatible Received-SPF: None (mail1-smtp-roc.national.inria.fr: no sender authenticity information available from domain of alaincoste@club-internet.fr) identity=mailfrom; client-ip=93.17.128.21; receiver=mail1-smtp-roc.national.inria.fr; envelope-from="alaincoste@club-internet.fr"; x-sender="alaincoste@club-internet.fr"; x-conformance=sidf_compatible Received-SPF: None (mail1-smtp-roc.national.inria.fr: no sender authenticity information available from domain of postmaster@smtp23.services.sfr.fr) identity=helo; client-ip=93.17.128.21; receiver=mail1-smtp-roc.national.inria.fr; envelope-from="alaincoste@club-internet.fr"; x-sender="postmaster@smtp23.services.sfr.fr"; x-conformance=sidf_compatible X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AvQAAJUYmFBdEYAVlGdsb2JhbABEi1alOJImIwEBAQEJCwkJFAMkghkFAQEEAQgBASgBBR8BFgsLAQEDBQIEDQQEAQEKBCEUAQQaEgoIBgESCAIBAgMBAYdmAwkKB7EeA4lejAGFW2EDlxeSGA X-IronPort-AV: E=Sophos;i="4.80,716,1344204000"; d="scan'208";a="180251504" Received: from smtp23.services.sfr.fr ([93.17.128.21]) by mail1-smtp-roc.national.inria.fr with ESMTP; 05 Nov 2012 20:53:08 +0100 Received: from filter.sfr.fr (localhost [127.0.0.1]) by msfrf2311.sfr.fr (SMTP Server) with ESMTP id D47F77000051; Mon, 5 Nov 2012 20:53:07 +0100 (CET) Received: from Ganymede (11.173.13.109.rev.sfr.net [109.13.173.11]) by msfrf2311.sfr.fr (SMTP Server) with SMTP id 600C37000040; Mon, 5 Nov 2012 20:53:07 +0100 (CET) X-SFR-UUID: 20121105195307393.600C37000040@msfrf2311.sfr.fr Message-ID: <8ADAD5BEF74D411FA77A7329EA0062CA@Ganymede> From: Alain Coste To: =?iso-8859-1?q?Gr=E9goire?= Henry , Gerd Stolpmann Cc: caml-list@inria.fr References: <720307009FD94454BF0EDC318177AA0D@Ganymede><1351958190.8536.17@samsung> <20121105023055.GA26666@mlqds.hnr.gr> Date: Mon, 5 Nov 2012 20:53:02 +0100 MIME-Version: 1.0 X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.2900.5931 X-Mimeole: Produced By Microsoft MimeOLE V6.00.2900.6109 X-Antivirus: avast! (VPS 121105-0, 05/11/2012), Outbound message X-Antivirus-Status: Clean Content-Type: text/plain; format=flowed; charset=iso-8859-1; reply-type=original Content-Transfer-Encoding: 8bit X-Validation-by: alaincoste@club-internet.fr Subject: Re: [Caml-list] Why are modules handled differently by the interpreter and the compiler Hello Thank you for your answers, and for the patch. Cool for debugging without modifying the files ! Alain Coste ----- Original Message ----- From: "Grégoire Henry" To: "Gerd Stolpmann" Cc: "Alain Coste" ; Sent: Monday, November 05, 2012 3:30 AM Subject: Re: [Caml-list] Why are modules handled differently by the interpreter and the compiler >> 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? > > Well, here it is: > > $ ocamlmktop -o myocaml mod_use.ml > $ cat test.ml > let x = 53 > $ ./myocaml > OCaml version 4.00.1 > > # #mod_use "test.ml";; > module Test : sig val x : int end > # Test.x;; > - : int = 53 > > Regards, > Grégoire > > -- > 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