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 2D08A7FACD for ; Mon, 29 Sep 2014 12:58:56 +0200 (CEST) Received-SPF: None (mail3-smtp-sop.national.inria.fr: no sender authenticity information available from domain of maxence.guesdon@inria.fr) identity=pra; client-ip=193.52.245.254; receiver=mail3-smtp-sop.national.inria.fr; envelope-from="maxence.guesdon@inria.fr"; x-sender="maxence.guesdon@inria.fr"; x-conformance=sidf_compatible Received-SPF: None (mail3-smtp-sop.national.inria.fr: no sender authenticity information available from domain of maxence.guesdon@inria.fr) identity=mailfrom; client-ip=193.52.245.254; receiver=mail3-smtp-sop.national.inria.fr; envelope-from="maxence.guesdon@inria.fr"; x-sender="maxence.guesdon@inria.fr"; x-conformance=sidf_compatible Received-SPF: None (mail3-smtp-sop.national.inria.fr: no sender authenticity information available from domain of postmaster@zproxy02.u-bourgogne.fr) identity=helo; client-ip=193.52.245.254; receiver=mail3-smtp-sop.national.inria.fr; envelope-from="maxence.guesdon@inria.fr"; x-sender="postmaster@zproxy02.u-bourgogne.fr"; x-conformance=sidf_compatible X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AooCAFA6KVTBNPX+nGdsb2JhbABg0CyFZwoCgQsWAREBAQEBAQgLCQkULIQEAQEDATo/BQsLDhMlD0gGE4g2DL9aGJAeB4RLBZJqiDGCDJlDaoJKAQEB X-IPAS-Result: AooCAFA6KVTBNPX+nGdsb2JhbABg0CyFZwoCgQsWAREBAQEBAQgLCQkULIQEAQEDATo/BQsLDhMlD0gGE4g2DL9aGJAeB4RLBZJqiDGCDJlDaoJKAQEB X-IronPort-AV: E=Sophos;i="5.04,619,1406584800"; d="scan'208";a="81255753" Received: from zproxy02.u-bourgogne.fr ([193.52.245.254]) by mail3-smtp-sop.national.inria.fr with ESMTP; 29 Sep 2014 12:58:55 +0200 Received: from localhost (localhost.localdomain [127.0.0.1]) by zproxy02.u-bourgogne.fr (Postfix) with ESMTP id 1956B171FEB; Mon, 29 Sep 2014 12:58:55 +0200 (CEST) Received: from zproxy02.u-bourgogne.fr ([127.0.0.1]) by localhost (zproxy02.u-bourgogne.fr [127.0.0.1]) (amavisd-new, port 10032) with ESMTP id RnSAh6wPqla1; Mon, 29 Sep 2014 12:58:54 +0200 (CEST) Received: from localhost (localhost.localdomain [127.0.0.1]) by zproxy02.u-bourgogne.fr (Postfix) with ESMTP id AFADF171FF0; Mon, 29 Sep 2014 12:58:54 +0200 (CEST) X-Virus-Scanned: amavisd-new at zproxy02.u-bourgogne.fr Received: from zproxy02.u-bourgogne.fr ([127.0.0.1]) by localhost (zproxy02.u-bourgogne.fr [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id mV29crxuQf5e; Mon, 29 Sep 2014 12:58:54 +0200 (CEST) Received: from alcazar2 (sunset.u-bourgogne.fr [193.52.245.3]) by zproxy02.u-bourgogne.fr (Postfix) with ESMTP id 62BDE171FEB; Mon, 29 Sep 2014 12:58:54 +0200 (CEST) Date: Mon, 29 Sep 2014 12:58:54 +0200 From: Maxence Guesdon To: Gerd Stolpmann Cc: Eric Cooper , caml-list@inria.fr Message-ID: <20140929125854.20af2b92@alcazar2> In-Reply-To: <1411987686.5797.128.camel@e130> References: <20140928230638.GT2829@cooper-siegel.org> <1411987686.5797.128.camel@e130> X-Mailer: Claws Mail 3.9.3 (GTK+ 2.24.23; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Subject: Re: [Caml-list] testing private functions with oUnit On Mon, 29 Sep 2014 12:48:06 +0200 Gerd Stolpmann wrote: > I think there is some missing functionality in OCaml: a mechanism to > grant access to something that is normally hidden. This is not only > important for unit testing but for debugging in general (remember that > even ocamldebug cannot break module abstractions). > > What about this idea: modules (and only modules) can have associated > visibility attributes. These are set with the definition or in the > signature, e.g. > > module Implementation { "debug" } = struct ... end > [...] Couldn't recently introduced attributes be used to filter in or out some parts of modules depending on a command line flag ? - m